bug payload
This commit is contained in:
parent
8e196676ea
commit
f9a6c4fec2
1 changed files with 10 additions and 6 deletions
16
src/main.cpp
16
src/main.cpp
|
@ -254,7 +254,7 @@ void handleData1Interrupt() {
|
|||
String payload = "{\"full_card_id\":\"" + String(fullCardID) + "\"}";
|
||||
// Send the HTTP request and get the response
|
||||
Tinance2HttpClient httpClient;
|
||||
std::pair<String, int> responsePair = httpClient.sendHttpRequest(tinance2_url_validatecard, "GET", "");
|
||||
std::pair<String, int> responsePair = httpClient.sendHttpRequest(tinance2_url_validatecard, "POST", payload);
|
||||
String response = responsePair.first;
|
||||
int httpResponseCode = responsePair.second;
|
||||
|
||||
|
@ -605,7 +605,10 @@ void setup() {
|
|||
void updateDoorStatus() {
|
||||
|
||||
|
||||
if (settings.DoorDisabled() != previousDoorDisabled || isFirstRun) {
|
||||
bool previousDoorDisabled = false; // Declare the missing variable
|
||||
bool isFirstRun = true; // Declare the missing variable
|
||||
|
||||
if (settings.DoorDisabled() != previousDoorDisabled && !isFirstRun) {
|
||||
|
||||
#ifdef SERIAL_DEBUG
|
||||
Serial.print("DoorDisabled setting changed to: ");
|
||||
|
@ -627,11 +630,12 @@ void setup() {
|
|||
#endif
|
||||
lockDoor();
|
||||
}
|
||||
|
||||
// Update the previousDoorDisabled variable
|
||||
previousDoorDisabled = settings.DoorDisabled();
|
||||
isFirstRun = false;
|
||||
}
|
||||
|
||||
// Update the previousDoorDisabled variable
|
||||
previousDoorDisabled = settings.DoorDisabled();
|
||||
isFirstRun = false;
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue