add ignoreRpm option, because gcodetools default is 400

This commit is contained in:
2020-03-19 14:05:38 +03:00
parent 3178f3074f
commit cd598dba7f
2 changed files with 3 additions and 2 deletions

View File

@@ -8,7 +8,8 @@ const std::unordered_map<std::string, std::string> defaults{
{"wifiMode", "ap"},
{"wifiSSID", defSSID},
{"wifiPass", defPass},
{"defRpm", "2"}}};
{"defRpm", "2"},
{"ignoreRpm", "yes"}}};
/*
Max string length is 25

View File

@@ -68,7 +68,7 @@ Command parseGCode(std::string gcode) {
if (zIter != endIter) {
bufcmd.arg3 = zIter->second;
}
if (fIter != endIter) {
if (fIter != endIter && configManager.get("ignoreRpm") != "yes") {
bufcmd.arg4 = fIter->second;
} else {
bufcmd.arg4 = atof(configManager.get("defRpm").c_str());