diff options
Diffstat (limited to 'src/GCodes/GCodeBuffer.h')
-rw-r--r-- | src/GCodes/GCodeBuffer.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/GCodes/GCodeBuffer.h b/src/GCodes/GCodeBuffer.h index 0032c081..aa8723c9 100644 --- a/src/GCodes/GCodeBuffer.h +++ b/src/GCodes/GCodeBuffer.h @@ -46,6 +46,8 @@ public: bool PushState(); // Push state returning true if successful (i.e. stack not overflowed) bool PopState(); // Pop state returning true if successful (i.e. no stack underrun) bool IsDoingFileMacro() const; // Return true if this source is executing a file macro + GCodeState GetState() const; + void SetState(GCodeState newState); private: @@ -106,4 +108,14 @@ inline void GCodeBuffer::SetWritingFileDirectory(const char* wfd) writingFileDirectory = wfd; } +inline GCodeState GCodeBuffer::GetState() const +{ + return machineState->state; +} + +inline void GCodeBuffer::SetState(GCodeState newState) +{ + machineState->state = newState; +} + #endif /* GCODEBUFFER_H_ */ |