Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Duet3D/RepRapFirmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDavid Crocker <dcrocker@eschertech.com>2017-10-28 15:15:52 +0300
committerDavid Crocker <dcrocker@eschertech.com>2017-10-28 15:15:52 +0300
commitea9eee74e790d5d6da79fdea53004447cc40224f (patch)
tree5fa5d2e2accd243475b899785d928878528eb362 /src
parent97df14938ad64b4c24870a2619494104a345c484 (diff)
1.20beta3 final
Bug fixes: Extra M307 lines were written to config-override.g in 1.20b2 CoreXY homing was broken in 1.20b2 Motor idle detection was broken in 1.20b2 M585 didn't work Resuming a print gave a "low voltage" error if no M911 command was used The code to detect M122 early also recognised commands of the form Mxxx122 where xxx were non-numeric
Diffstat (limited to 'src')
-rw-r--r--src/GCodes/GCodeInput.cpp32
-rw-r--r--src/Platform.cpp2
2 files changed, 5 insertions, 29 deletions
diff --git a/src/GCodes/GCodeInput.cpp b/src/GCodes/GCodeInput.cpp
index e4787fbd..a0087345 100644
--- a/src/GCodes/GCodeInput.cpp
+++ b/src/GCodes/GCodeInput.cpp
@@ -133,43 +133,19 @@ void RegularGCodeInput::Put(MessageType mtype, const char c)
break;
case GCodeInputState::doingMCode:
- if (c == '1')
- {
- state = GCodeInputState::doingMCode1;
- }
+ state = (c == '1') ? GCodeInputState::doingMCode1 : GCodeInputState::doingCode;
break;
case GCodeInputState::doingMCode1:
- if (c == '1')
- {
- state = GCodeInputState::doingMCode11;
- }
- else if (c == '2')
- {
- state = GCodeInputState::doingMCode12;
- }
- else
- {
- state = GCodeInputState::doingCode;
- }
+ state = (c == '1') ? GCodeInputState::doingMCode11: (c == '2') ? GCodeInputState::doingMCode12 : GCodeInputState::doingCode;
break;
case GCodeInputState::doingMCode11:
- if (c == '2')
- {
- state = GCodeInputState::doingMCode112;
- break;
- }
- state = GCodeInputState::doingCode;
+ state = (c == '2') ? GCodeInputState::doingMCode112 : GCodeInputState::doingCode;
break;
case GCodeInputState::doingMCode12:
- if (c == '2')
- {
- state = GCodeInputState::doingMCode122;
- break;
- }
- state = GCodeInputState::doingCode;
+ state = (c == '2') ? GCodeInputState::doingMCode122 : GCodeInputState::doingCode;
break;
case GCodeInputState::doingMCode112:
diff --git a/src/Platform.cpp b/src/Platform.cpp
index 57307c0a..f6825a53 100644
--- a/src/Platform.cpp
+++ b/src/Platform.cpp
@@ -1554,7 +1554,7 @@ void Platform::DisableAutoSave()
bool Platform::IsPowerOk() const
{
- return currentVin > autoPauseReading;
+ return autoSaveEnabled && currentVin > autoPauseReading;
}
void Platform::EnableAutoSave(float saveVoltage, float resumeVoltage)