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()) {
|
||||
lockDoor();
|
||||
Serial.println("DOOR_LOCK_STATUS=" + stateDoor() );
|
||||
} else {
|
||||
Serial.println("LOG_MSG=Door Disabled Ignoring Command");
|
||||
}
|
||||
Serial.println("DOOR_LOCK_STATUS=" + stateDoor() );
|
||||
}
|
||||
|
||||
void commandUnlockDoor() {
|
||||
// Add code to unlock the door here (e.g., deactivate a relay, if applicable)
|
||||
if (!settings.DoorDisabled()) {
|
||||
unlockDoor(false);
|
||||
Serial.println("DOOR_LOCK_STATUS=" + stateDoor());
|
||||
delay(RELAY_DELAY);
|
||||
lockDoor();
|
||||
Serial.println("DOOR_LOCK_STATUS=" + stateDoor());
|
||||
} else {
|
||||
Serial.println("LOG_MSG=Door Disabled Ignoring Command");
|
||||
}
|
||||
Serial.println("DOOR_LOCK_STATUS=" + stateDoor());
|
||||
}
|
||||
|
||||
void commandToggleDoor() {
|
||||
|
@ -35,15 +36,13 @@ void commandToggleDoor() {
|
|||
;
|
||||
if (!settings.DoorDisabled()) {
|
||||
toggleDoor();
|
||||
delay(RELAY_DELAY);
|
||||
Serial.println("DOOR_LOCK_STATUS=" + stateDoor() );
|
||||
} else {
|
||||
Serial.println("LOG_MSG=Door Disabled Ignoring Command");
|
||||
}
|
||||
Serial.println("DOOR_LOCK_STATUS=" + stateDoor() );
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
void commandLockStateDoor() {
|
||||
// Add code to get door state
|
||||
Serial.println("DOOR_LOCK_STATUS=" + stateDoor());
|
||||
|
|
Loading…
Reference in a new issue