Reworks the graphics of the NFC-Tag reading process of spool and location tags. Introduces progress bar for reading process. Also first re-work of the spoolman availability (not fixed completly yet). Also fixes an issue where the API request to spoolman and octoprint was sent in parallel. This now happens sequentially to reduce heap load.
30 lines
569 B
C
30 lines
569 B
C
#ifndef NFC_H
|
|
#define NFC_H
|
|
|
|
#include <Arduino.h>
|
|
|
|
typedef enum{
|
|
NFC_IDLE,
|
|
NFC_READING,
|
|
NFC_READ_SUCCESS,
|
|
NFC_READ_ERROR,
|
|
NFC_WRITING,
|
|
NFC_WRITE_SUCCESS,
|
|
NFC_WRITE_ERROR
|
|
} nfcReaderStateType;
|
|
|
|
void startNfc();
|
|
void scanRfidTask(void * parameter);
|
|
void startWriteJsonToTag(const char* payload);
|
|
|
|
extern TaskHandle_t RfidReaderTask;
|
|
extern String nfcJsonData;
|
|
extern String activeSpoolId;
|
|
extern String lastSpoolId;
|
|
extern volatile nfcReaderStateType nfcReaderState;
|
|
extern volatile bool pauseBambuMqttTask;
|
|
extern bool tagProcessed;
|
|
|
|
|
|
|
|
#endif |