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 ats[16];
byte atsLength = 16; byte atsLength = 16;
MFRC522::StatusCode state = rfid->PICC_RequestATS(ats, &atsLength); 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(F("Failed ATS"));
Serial.println(state); Serial.println(state);
rfid->PICC_HaltA(); rfid->PICC_HaltA();

View File

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

View File

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

View File

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