Suggest firmware retraction time (#5926)

* Suggest  firmware retraction time
This commit is contained in:
Vovodroid
2024-07-29 15:32:07 +03:00
committed by GitHub
parent 2ee3800a47
commit 4a81fe6134
4 changed files with 21 additions and 14 deletions

View File

@@ -50,7 +50,7 @@ public:
bool extruding(const GCodeReader &reader) const { return (this->cmd_is("G1") || this->cmd_is("G2") || this->cmd_is("G3")) && this->dist_E(reader) > 0; }
bool retracting(const GCodeReader &reader) const { return (this->cmd_is("G1") || this->cmd_is("G2") || this->cmd_is("G3")) && this->dist_E(reader) < 0; }
bool travel() const { return (this->cmd_is("G1") || this->cmd_is("G2") || this->cmd_is("G3")) && ! this->has(E); }
void set(const GCodeReader &reader, const Axis axis, const float new_value, const int decimal_digits = 3);
void set(const Axis axis, const float new_value, const int decimal_digits = 3);
bool has_x() const { return this->has(X); }
bool has_y() const { return this->has(Y); }
@@ -93,6 +93,7 @@ public:
void reset() { memset(m_position, 0, sizeof(m_position)); }
void apply_config(const GCodeConfig &config);
void apply_config(const DynamicPrintConfig &config);
const GCodeConfig& config() { return m_config; };
template<typename Callback>
void parse_buffer(const std::string &buffer, Callback callback)