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>2019-09-15 11:36:03 +0300
committerDavid Crocker <dcrocker@eschertech.com>2019-09-15 11:36:03 +0300
commit6941819ed6cbce7a26e877fc118f0f8d40472901 (patch)
treea43b22cec434e62d30ae6aab3115f2f306944338 /src/Endstops/ZProbeEndstop.h
parent2b0ee17e0b5f32a936b2c6f3dafc37685673adbc (diff)
Refactoring
Refactored endstop source files in preparation for supporting remote endstops on Duet 3
Diffstat (limited to 'src/Endstops/ZProbeEndstop.h')
-rw-r--r--src/Endstops/ZProbeEndstop.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/Endstops/ZProbeEndstop.h b/src/Endstops/ZProbeEndstop.h
new file mode 100644
index 00000000..cdad49e5
--- /dev/null
+++ b/src/Endstops/ZProbeEndstop.h
@@ -0,0 +1,33 @@
+/*
+ * ZProbeEndstop.h
+ *
+ * Created on: 15 Sep 2019
+ * Author: David
+ */
+
+#ifndef SRC_ENDSTOPS_ZPROBEENDSTOP_H_
+#define SRC_ENDSTOPS_ZPROBEENDSTOP_H_
+
+#include "Endstop.h"
+
+class ZProbeEndstop final : public Endstop
+{
+public:
+ void* operator new(size_t sz) { return Allocate<ZProbeEndstop>(); }
+ void operator delete(void* p) { Release<ZProbeEndstop>(p); }
+
+ ZProbeEndstop(uint8_t axis, EndStopPosition pos);
+
+ EndStopInputType GetEndstopType() const override { return EndStopInputType::zProbeAsEndstop; }
+ EndStopHit Stopped() const override;
+ void Prime(const Kinematics& kin, const AxisDriversConfig& axisDrivers) override;
+ EndstopHitDetails CheckTriggered(bool goingSlow) override;
+ bool Acknowledge(EndstopHitDetails what) override;
+ void AppendDetails(const StringRef& str) override;
+
+private:
+ size_t zProbeNumber; // which Z probe to use, always 0 for now
+ bool stopAll;
+};
+
+#endif /* SRC_ENDSTOPS_ZPROBEENDSTOP_H_ */