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:
authorDavid Crocker <dcrocker@eschertech.com>2022-08-03 12:01:36 +0300
committerDavid Crocker <dcrocker@eschertech.com>2022-08-03 12:01:36 +0300
commitcde30643da7d15f43c5bea63485abc7f876336f9 (patch)
tree9c696283cde2b7e3bb6f97f8fdf129586e9163fd
parent1d5b2d438a06649a1e2dbd78ec46bd47c99d4db3 (diff)
Don't report an event if it has a handler macro
-rw-r--r--src/GCodes/GCodes3.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/GCodes/GCodes3.cpp b/src/GCodes/GCodes3.cpp
index d971bfe5..a4d5d049 100644
--- a/src/GCodes/GCodes3.cpp
+++ b/src/GCodes/GCodes3.cpp
@@ -1914,7 +1914,6 @@ void GCodes::ProcessEvent(GCodeBuffer& gb) noexcept
// Get the event message
String<StringLength100> eventText;
const MessageType mt = Event::GetTextDescription(eventText.GetRef());
- platform.MessageF(mt, "%s\n", eventText.c_str()); // tell the user about the event and log it
// Get the name of the macro file that we should look for
String<StringLength50> macroName;
@@ -1938,6 +1937,11 @@ void GCodes::ProcessEvent(GCodeBuffer& gb) noexcept
#endif
// We didn't execute the macro, so do the default action
+ if ((mt & LogLevelMask) != 0)
+ {
+ platform.MessageF((MessageType)(mt & (LogLevelMask | ErrorMessageFlag | WarningMessageFlag)), "%s\n", eventText.c_str()); // log the event
+ }
+
if (Event::GetDefaultPauseReason() == PrintPausedReason::dontPause)
{
Event::FinishedProcessing(); // nothing more to do
@@ -1945,8 +1949,6 @@ void GCodes::ProcessEvent(GCodeBuffer& gb) noexcept
else
{
// It's a serious event that causes the print to pause by default, so send an alert
- String<StringLength100> eventText;
- Event::GetTextDescription(eventText.GetRef());
const bool isPrinting = IsReallyPrinting();
platform.SendAlert(GenericMessage, eventText.c_str(), (isPrinting) ? "Printing paused" : "Event notification", 1, 0.0, AxesBitmap());
if (IsReallyPrinting())