REVERSED Relay mode for ESTOP

This commit is contained in:
Matthew Frost 2023-06-21 22:56:33 +02:00
parent 59885577ee
commit 0a5c1a30f6

View file

@ -11,7 +11,11 @@ void unlockDoor(bool silent) {
}
#endif
#ifdef RELAY1
controlRelay(RELAY1_PIN,false);
#ifdef RELAY1_REVERSED
controlRelay(RELAY1_PIN,true);
#else
controlRelay(RELAY1_PIN,false);
#endif
#endif
#ifdef SERIAL_DEBUG
Serial.println("door unlocked");
@ -28,7 +32,14 @@ void unlockDoor(bool silent) {
void lockDoor() {
#ifdef RELAY1
controlRelay(RELAY1_PIN,true);
#ifdef RELAY1_REVERSED
controlRelay(RELAY1_PIN,false);
#else
controlRelay(RELAY1_PIN,true);
#endif
#endif
#ifdef SERIAL_DEBUG
Serial.println("door locked");