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
diff options
context:
space:
mode:
authorChristian Hammacher <bmasterc@gmail.com>2022-09-30 12:38:12 +0300
committerChristian Hammacher <bmasterc@gmail.com>2022-09-30 12:38:12 +0300
commita98453dc82397d8831371a4f636671c6c492824b (patch)
tree74272981c44f55e3dcf7d30886e5b71d259640b2
parent46349c643bdf85bd55bca659f05bad4709bb7dd9 (diff)
Possible fix for M292
Get possible expression before acknowledging msgboxes
-rw-r--r--src/GCodes/GCodes7.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/GCodes/GCodes7.cpp b/src/GCodes/GCodes7.cpp
index 23abce06..171ef8bf 100644
--- a/src/GCodes/GCodes7.cpp
+++ b/src/GCodes/GCodes7.cpp
@@ -121,17 +121,18 @@ GCodeResult GCodes::AcknowledgeMessage(GCodeBuffer&gb, const StringRef& reply) T
seq = gb.GetUIValue();
}
+ const bool cancelled = (gb.Seen('P') && gb.GetIValue() == 1);
+ ExpressionValue rslt;
+ if (!cancelled && gb.Seen('R'))
+ {
+ rslt = gb.GetExpression();
+ }
+
bool wasBlocking;
if (reprap.AcknowledgeMessageBox(seq, wasBlocking))
{
if (wasBlocking)
{
- const bool cancelled = (gb.Seen('P') && gb.GetIValue() == 1);
- ExpressionValue rslt;
- if (!cancelled && gb.Seen('R'))
- {
- rslt = gb.GetExpression();
- }
MessageBoxClosed(cancelled, true, rslt);
}
return GCodeResult::ok;