mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 10:32:20 +00:00
preheat work - part 1
This commit is contained in:
committed by
SoftFever
parent
a9668728bc
commit
7d0fb4f42a
@@ -79,6 +79,16 @@ public:
|
||||
return strncmp(cmd, cmd_test, len) == 0 && GCodeReader::is_end_of_word(cmd[len]);
|
||||
}
|
||||
|
||||
static bool cmd_starts_with(const std::string& gcode_line, const char* cmd_test) {
|
||||
return strncmp(GCodeReader::skip_whitespaces(gcode_line.c_str()), cmd_test, strlen(cmd_test)) == 0;
|
||||
}
|
||||
|
||||
static std::string extract_cmd(const std::string& gcode_line) {
|
||||
GCodeLine temp;
|
||||
temp.m_raw = gcode_line;
|
||||
const std::string_view cmd = temp.cmd();
|
||||
return { cmd.begin(), cmd.end() };
|
||||
}
|
||||
private:
|
||||
std::string m_raw;
|
||||
float m_axis[NUM_AXES];
|
||||
|
||||
Reference in New Issue
Block a user