11
11
#define ESOS_UIF14_H
12
12
# include <all_generic.h>
13
13
14
- // STRUCTURES
15
-
14
+ // this is the one data structure that is used throughout the UI
16
15
typedef struct {
17
16
BOOL b_SW1Pressed ;
18
17
BOOL b_SW1DoublePressed ;
19
18
BOOL b_SW2Pressed ;
20
19
BOOL b_SW2DoublePressed ;
21
20
BOOL b_SW3Pressed ;
22
21
BOOL b_SW3DoublePressed ;
23
- int16_t u16_doublePressUpperMs ; //upper time limit to be double pressed
22
+ int16_t u16_doublePressUpperMs ; //upper time limit to be double pressed
24
23
25
24
BOOL b_RPGALast ; // compared to current RPGA, used to detect rotation
26
- BOOL b_RPGFast ;
25
+ BOOL b_RPGFast ; //RPG is moving in the fast range
27
26
BOOL b_RPGMedium ;
28
- BOOL b_RPGSlow ;
27
+ BOOL b_RPGSlow ;
29
28
BOOL b_RPGNotMoving ;
30
29
uint16_t u16_RPGLastChangeMs ; //time of last RPGA change
31
30
uint16_t u16_RPGPeriodMs ; // time SINCE last RPGA change
32
31
uint16_t u16_RPGNotMovingToSlowPeriodMs ; //border between not moving and slow
33
32
uint16_t u16_RPGSlowToMediumPeriodMs ; //border between slow and medium
34
33
uint16_t u16_RPGMediumToFastPeriodMs ; //border between medium and fast
35
- BOOL b_RPGCW ; //clockwise rotation
36
- BOOL b_RPGCCW ; //counter clockwise
34
+ BOOL b_RPGCW ; //RPG clockwise rotation
35
+ BOOL b_RPGCCW ; //counter clockwise
37
36
int16_t i16_RPGCounter ; //notice signed int for counting CCW from start
38
- int16_t i16_lastRPGCounter ;
39
- BOOL b_RPGCWRev ; //T/F has RPG gone 1 full CW revolution?
37
+ int16_t i16_lastRPGCounter ;
38
+ BOOL b_RPGCWRev ; // has RPG gone 1 full CW revolution?
40
39
BOOL b_RPGCCWRev ;
41
-
42
- BOOL b_LED1On ;
43
- uint16_t u16_LED1FlashPeriod ; //period of one full one then off toggle
40
+ BOOL b_LED1On ;
41
+ uint16_t u16_LED1FlashPeriod ; //period of one full one then off toggle
44
42
BOOL b_LED1Flashing ;
45
43
46
44
BOOL b_LED2On ;
@@ -51,13 +49,13 @@ typedef struct {
51
49
uint16_t u16_LED3FlashPeriod ;
52
50
BOOL b_LED3Flashing ;
53
51
54
- } _st_esos_uiF14Data_t ;
52
+ } _st_esos_uiF14Data_t ; //the name of this data structure; it is instantiated in f14ui.c
55
53
56
54
// DEFINEs and CONSTANTs
57
55
#define __ESOS_TICKS_TO_MS (x ) (x/1)
58
56
#define __ESOS_MS_TO_TICKS (x ) (x*1)
59
57
#define __ESOS_UIF14_UI_PERIOD_MS 10
60
- #define __RPGCountsPerRev 12
58
+ #define __RPGCountsPerRev 12 //hardware characteristic of the RPG; used to determine one rotation
61
59
62
60
// PRIVATE FUNCTION PROTOTYPES
63
61
0 commit comments