diff --git a/src/main.cpp b/src/main.cpp index 1808d6a..5ba57d3 100644 --- a/src/main.cpp +++ b/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());