Get name of both the G-code and project file from the 1st printable

object's name or file path.
Fixed some compilation warnings.
This commit is contained in:
bubnikv 2019-02-01 11:44:08 +01:00
parent 405d18a7fa
commit 3b973e01dd
4 changed files with 14 additions and 18 deletions

View file

@ -43,7 +43,7 @@ public:
}
bool cmd_is(const char *cmd_test) const {
const char *cmd = GCodeReader::skip_whitespaces(m_raw.c_str());
int len = strlen(cmd_test);
size_t len = strlen(cmd_test);
return strncmp(cmd, cmd_test, len) == 0 && GCodeReader::is_end_of_word(cmd[len]);
}
bool extruding(const GCodeReader &reader) const { return this->cmd_is("G1") && this->dist_E(reader) > 0; }