ESPresense/lib/BleFingerprint/GUI.h

61 lines
985 B
C
Raw Normal View History

2021-08-23 15:48:40 +02:00
#ifndef GUI_h
#define GUI_h
2021-09-15 18:11:32 +02:00
#include "BleFingerprint.h"
2021-08-23 15:48:40 +02:00
#include <Arduino.h>
#ifdef M5STICK
#ifdef PLUS
#include <M5StickCPlus.h>
#else
#include <M5StickC.h>
#endif
2021-09-17 00:18:15 +02:00
#elif defined M5ATOM
#include <M5Atom.h>
2021-08-23 15:48:40 +02:00
#endif
class BleFingerprint;
2021-08-23 15:48:40 +02:00
class GUI
{
public:
void setup();
2021-09-15 18:11:32 +02:00
void added(BleFingerprint *f);
void removed(BleFingerprint *f, long age);
2021-09-15 18:11:32 +02:00
void close(BleFingerprint *f);
void left(BleFingerprint *f);
2021-09-17 00:18:15 +02:00
void erasing();
void erased();
void seenStart();
void seenEnd();
2021-09-15 18:11:32 +02:00
void updateStart();
2021-09-17 00:18:15 +02:00
void updateProgress(unsigned int percent);
void updateEnd();
void connecting();
2021-08-23 15:48:40 +02:00
void connected(bool wifi, bool mqtt);
2021-09-17 00:18:15 +02:00
void status(const char *message, ...);
void blit();
void setStatusLed(bool enabled) { _statusLed = enabled; }
2021-08-23 15:48:40 +02:00
private:
bool _statusLed = true;
void begin();
2021-08-23 15:48:40 +02:00
bool init;
#ifdef M5STICK
2021-09-17 00:18:15 +02:00
bool dirty;
2021-08-23 15:48:40 +02:00
TFT_eSprite sprite = TFT_eSprite(&M5.Lcd);
#endif
};
extern GUI Display;
#endif