diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/FilamentMonitors/Duet3DFilamentMonitor.cpp | 4 | ||||
-rw-r--r-- | src/FilamentMonitors/Duet3DFilamentMonitor.h | 2 | ||||
-rw-r--r-- | src/GCodes/GCodeBuffer/GCodeBuffer.cpp | 4 | ||||
-rw-r--r-- | src/GCodes/GCodeBuffer/GCodeBuffer.h | 5 | ||||
-rw-r--r-- | src/GCodes/GCodes.h | 2 | ||||
-rw-r--r-- | src/GCodes/GCodes3.cpp | 2 | ||||
-rw-r--r-- | src/Heating/LocalHeater.cpp | 4 | ||||
-rw-r--r-- | src/Movement/DDA.cpp | 8 | ||||
-rw-r--r-- | src/Movement/DDARing.cpp | 8 | ||||
-rw-r--r-- | src/Movement/DriveMovement.cpp | 4 | ||||
-rw-r--r-- | src/Movement/DriveMovement.h | 5 | ||||
-rw-r--r-- | src/Tools/Tool.h | 2 |
12 files changed, 24 insertions, 26 deletions
diff --git a/src/FilamentMonitors/Duet3DFilamentMonitor.cpp b/src/FilamentMonitors/Duet3DFilamentMonitor.cpp index 7cd26c10..4e049452 100644 --- a/src/FilamentMonitors/Duet3DFilamentMonitor.cpp +++ b/src/FilamentMonitors/Duet3DFilamentMonitor.cpp @@ -27,8 +27,8 @@ #include "RepRap.h" // Constructors -Duet3DFilamentMonitor::Duet3DFilamentMonitor(unsigned int extruder, unsigned int type) noexcept - : FilamentMonitor(extruder, type), overrunErrorCount(0), polarityErrorCount(0) +Duet3DFilamentMonitor::Duet3DFilamentMonitor(unsigned int extruder, unsigned int p_type) noexcept + : FilamentMonitor(extruder, p_type), overrunErrorCount(0), polarityErrorCount(0) { InitReceiveBuffer(); } diff --git a/src/FilamentMonitors/Duet3DFilamentMonitor.h b/src/FilamentMonitors/Duet3DFilamentMonitor.h index 25aa7e16..8968e729 100644 --- a/src/FilamentMonitors/Duet3DFilamentMonitor.h +++ b/src/FilamentMonitors/Duet3DFilamentMonitor.h @@ -15,7 +15,7 @@ class Duet3DFilamentMonitor : public FilamentMonitor { public: - Duet3DFilamentMonitor(unsigned int extruder, unsigned int type) noexcept; + Duet3DFilamentMonitor(unsigned int extruder, unsigned int p_type) noexcept; bool Interrupt() noexcept override; 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 diff --git a/src/GCodes/GCodes.h b/src/GCodes/GCodes.h index 9c41de4b..09429b31 100644 --- a/src/GCodes/GCodes.h +++ b/src/GCodes/GCodes.h @@ -210,7 +210,7 @@ public: void SavePosition(RestorePoint& rp, const GCodeBuffer& gb) const noexcept; // Save position etc. to a restore point void SaveSpindleSpeeds(RestorePoint& rp) const noexcept; // Save spindle speeds to a restore point - void StartToolChange(GCodeBuffer& gb, int toolNum, uint8_t toolChangeParam) noexcept; + void StartToolChange(GCodeBuffer& gb, int toolNum, uint8_t param) noexcept; unsigned int GetWorkplaceCoordinateSystemNumber() const noexcept { return currentCoordinateSystem + 1; } diff --git a/src/GCodes/GCodes3.cpp b/src/GCodes/GCodes3.cpp index 035b6250..571156ec 100644 --- a/src/GCodes/GCodes3.cpp +++ b/src/GCodes/GCodes3.cpp @@ -269,7 +269,7 @@ GCodeResult GCodes::DefineGrid(GCodeBuffer& gb, const StringRef &reply) if (!seenX && !seenY && !seenR && !seenS && !seenP) { - ReadLocker locker(reprap.GetMove().heightMapLock); + ReadLocker rlocker(reprap.GetMove().heightMapLock); // Just print the existing grid parameters if (defaultGrid.IsValid()) diff --git a/src/Heating/LocalHeater.cpp b/src/Heating/LocalHeater.cpp index 2f6cb28d..929398a9 100644 --- a/src/Heating/LocalHeater.cpp +++ b/src/Heating/LocalHeater.cpp @@ -42,7 +42,7 @@ float tuningVoltageAccumulator; // sum of the voltage readings we take during LocalHeater::LocalHeater(unsigned int heaterNum) noexcept : Heater(heaterNum), mode(HeaterMode::off) { - ResetHeater(); + LocalHeater::ResetHeater(); SetHeater(0.0); // set up the pin even if the heater is not enabled (for PCCB) // Time the sensor was last sampled. During startup, we use the current @@ -52,7 +52,7 @@ LocalHeater::LocalHeater(unsigned int heaterNum) noexcept : Heater(heaterNum), m LocalHeater::~LocalHeater() noexcept { - SwitchOff(); + LocalHeater::SwitchOff(); port.Release(); } diff --git a/src/Movement/DDA.cpp b/src/Movement/DDA.cpp index 0937c959..03ff4bf8 100644 --- a/src/Movement/DDA.cpp +++ b/src/Movement/DDA.cpp @@ -141,15 +141,15 @@ void DDA::ReleaseDMs() noexcept // Normally there should be no active DMs, but release any that there may be for (DriveMovement* dm = activeDMs; dm != nullptr; ) { - DriveMovement* const next = dm->nextDM; + DriveMovement* const dnext = dm->nextDM; DriveMovement::Release(dm); - dm = next; + dm = dnext; } for (DriveMovement* dm = completedDMs; dm != nullptr; ) { - DriveMovement* const next = dm->nextDM; + DriveMovement* const dnext = dm->nextDM; DriveMovement::Release(dm); - dm = next; + dm = dnext; } activeDMs = completedDMs = nullptr; } diff --git a/src/Movement/DDARing.cpp b/src/Movement/DDARing.cpp index b839a0e1..4d72bb71 100644 --- a/src/Movement/DDARing.cpp +++ b/src/Movement/DDARing.cpp @@ -188,11 +188,11 @@ void DDARing::Spin(uint8_t simulationMode, bool shouldStartMove) noexcept // Do this here rather than at the end, so that when simulating, currentDda is non-null for most of the time and IsExtruding() returns the correct value if (simulationMode != 0) { - DDA * const cdda = currentDda; // currentDda is declared volatile, so copy it in the next line - if (cdda != nullptr) + DDA * const cdda2 = currentDda; // currentDda is declared volatile, so copy it in the next line + if (cdda2 != nullptr) { - simulationTime += (float)cdda->GetClocksNeeded()/StepTimer::StepClockRate; - cdda->Complete(); + simulationTime += (float)cdda2->GetClocksNeeded()/StepTimer::StepClockRate; + cdda2->Complete(); CurrentMoveCompleted(); } } diff --git a/src/Movement/DriveMovement.cpp b/src/Movement/DriveMovement.cpp index 046bed8d..08e18f3c 100644 --- a/src/Movement/DriveMovement.cpp +++ b/src/Movement/DriveMovement.cpp @@ -30,7 +30,7 @@ void DriveMovement::InitialAllocate(unsigned int num) noexcept ResetMinFree(); } -DriveMovement *DriveMovement::Allocate(size_t drive, DMState st) noexcept +DriveMovement *DriveMovement::Allocate(size_t p_drive, DMState st) noexcept { DriveMovement * const dm = freeList; if (dm != nullptr) @@ -42,7 +42,7 @@ DriveMovement *DriveMovement::Allocate(size_t drive, DMState st) noexcept minFree = numFree; } dm->nextDM = nullptr; - dm->drive = (uint8_t)drive; + dm->drive = (uint8_t)p_drive; dm->state = st; } return dm; diff --git a/src/Movement/DriveMovement.h b/src/Movement/DriveMovement.h index 9d7b8028..242f8a52 100644 --- a/src/Movement/DriveMovement.h +++ b/src/Movement/DriveMovement.h @@ -156,7 +156,7 @@ public: static int NumFree() noexcept { return numFree; } static int MinFree() noexcept { return minFree; } static void ResetMinFree() noexcept { minFree = numFree; } - static DriveMovement *Allocate(size_t drive, DMState st) noexcept; + static DriveMovement *Allocate(size_t p_drive, DMState st) noexcept; static void Release(DriveMovement *item) noexcept; private: @@ -173,8 +173,7 @@ private: DMState state; // whether this is active or not uint8_t drive; // the drive that this DM controls - uint8_t microstepShift : 4, // log2 of the microstepping factor (for when we use dynamic microstepping adjustment) - direction : 1, // true=forwards, false=backwards + uint8_t direction : 1, // true=forwards, false=backwards fullCurrent : 1, // true if the drivers are set to the full current, false if they are set to the standstill current isDelta : 1; // true if this DM uses segment-free delta kinematics uint8_t stepsTillRecalc; // how soon we need to recalculate diff --git a/src/Tools/Tool.h b/src/Tools/Tool.h index 537af80b..1fba89e7 100644 --- a/src/Tools/Tool.h +++ b/src/Tools/Tool.h @@ -116,7 +116,7 @@ protected: void Standby() noexcept; void FlagTemperatureFault(int8_t dudHeater) noexcept; void ClearTemperatureFault(int8_t wasDudHeater) noexcept; - void UpdateExtruderAndHeaterCount(uint16_t &extruders, uint16_t &heaters, uint16_t &numToolsToReport) const noexcept; + void UpdateExtruderAndHeaterCount(uint16_t &numExtruders, uint16_t &numHeaters, uint16_t &numToolsToReport) const noexcept; bool DisplayColdExtrudeWarning() noexcept; private: |