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-12-14 01:25:54 +0300
committerDavid Crocker <dcrocker@eschertech.com>2019-12-14 01:25:54 +0300
commit8ab811c4122a4fef46b7a6cd5bc410f484b5f2dd (patch)
treea3a681de83601e6e4d7cd8e4fa20b51c4ed468da
parentc3913a51be149ce0f8451017aa15c894684d8e1f (diff)
Fixed active low endstops on Duet 2
-rw-r--r--src/Endstops/SwitchEndstop.cpp1
-rw-r--r--src/Endstops/SwitchEndstop.h2
-rw-r--r--src/Version.h2
3 files changed, 3 insertions, 2 deletions
diff --git a/src/Endstops/SwitchEndstop.cpp b/src/Endstops/SwitchEndstop.cpp
index 747c8f41..b010b2f6 100644
--- a/src/Endstops/SwitchEndstop.cpp
+++ b/src/Endstops/SwitchEndstop.cpp
@@ -108,6 +108,7 @@ GCodeResult SwitchEndstop::Configure(const char *pinNames, const StringRef& repl
ReleasePorts();
return GCodeResult::error;
}
+ ports[numPortsUsed].SetInvert(inputType == EndStopInputType::activeLow);
}
++numPortsUsed;
diff --git a/src/Endstops/SwitchEndstop.h b/src/Endstops/SwitchEndstop.h
index 5fb2f623..cd4492be 100644
--- a/src/Endstops/SwitchEndstop.h
+++ b/src/Endstops/SwitchEndstop.h
@@ -46,7 +46,7 @@ private:
inline bool IsTriggered(size_t index) const
{
#if SUPPORT_CAN_EXPANSION
- return (boardNumbers[index] == CanId::MasterAddress) ? ports[index].Read() != activeLow : states[index] != activeLow;
+ return (boardNumbers[index] == CanId::MasterAddress) ? ports[index].Read() : states[index] != activeLow;
#else
return ports[index].Read();
#endif
diff --git a/src/Version.h b/src/Version.h
index 711177f1..5af122ef 100644
--- a/src/Version.h
+++ b/src/Version.h
@@ -20,7 +20,7 @@
#endif
#ifndef DATE
-# define DATE "2019-12-13b1"
+# define DATE "2019-12-13b2"
#endif
#define AUTHORS "reprappro, dc42, chrishamm, t3p3, dnewman, printm3d"