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:
authorDavid Crocker <dcrocker@eschertech.com>2020-01-04 21:15:22 +0300
committerDavid Crocker <dcrocker@eschertech.com>2020-01-04 21:15:22 +0300
commit5bd28a1aea25e83e6e1d7a0ca50cd000e7baf1a7 (patch)
tree059d11bfc384d80c7ff07d3457e994ac50a0c07e /src/Endstops/StallDetectionEndstop.cpp
parent8ded9143fa9d07dcddd525683403980c42881f1a (diff)
Conditional GCode fixes and exception specifiers
Loops are now working Added noexcept specifiers to omst of the remaining C++ source files
Diffstat (limited to 'src/Endstops/StallDetectionEndstop.cpp')
-rw-r--r--src/Endstops/StallDetectionEndstop.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/Endstops/StallDetectionEndstop.cpp b/src/Endstops/StallDetectionEndstop.cpp
index f47b5b8d..47a065ce 100644
--- a/src/Endstops/StallDetectionEndstop.cpp
+++ b/src/Endstops/StallDetectionEndstop.cpp
@@ -11,24 +11,24 @@
#include "Movement/Kinematics/Kinematics.h"
// Stall detection endstop
-StallDetectionEndstop::StallDetectionEndstop(uint8_t axis, EndStopPosition pos, bool p_individualMotors)
+StallDetectionEndstop::StallDetectionEndstop(uint8_t axis, EndStopPosition pos, bool p_individualMotors) noexcept
: Endstop(axis, pos), driversMonitored(0), individualMotors(p_individualMotors)
{
}
-StallDetectionEndstop::StallDetectionEndstop()
+StallDetectionEndstop::StallDetectionEndstop() noexcept
: Endstop(NO_AXIS, EndStopPosition::noEndStop), driversMonitored(0), individualMotors(false), stopAll(true)
{
}
// Test whether we are at or near the stop
-EndStopHit StallDetectionEndstop::Stopped() const
+EndStopHit StallDetectionEndstop::Stopped() const noexcept
{
return ((GetStalledDrivers() & driversMonitored) != 0) ? EndStopHit::atStop : EndStopHit::noStop;
}
// This is called to prime axis endstops
-bool StallDetectionEndstop::Prime(const Kinematics& kin, const AxisDriversConfig& axisDrivers)
+bool StallDetectionEndstop::Prime(const Kinematics& kin, const AxisDriversConfig& axisDrivers) noexcept
{
// Find which drivers are relevant, and decide whether we stop just the driver, just the axis, or everything
stopAll = (kin.GetConnectedAxes(GetAxis()) & ~MakeBitmap<AxesBitmap>(GetAxis())) != 0;
@@ -44,7 +44,7 @@ bool StallDetectionEndstop::Prime(const Kinematics& kin, const AxisDriversConfig
// Check whether the endstop is triggered and return the action that should be performed. Called from the step ISR.
// Note, the result will not necessarily be acted on because there may be a higher priority endstop!
-EndstopHitDetails StallDetectionEndstop::CheckTriggered(bool goingSlow)
+EndstopHitDetails StallDetectionEndstop::CheckTriggered(bool goingSlow) noexcept
{
EndstopHitDetails rslt; // initialised by default constructor
const DriversBitmap relevantStalledDrivers = driversMonitored & GetStalledDrivers();
@@ -95,7 +95,7 @@ EndstopHitDetails StallDetectionEndstop::CheckTriggered(bool goingSlow)
// This is called by the ISR to acknowledge that it is acting on the return from calling CheckTriggered. Called from the step ISR.
// Return true if we have finished with this endstop or probe in this move.
-bool StallDetectionEndstop::Acknowledge(EndstopHitDetails what)
+bool StallDetectionEndstop::Acknowledge(EndstopHitDetails what) noexcept
{
switch (what.GetAction())
{
@@ -113,12 +113,12 @@ bool StallDetectionEndstop::Acknowledge(EndstopHitDetails what)
}
}
-void StallDetectionEndstop::AppendDetails(const StringRef& str)
+void StallDetectionEndstop::AppendDetails(const StringRef& str) noexcept
{
str.cat((individualMotors) ? "motor stall (individual motors)" : "motor stall (any motor)");
}
-void StallDetectionEndstop::SetDrivers(DriversBitmap extruderDrivers)
+void StallDetectionEndstop::SetDrivers(DriversBitmap extruderDrivers) noexcept
{
driversMonitored = extruderDrivers;
stopAll = true;