mirror of
https://gitlab.com/fabinfra/fabhardware/fabreader3.git
synced 2025-03-12 22:51:42 +01:00
some formatting
This commit is contained in:
parent
d0eada7a40
commit
7006b39724
@ -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();
|
||||||
|
@ -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;
|
||||||
|
@ -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");
|
||||||
|
@ -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();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user