-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuiITR.h
116 lines (98 loc) · 2.44 KB
/
uiITR.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
/**
* @file uiITR.h
* @support (support@xinabox.cc)
* @brief Class for displaying information to OD01 on XK07 Flight Station
*/
#ifndef uiITR_h
#define uiITR_h
#define OD01_ADRESS 0x3C
#include "Arduino.h"
#include <xCore.h> // https://github.com/xinabox/arduino-CORE
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
//#include "global.h"
#define SSD1306_128_64
class uiITR// : public Adafruit_SSD1306
{
public:
/**
* @brief Construct a new ui XK07 object
*
*/
uiITR();
/**
* @brief Destroy the log XK07 object
*
*/
~uiITR();
bool begin();
/**
* @brief
*
*/
void drawXinaBoxLogo(void);
/**
* @brief
*
*/
void drawWiFiConnected(void);
/**
* @brief
*
*/
void drawConfigSaved(void);
/**
* @brief
*
* @param _countDown
*/
void drawConnectingWiFi(uint8_t _countDown);
/**
* @brief
*
*/
void drawProvisionSuccess(void);
/**
* @brief
*
*/
void drawConnectingWiFi(void);
void drawLogoFS(void);
void drawLogoGS(void);
void setFirmwareVersion(String _firmwareVersion);
void drawPixel(int16_t, int16_t, uint16_t);
void iconAndString(const uint8_t *bitmap, const char* str, int x = 112, int y = 56, int x1 = 8, int y1 = 13);
void connectingToWifi(const char* str);
void wifiPass(const char* str);
void wifiFail(const char* str);
void loading(const char* str);
void provFail(const char *str);
void provPass(const char *str);
void fsPass(const char* str);
void fsFail(const char* str);
void fsConnecting(const char* str);
void almDownloading(const char* str);
void almDownloaded(const char* str);
void almDownloadedFail(const char* str);
void info(uint8_t mode, String time, String data, String rssi, String batPercentage);
void sn01(uint8_t status, String lat, String lon, String alt);
void si01(bool status, String a, String x, String z);
void sw01(bool status, String temp, String hum, String pres);
void sg33(bool status, String co2, String voc);
void sl01(bool status, String lux, String uvi);
void sdPass();
void sdFail();
void clearScreen();
void uifs(bool sn01, bool sg33, bool si01, bool sw01, bool sl01, bool rl0x, bool pb04);
void sw01_bitmap();
void sg35(bool status, String p10, String p25, String p100);
void selectMode();
private:
// friend class FlightStation;
// friend class GroundStation;
uint8_t cnt;
String fsState="";
String firmwareVersion;
};
extern uiITR ui;
#endif