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>2019-07-21 00:19:39 +0300
committerChristian Hammacher <bmasterc@gmail.com>2019-07-21 00:19:39 +0300
commitbd09eee4ed60955db72f3a28dcbb758d3f26ded5 (patch)
treed410684917916ab6c3873bb737e0594a4900095e /src/GCodes/GCodeMachineState.h
parent082e47e3da0c3c748474878f425366b4a14713ef (diff)
More improvements
Improved GCodeBuffer backend Moved compatibility setting to machine state Cleaned up some of the Linux buffering code Bug fix: Output of M111 was reported in multiple chunks and could not be seen via DWS Bug fix: Unsupported codes were not reported as such
Diffstat (limited to 'src/GCodes/GCodeMachineState.h')
-rw-r--r--src/GCodes/GCodeMachineState.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/GCodes/GCodeMachineState.h b/src/GCodes/GCodeMachineState.h
index e10f9d4f..cd35a98b 100644
--- a/src/GCodes/GCodeMachineState.h
+++ b/src/GCodes/GCodeMachineState.h
@@ -89,11 +89,27 @@ enum class GCodeState : uint8_t
timingSDwrite,
#endif
+#if HAS_LINUX_INTERFACE
+ doingUnsupportedCode,
+#endif
+
#if HAS_VOLTAGE_MONITOR
powerFailPausing1
#endif
};
+// Other firmware that we might switch to be compatible with.
+enum class Compatibility : uint8_t
+{
+ me = 0,
+ reprapFirmware = 1,
+ marlin = 2,
+ teacup = 3,
+ sprinter = 4,
+ repetier = 5,
+ nanoDLP = 6
+};
+
// Class to hold the state of gcode execution for some input source
class GCodeMachineState
{
@@ -144,12 +160,14 @@ public:
const char *errorMessage;
uint32_t lineNumber;
+ Compatibility compatibility;
int16_t newToolNumber;
uint16_t
drivesRelative : 1,
axesRelative : 1,
#if HAS_LINUX_INTERFACE
isFileFinished : 1,
+ fileError: 1,
#endif
doingFileMacro : 1,
waitWhileCooling : 1,
@@ -175,7 +193,7 @@ public:
bool DoingFile() const { return fileId == 0; }
void SetFileExecuting();
- void SetFileFinished();
+ void SetFileFinished(bool error);
#endif
void CloseFile();
bool UsingMachineCoordinates() const { return g53Active || runningSystemMacro; }
@@ -183,6 +201,7 @@ public:
// Copy values that may have been altered by config.g into this state record
void CopyStateFrom(const GCodeMachineState& other)
{
+ compatibility = other.compatibility;
drivesRelative = other.drivesRelative;
axesRelative = other.axesRelative;
feedRate = other.feedRate;