when disabled do not send request
This commit is contained in:
parent
905907d8e4
commit
05b9eaf52c
1 changed files with 8 additions and 6 deletions
14
src/main.cpp
14
src/main.cpp
|
@ -611,11 +611,6 @@ void setup() {
|
||||||
bool isFirstRun = true; // Declare the missing variable
|
bool isFirstRun = true; // Declare the missing variable
|
||||||
|
|
||||||
void updateDoorStatus() {
|
void updateDoorStatus() {
|
||||||
|
|
||||||
|
|
||||||
bool previousgetDoorDisabled = false; // Declare the missing variable
|
|
||||||
bool isFirstRun = true; // Declare the missing variable
|
|
||||||
|
|
||||||
if (settings.getDoorDisabled() != previousgetDoorDisabled && !isFirstRun) {
|
if (settings.getDoorDisabled() != previousgetDoorDisabled && !isFirstRun) {
|
||||||
|
|
||||||
#ifdef SERIAL_DEBUG
|
#ifdef SERIAL_DEBUG
|
||||||
|
@ -728,7 +723,14 @@ void loop() {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef TINANCE2_BACKEND
|
#ifdef TINANCE2_BACKEND
|
||||||
tinance2authrequest(String(fullCardID), String(cardID));
|
if (settings.getDoorDisabled()) {
|
||||||
|
#ifdef SERIAL_DEBUG
|
||||||
|
Serial.println("Door is disabled. Not sending request to Tinance2");
|
||||||
|
#endif
|
||||||
|
} else {
|
||||||
|
tinance2authrequest(String(fullCardID), String(cardID));
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef LOCAL_ACL
|
#ifdef LOCAL_ACL
|
||||||
|
|
Loading…
Reference in a new issue