ENH: support virtual G1

1.We need virtual G1 command for statistics

jira:NONE

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: I0db0f7f0f0c2d61e43582154e0bd76bd0097c8da
(cherry picked from commit b34395358b4dd716eba7998a02f1cd3f6720c957)
This commit is contained in:
xun.zhang
2024-09-20 10:11:53 +08:00
committed by Noisyfox
parent 0889ff619e
commit 77fbe2e0ff
2 changed files with 351 additions and 4 deletions

View File

@@ -292,6 +292,8 @@ class Print;
static const std::vector<std::string> Reserved_Tags_compatible;
static const std::string Flush_Start_Tag;
static const std::string Flush_End_Tag;
static const std::string VFlush_Start_Tag;
static const std::string VFlush_End_Tag;
static const std::string External_Purge_Tag;
public:
enum class ETags : unsigned char
@@ -702,7 +704,8 @@ class Print;
AxisCoords m_origin; // mm
CachedPosition m_cached_position;
bool m_wiping;
bool m_flushing;
bool m_flushing; // mark a section with real flush
bool m_virtual_flushing; // mark a section with virtual flush, only for statistics
bool m_wipe_tower;
std::vector<float> m_remaining_volume;
bool m_manual_filament_change;
@@ -854,6 +857,9 @@ class Print;
void process_G1(const GCodeReader::GCodeLine& line, const std::optional<unsigned int>& remaining_internal_g1_lines = std::nullopt);
void process_G2_G3(const GCodeReader::GCodeLine& line);
void process_VG1(const GCodeReader::GCodeLine& line);
// BBS: handle delay command
void process_G4(const GCodeReader::GCodeLine& line);