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>2021-11-18 16:06:48 +0300
committerDavid Crocker <dcrocker@eschertech.com>2021-11-18 16:06:48 +0300
commitcd162aab06bf3cb9df361eb59973125e1c9b42dc (patch)
treeea8b1ca8af2a83c93d10e4aed876995331989e95 /src/RepRapFirmware.h
parentbe212de630ce67e283d7ab78cda796165e2b7d43 (diff)
File GCodeResult.h moved to CANlib and #included in RepRapFirmware.h
Diffstat (limited to 'src/RepRapFirmware.h')
-rw-r--r--src/RepRapFirmware.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/RepRapFirmware.h b/src/RepRapFirmware.h
index 798c66d2..0351298c 100644
--- a/src/RepRapFirmware.h
+++ b/src/RepRapFirmware.h
@@ -51,11 +51,17 @@ const char *_ecv_array SafeStrptime(const char *_ecv_array buf, const char *_ecv
#endif
#include <CoreIO.h>
-# include <Devices.h>
+#include <Devices.h>
// The following are needed by many other files, so include them here
-# include <Platform/MessageType.h>
-# include <GCodes/GCodeResult.h>
+#include <Platform/MessageType.h>
+#include <GCodeResult.h>
+
+// Convert an error or warning result into a suitable generic message type. Should only be called with GCodeResult::warning or GCodeResult::error.
+inline MessageType GetGenericMessageType(GCodeResult rslt)
+{
+ return (rslt == GCodeResult::warning) ? WarningMessage : ErrorMessage;
+}
#define SPEED_CRITICAL __attribute__((optimize("O2")))