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"}, {"wifiMode", "ap"},
{"wifiSSID", defSSID}, {"wifiSSID", defSSID},
{"wifiPass", defPass}, {"wifiPass", defPass},
{"defRpm", "2"}}}; {"defRpm", "2"},
{"ignoreRpm", "yes"}}};
/* /*
Max string length is 25 Max string length is 25

View File

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