door controller
This commit is contained in:
parent
cc5c44c8e2
commit
752cdf3194
1 changed files with 5 additions and 6 deletions
11
src/main.cpp
11
src/main.cpp
|
@ -12,22 +12,23 @@ void commandLockDoor() {
|
||||||
;
|
;
|
||||||
if (!settings.DoorDisabled()) {
|
if (!settings.DoorDisabled()) {
|
||||||
lockDoor();
|
lockDoor();
|
||||||
|
Serial.println("DOOR_LOCK_STATUS=" + stateDoor() );
|
||||||
} else {
|
} else {
|
||||||
Serial.println("LOG_MSG=Door Disabled Ignoring Command");
|
Serial.println("LOG_MSG=Door Disabled Ignoring Command");
|
||||||
}
|
}
|
||||||
Serial.println("DOOR_LOCK_STATUS=" + stateDoor() );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void commandUnlockDoor() {
|
void commandUnlockDoor() {
|
||||||
// Add code to unlock the door here (e.g., deactivate a relay, if applicable)
|
// Add code to unlock the door here (e.g., deactivate a relay, if applicable)
|
||||||
if (!settings.DoorDisabled()) {
|
if (!settings.DoorDisabled()) {
|
||||||
unlockDoor(false);
|
unlockDoor(false);
|
||||||
|
Serial.println("DOOR_LOCK_STATUS=" + stateDoor());
|
||||||
delay(RELAY_DELAY);
|
delay(RELAY_DELAY);
|
||||||
lockDoor();
|
lockDoor();
|
||||||
|
Serial.println("DOOR_LOCK_STATUS=" + stateDoor());
|
||||||
} else {
|
} else {
|
||||||
Serial.println("LOG_MSG=Door Disabled Ignoring Command");
|
Serial.println("LOG_MSG=Door Disabled Ignoring Command");
|
||||||
}
|
}
|
||||||
Serial.println("DOOR_LOCK_STATUS=" + stateDoor());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void commandToggleDoor() {
|
void commandToggleDoor() {
|
||||||
|
@ -35,15 +36,13 @@ void commandToggleDoor() {
|
||||||
;
|
;
|
||||||
if (!settings.DoorDisabled()) {
|
if (!settings.DoorDisabled()) {
|
||||||
toggleDoor();
|
toggleDoor();
|
||||||
delay(RELAY_DELAY);
|
Serial.println("DOOR_LOCK_STATUS=" + stateDoor() );
|
||||||
} else {
|
} else {
|
||||||
Serial.println("LOG_MSG=Door Disabled Ignoring Command");
|
Serial.println("LOG_MSG=Door Disabled Ignoring Command");
|
||||||
}
|
}
|
||||||
Serial.println("DOOR_LOCK_STATUS=" + stateDoor() );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void commandLockStateDoor() {
|
void commandLockStateDoor() {
|
||||||
// Add code to get door state
|
// Add code to get door state
|
||||||
Serial.println("DOOR_LOCK_STATUS=" + stateDoor());
|
Serial.println("DOOR_LOCK_STATUS=" + stateDoor());
|
||||||
|
|
Loading…
Reference in a new issue