diff options
Diffstat (limited to 'src/Tools/Spindle.cpp')
-rw-r--r-- | src/Tools/Spindle.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Tools/Spindle.cpp b/src/Tools/Spindle.cpp index ae20b2bd..4ecb3027 100644 --- a/src/Tools/Spindle.cpp +++ b/src/Tools/Spindle.cpp @@ -8,20 +8,20 @@ #include "Spindle.h" // Allocate the pins returning true if successful -bool Spindle::AllocatePins(GCodeBuffer& gb, const StringRef& reply) +bool Spindle::AllocatePins(GCodeBuffer& gb, const StringRef& reply) noexcept { IoPort * const ports[] = { &spindleForwardPort, &spindleReversePort }; const PinAccess access[] = { PinAccess::pwm, PinAccess::pwm }; return IoPort::AssignPorts(gb, reply, PinUsedBy::spindle, 2, ports, access); } -void Spindle::SetFrequency(PwmFrequency freq) +void Spindle::SetFrequency(PwmFrequency freq) noexcept { spindleForwardPort.SetFrequency(freq); spindleReversePort.SetFrequency(freq); } -void Spindle::SetRpm(float rpm) +void Spindle::SetRpm(float rpm) noexcept { const float pwm = abs(rpm / maxRpm); if (rpm >= 0.0) @@ -37,7 +37,7 @@ void Spindle::SetRpm(float rpm) currentRpm = configuredRpm = rpm; } -void Spindle::TurnOff() +void Spindle::TurnOff() noexcept { spindleReversePort.WriteAnalog(0.0); spindleForwardPort.WriteAnalog(0.0); |