Use constant names for G-codes like M600, M601 and "tool_change"(Change extruder)

This commit is contained in:
YuSanka 2019-11-11 09:38:45 +01:00
parent 7a22e43825
commit 6c8bb51f4a
8 changed files with 58 additions and 57 deletions

View file

@ -963,11 +963,11 @@ private:
struct TICK_CODE
{
TICK_CODE(int tick):tick(tick), gcode("M600"), extruder(0), color("") {}
TICK_CODE(int tick):tick(tick), gcode(Slic3r::ColorChangeCode), extruder(0), color("") {}
TICK_CODE(int tick, const std::string& code) :
tick(tick), gcode(code), extruder(0) {}
TICK_CODE(int tick, int extruder) :
tick(tick), gcode("M600"), extruder(extruder) {}
tick(tick), gcode(Slic3r::ColorChangeCode), extruder(extruder) {}
TICK_CODE(int tick, const std::string& code, int extruder, const std::string& color) :
tick(tick), gcode(code), extruder(extruder), color(color) {}
@ -976,13 +976,7 @@ private:
TICK_CODE operator=(const TICK_CODE& other) const {
TICK_CODE ret_val(other.tick, other.gcode, other.extruder, other.color);
return ret_val;
}/*
TICK_CODE& operator=(const TICK_CODE& other) {
this->tick = other.tick;
this->gcode = other.gcode;
this->extruder = other.extruder;
return *this;
}*/
}
int tick;
std::string gcode;