forked from cgwood/ArdustationMega
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pagesRover.h
86 lines (64 loc) · 2 KB
/
pagesRover.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
/*
* pagesRover.h
*
* Created on: 20 Oct 2013
* Author: Colin
*/
#ifndef PAGESROVER_H_
#define PAGESROVER_H_
// Parameters Page
class PageRoverParameters :
public Pages {
public:
PageRoverParameters();
protected:
/// One off function, executes on page enter
virtual uint8_t _enter();
/// Force update the page
virtual uint8_t _forceUpdate(uint8_t reason);
/// One off function, executes on uav type change
virtual uint8_t _redefine();
/// refresh page - medium items (10Hz)
virtual uint8_t _refresh_med();
/// refresh page - slow items (0.5 Hz)
virtual uint8_t _refresh_slow();
/// Interact with the page
virtual uint8_t _interact(uint8_t buttonid);
protected:
void _clearMarker(void);
void _paintMarker(void);
void _drawLocal();
void _alterLocal(float alterMag);
void _redrawLocal();
void _voidLocal(void);
void _uploadConfirm(void);
void _uploadLocal(void);
private:
/// current state of the internal navigation state machine
uint8_t _state;
/// Local editing temp value
///
float _value_temp;
int _value_encoder;
/// Availability of paramter values
bool _avail[PARAM_COUNT_ROVER];
/// Position on the screen when scrolling
/// Refers to first value out of four being displayed
uint8_t _stateFirstVal;
protected:
/// flag indicating that the data the page should be redrawn
bool _updated;
/// timestamp of the last page redraw, used to rate-limit redraw operations
unsigned long _lastRedraw;
/// text to be displayed for APM settings, up to xxx characters
const prog_char *_textHeader;
/// Types to be displayed (in same order as _textHeader)
uint8_t _Types[PARAM_COUNT_ROVER];
/// Scaling for values, e.g. / 1000 is -3
uint8_t *_scale;
/// How many decimal places the value is given
uint8_t *_decPos;
/// How many parameters there are
uint8_t _paramCount;
};
#endif /* PAGESROVER_H_ */