diff options
author | David Crocker <dcrocker@eschertech.com> | 2020-02-29 19:09:44 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2020-02-29 19:09:44 +0300 |
commit | 6e2e7164b031c14bf05869bf24a5a41e466d474a (patch) | |
tree | 058a8aa1e92924bc6d4f2a36192159798d2beb14 /src/Endstops/EndstopsManager.cpp | |
parent | 894b670d9a0813cc4c7866645b82f94674018c0e (diff) |
Still 3.01-RC3 provisional
Got remote BLTouch working
Bug fix: when endstops were already triggered, homing moved could hang
Bug fix: external SD card didn't work on Duet Maestro
Diffstat (limited to 'src/Endstops/EndstopsManager.cpp')
-rw-r--r-- | src/Endstops/EndstopsManager.cpp | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/Endstops/EndstopsManager.cpp b/src/Endstops/EndstopsManager.cpp index 9953da8b..d23fa5b3 100644 --- a/src/Endstops/EndstopsManager.cpp +++ b/src/Endstops/EndstopsManager.cpp @@ -728,8 +728,7 @@ size_t EndstopsManager::GetNumProbesToReport() const noexcept #if SUPPORT_CAN_EXPANSION // Handle signalling of a remote switch change, when the handle indicates that it is being used as an endstop. -// We must re-use or free the buffer. -void EndstopsManager::HandleRemoteInputChange(CanAddress src, uint8_t handleMajor, uint8_t handleMinor, bool state) noexcept +void EndstopsManager::HandleRemoteEndstopChange(CanAddress src, uint8_t handleMajor, uint8_t handleMinor, bool state) noexcept { if (handleMajor < ARRAY_SIZE(axisEndstops)) { @@ -741,9 +740,22 @@ void EndstopsManager::HandleRemoteInputChange(CanAddress src, uint8_t handleMajo } } +// Handle signalling of a remote switch change, when the handle indicates that it is being used as a Z probe. +void EndstopsManager::HandleRemoteZProbeChange(CanAddress src, uint8_t handleMajor, uint8_t handleMinor, bool state) noexcept +{ + if (handleMajor < ARRAY_SIZE(zProbes)) + { + ZProbe * const zp = zProbes[handleMajor]; + if (zp != nullptr) + { + zp->HandleRemoteInputChange(src, handleMinor, state); + } + } +} + // This is called when we update endstop states because of a message from a remote board. // In time we may use it to help implement interrupt-driven local endstops too, but for now those are checked in the step ISR by a direct call to DDA::CheckEndstops(). -void EndstopsManager::OnEndstopStatesChanged() noexcept +void EndstopsManager::OnEndstopOrZProbeStatesChanged() noexcept { const uint32_t oldPrio = ChangeBasePriority(NvicPriorityStep); // shut out the step interrupt @@ -758,7 +770,7 @@ void EndstopsManager::OnEndstopStatesChanged() noexcept } } - RestoreBasePriority(oldPrio); // allow step interrupts again + RestoreBasePriority(oldPrio); // allow step interrupts again } #endif |