diff options
author | David Crocker <dcrocker@eschertech.com> | 2019-09-06 11:22:16 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2019-09-06 11:22:16 +0300 |
commit | 74ee9cf3b40e1435ab9c3c3fe81545a44d52a475 (patch) | |
tree | 235b01138c1fae0c810f357a6bddb3d6c51df9e8 /src/Endstops/EndstopsManager.h | |
parent | b7ea6828474f6ac8b4fa3099d19743ea9e1b3c5e (diff) |
More Duet 3 work
Fixed bug with running out of DMs when using extruders on expansion boards
Refactored Z probe code ready to support remote Z probes
Diffstat (limited to 'src/Endstops/EndstopsManager.h')
-rw-r--r-- | src/Endstops/EndstopsManager.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Endstops/EndstopsManager.h b/src/Endstops/EndstopsManager.h index 63f8dc06..80cdab2a 100644 --- a/src/Endstops/EndstopsManager.h +++ b/src/Endstops/EndstopsManager.h @@ -12,6 +12,7 @@ #include "EndstopDefs.h" #include "ZProbeProgrammer.h" #include "GCodes/GCodeResult.h" +#include <RTOSIface/RTOSIface.h> // Endstop manager class class EndstopsManager @@ -50,7 +51,6 @@ public: GCodeResult HandleM558(GCodeBuffer& gb, const StringRef &reply); // M558 GCodeResult HandleG31(GCodeBuffer& gb, const StringRef& reply); // G31 - bool AssignZProbePorts(GCodeBuffer& gb, const StringRef& reply, size_t probeNumber); ZProbe& GetCurrentZProbe() const { return *zProbes[currentZProbeNumber]; } ZProbe *GetZProbe(size_t num) const; void SetZProbeDefaults(); @@ -67,6 +67,11 @@ private: // Translate end stop result to text static const char *TranslateEndStopResult(EndStopHit es, bool atHighEnd); + ReadLockedPointer<ZProbe> FindZProbe(size_t index) const; + ReadLockedPointer<Endstop> FindEndstop(size_t axis) const; + + static ReadWriteLock endstopsLock; // used to lock both endstops and Z probes + EndstopOrZProbe * volatile activeEndstops; // linked list of endstops and Z probes that are active for the current move size_t currentZProbeNumber; // which Z probe we are using |