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
|
|
|
|
|
2021-09-17 02:29:43 +02:00
|
|
|
class BleFingerprint;
|
|
|
|
|
2021-08-23 15:48:40 +02:00
|
|
|
class GUI
|
|
|
|
{
|
|
|
|
public:
|
2022-03-06 17:48:04 +01:00
|
|
|
static void setup();
|
2022-01-23 18:38:05 +01:00
|
|
|
|
2022-03-06 17:48:04 +01:00
|
|
|
static void added(BleFingerprint *f);
|
|
|
|
static void removed(BleFingerprint *f);
|
|
|
|
static void close(BleFingerprint *f);
|
|
|
|
static void left(BleFingerprint *f);
|
2021-09-15 18:11:32 +02:00
|
|
|
|
2022-03-06 17:48:04 +01:00
|
|
|
static void erasing();
|
|
|
|
static void erased();
|
2021-09-17 00:18:15 +02:00
|
|
|
|
2022-03-06 17:48:04 +01:00
|
|
|
static void seenStart();
|
|
|
|
static void seenEnd();
|
2021-09-15 18:11:32 +02:00
|
|
|
|
2022-03-06 17:48:04 +01:00
|
|
|
static void updateStart();
|
|
|
|
static void updateProgress(unsigned int percent);
|
|
|
|
static void updateEnd();
|
2021-09-17 00:18:15 +02:00
|
|
|
|
2022-03-06 17:48:04 +01:00
|
|
|
static void connecting();
|
|
|
|
static void connected(bool wifi, bool mqtt);
|
2021-09-17 00:18:15 +02:00
|
|
|
|
2022-03-06 17:48:04 +01:00
|
|
|
static void status(const char *message, ...);
|
2022-01-23 18:38:05 +01:00
|
|
|
|
2022-03-06 17:48:04 +01:00
|
|
|
static bool statusLed;
|
2021-08-23 15:48:40 +02:00
|
|
|
|
2022-03-14 02:54:50 +01:00
|
|
|
static void plusOne(BleFingerprint *f);
|
|
|
|
static void minusOne(BleFingerprint *f);
|
|
|
|
|
2021-08-23 15:48:40 +02:00
|
|
|
private:
|
2022-03-06 17:48:04 +01:00
|
|
|
static void begin();
|
2021-11-15 00:54:19 +01:00
|
|
|
|
2022-03-06 17:48:04 +01:00
|
|
|
static bool init;
|
2021-08-23 15:48:40 +02:00
|
|
|
#ifdef M5STICK
|
2022-03-06 17:48:04 +01:00
|
|
|
static bool dirty;
|
|
|
|
static TFT_eSprite sprite;
|
2021-08-23 15:48:40 +02:00
|
|
|
#endif
|
|
|
|
};
|
2021-09-14 03:22:00 +02:00
|
|
|
#endif
|