forked from DCC-EX/CommandStation-EX
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhmiTrain.h
50 lines (43 loc) · 1.09 KB
/
hmiTrain.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
/*
* La Box Project
* HMITrain Class
*
* @Author : Cedric Bellec
* @Organization : Locoduino.org
*/
#ifdef USE_HMI
#ifndef _HMITrain
#define _HMITrain
#include "Adafruit_GFX.h"
#include "Adafruit_SSD1306.h"
#include "hmiConfig.h"
class hmi;
class hmiTrain
{
public:
//----- Members
hmiTrain();
hmiTrain(hmi* _hmi);
hmi* display;
byte speed; // 0->128
byte mode; // Forward, back, stop
int addr; // train address
bool function[HMITrain_NbMaxFunctions+1]; // function state
int lastFunction ;
//----- functions
void begin();
void update();
void setHMIpointer(hmi* _hmi);
void setInfo(int addr, uint8_t order, uint8_t value, bool functionState = false);
void dashboard(int pos_x1, int pos_y1, int pos_x2, int pos_y2);
void dashboard1T();
void drawLightSymbol(int pos_x, int pos_y, int starSize);
void drawFunctionSymbol(int pos_x, int pos_y, int functionNumber);
hmiTrain & operator=(const hmiTrain & hmiTrain);
protected:
//----- Members
char message[LineCarNbMax];
//----- functions
};
#endif
#endif