-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathScreenTask.h
More file actions
72 lines (59 loc) · 1.8 KB
/
ScreenTask.h
File metadata and controls
72 lines (59 loc) · 1.8 KB
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
#pragma once
#include "SPI.h"
#include "TFT_eSPI.h"
#include "SystemStructs.h"
#include "SystemMeasurementTask.h"
#include <Arduino.h>
// #include "Lib/Fontslib.h"
namespace ScreenCtrl {
class ScreenTask {
public:
ScreenTask() {
BatteryBits.Flags = 0x00;
}
~ScreenTask() {}
void IntScreen();
void WelcomeMessage();
void DrawDefaultScreen();
void OperationalTask();
void PowerOnCommand();
SystemMeasurementTask SysMeasurements;
private:
TFT_eSPI tft = TFT_eSPI();
void FillBat(decltype(TFT_GREEN), bool Override = false);
void PowerflowGraph();
void DrawLoadLine(decltype(TFT_WHITE));
void DrawChargeLine(decltype(TFT_GREEN));
void LoadLine(decltype(TFT_WHITE));
void ChargeLine(decltype(TFT_WHITE));
void BatteryModeTask();
void BatChargeTask();
void DisplayData();
void BatteryLowMessage();
void OverLoadMessage();
unsigned long LoadAnimatetimer{0},
ChargeAnimatetimer{0},
LoadArrowTimer{0},
DataRefreshTimer{0},
BatRefreshTimer{0},
OverloadTimer{0},
ChargeArrowTimer{0};
bool checkErrState {false};
int PrevLoad{ -1},
prevCharge{ -1};
BatSegFields BatteryBits;
ArrowposDat LoadArrowPos = ArrowposDat(224, 218, 218, 148, 142, 154);
ArrowposDat ChargeArrowPos = ArrowposDat(35, 29, 41, 124, 118, 118);
StateBits BatNormBit;
StateBits SegChargeBits;
StateBits ChargeBits;
PrevStateBits BatNormPrevState{PrevStateBits::clear_state};
PrevStateBits ChargePrevState{PrevStateBits::clear_state};
bool loadAnimate{false},
ChargeAnimate{false},
LoadarrowSwitch{false},
ChargearrowSwitch{false},
CautionFlag{false},
InverterFanState{false};
};
}//end of namespace