diff options
author | David Crocker <dcrocker@eschertech.com> | 2020-10-24 12:42:47 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2020-10-24 12:42:47 +0300 |
commit | dc81816404bff70668f6c769b02a7ecb9208d989 (patch) | |
tree | e74f76f9e1ee05dd2fe5b25a1d69c7f5ef3a6299 /src/GCodes/GCodeBuffer | |
parent | a1991e80c388f78194db12a611121ab814bac67f (diff) |
Got rid of some code analysis and compiler warnings
Diffstat (limited to 'src/GCodes/GCodeBuffer')
-rw-r--r-- | src/GCodes/GCodeBuffer/GCodeBuffer.cpp | 4 | ||||
-rw-r--r-- | src/GCodes/GCodeBuffer/GCodeBuffer.h | 5 |
2 files changed, 4 insertions, 5 deletions
diff --git a/src/GCodes/GCodeBuffer/GCodeBuffer.cpp b/src/GCodes/GCodeBuffer/GCodeBuffer.cpp index 87c126d6..b1a32939 100644 --- a/src/GCodes/GCodeBuffer/GCodeBuffer.cpp +++ b/src/GCodes/GCodeBuffer/GCodeBuffer.cpp @@ -84,7 +84,7 @@ const char *GCodeBuffer::GetStateText() const noexcept // Create a default GCodeBuffer GCodeBuffer::GCodeBuffer(GCodeChannel::RawType channel, GCodeInput *normalIn, FileGCodeInput *fileIn, MessageType mt, Compatibility::RawType c) noexcept - : codeChannel(channel), normalInput(normalIn), whenReportDueTimerStarted(millis()), + : codeChannel(channel), normalInput(normalIn), #if HAS_MASS_STORAGE fileInput(fileIn), #endif @@ -93,7 +93,7 @@ GCodeBuffer::GCodeBuffer(GCodeChannel::RawType channel, GCodeInput *normalIn, Fi binaryParser(*this), #endif stringParser(*this), - machineState(new GCodeMachineState()), + machineState(new GCodeMachineState()), whenReportDueTimerStarted(millis()), #if HAS_LINUX_INTERFACE isBinaryBuffer(false), #endif diff --git a/src/GCodes/GCodeBuffer/GCodeBuffer.h b/src/GCodes/GCodeBuffer/GCodeBuffer.h index 4b37981a..9933e31b 100644 --- a/src/GCodes/GCodeBuffer/GCodeBuffer.h +++ b/src/GCodes/GCodeBuffer/GCodeBuffer.h @@ -240,6 +240,8 @@ private: GCodeMachineState *machineState; // Machine state for this gcode source uint32_t whenTimerStarted; // When we started waiting + uint32_t whenReportDueTimerStarted; // When the report-due-timer has been started + static constexpr uint32_t reportDueInterval = 1000; // Interval in which we send in ms #if HAS_LINUX_INTERFACE bool isBinaryBuffer; @@ -247,9 +249,6 @@ private: bool timerRunning; // True if we are waiting bool motionCommanded; // true if this GCode stream has commanded motion since it last waited for motion to stop - uint32_t whenReportDueTimerStarted; // When the report-due-timer has been started - static constexpr uint32_t reportDueInterval = 1000; // Interval in which we send in ms - #if HAS_LINUX_INTERFACE alignas(4) char buffer[MaxCodeBufferSize]; // must be aligned because we do dword fetches from it #else |