REVERSED Relay mode for ESTOP
This commit is contained in:
parent
59885577ee
commit
0a5c1a30f6
1 changed files with 13 additions and 2 deletions
|
@ -11,7 +11,11 @@ void unlockDoor(bool silent) {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifdef RELAY1
|
#ifdef RELAY1
|
||||||
controlRelay(RELAY1_PIN,false);
|
#ifdef RELAY1_REVERSED
|
||||||
|
controlRelay(RELAY1_PIN,true);
|
||||||
|
#else
|
||||||
|
controlRelay(RELAY1_PIN,false);
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#ifdef SERIAL_DEBUG
|
#ifdef SERIAL_DEBUG
|
||||||
Serial.println("door unlocked");
|
Serial.println("door unlocked");
|
||||||
|
@ -28,7 +32,14 @@ void unlockDoor(bool silent) {
|
||||||
|
|
||||||
void lockDoor() {
|
void lockDoor() {
|
||||||
#ifdef RELAY1
|
#ifdef RELAY1
|
||||||
controlRelay(RELAY1_PIN,true);
|
|
||||||
|
|
||||||
|
#ifdef RELAY1_REVERSED
|
||||||
|
controlRelay(RELAY1_PIN,false);
|
||||||
|
#else
|
||||||
|
controlRelay(RELAY1_PIN,true);
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#ifdef SERIAL_DEBUG
|
#ifdef SERIAL_DEBUG
|
||||||
Serial.println("door locked");
|
Serial.println("door locked");
|
||||||
|
|
Loading…
Reference in a new issue