some formatting

This commit is contained in:
André Fiedler 2025-02-12 09:38:47 +01:00
parent d0eada7a40
commit 7006b39724
9 changed files with 141 additions and 139 deletions

View File

@ -57,7 +57,8 @@ bool NFC::connecttoCard()
byte ats[16];
byte atsLength = 16;
MFRC522::StatusCode state = rfid->PICC_RequestATS(ats, &atsLength);
if (state != MFRC522::STATUS_OK) {
if (state != MFRC522::STATUS_OK)
{
Serial.println(F("Failed ATS"));
Serial.println(state);
rfid->PICC_HaltA();

View File

@ -8,7 +8,6 @@
class NFC
{
private:
MFRC522::Uid uid;
byte pcb = 0x0A;
byte cid = 0x00;

View File

@ -89,7 +89,8 @@ void OTAProxy::cancelOTA()
MFRC522::Uid uid = nfc->getUID();
mqtt->publish(topic_cancelOTA, uid.uidByte, uid.size);
while(!(nfc->disconnectCard()));
while (!(nfc->disconnectCard()))
;
activeOTA = false;
Serial.println("Cancel OTA");

View File

@ -13,6 +13,7 @@ class OTAProxy
NFC *nfc;
int id;
char msg[MSG_BUFFER_SIZE];
public:
OTAProxy(PubSubClient *mqtt, NFC *nfc, int id);
bool hasActiveOTA();