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>2020-11-10 18:01:50 +0300
committerChristian Hammacher <bmasterc@gmail.com>2020-11-10 18:01:50 +0300
commit2d4b60adcf62172e07fd88d1a5002f8a5e473b93 (patch)
tree6e4209b63536533400f8b04b659412cadcd3cf13 /src/GCodes/GCodeMachineState.h
parent1f350cfce03ddf42729d07bf1855ee099bfd15b3 (diff)
Fixed macro issues in SBC mode
Bug fix: File ID counter overflowed to zero causing issues after 255 macro requests
Diffstat (limited to 'src/GCodes/GCodeMachineState.h')
-rw-r--r--src/GCodes/GCodeMachineState.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/GCodes/GCodeMachineState.h b/src/GCodes/GCodeMachineState.h
index 371f7bc6..90850e29 100644
--- a/src/GCodes/GCodeMachineState.h
+++ b/src/GCodes/GCodeMachineState.h
@@ -128,6 +128,14 @@ enum class BlockType : uint8_t
loop // block inside a 'while' command
};
+#if HAS_LINUX_INTERFACE
+typedef uint16_t FileId;
+
+constexpr FileId NoFileId = 0;
+constexpr FileId FirstFileId = 1;
+constexpr FileId MaxFileId = 65535;
+#endif
+
// Class to hold the state of gcode execution for some input source
class GCodeMachineState
{
@@ -181,7 +189,7 @@ public:
FileData fileState;
#endif
#if HAS_LINUX_INTERFACE
- uint8_t fileId; // virtual file ID to deal with stack push/pops when a file is being cancelled or finished in the wrong stack level
+ FileId fileId; // virtual file ID to deal with stack push/pops when a file is being cancelled or finished in the wrong stack level
#endif
ResourceBitmap lockedResources;
BlockState blockStates[MaxBlockIndent];