Skip to content

Commit 222e6fe

Browse files
authored
Update esos_f14ui.h
1 parent 836ae2c commit 222e6fe

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

esos/include/esos_f14ui.h

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,36 +11,34 @@
1111
#define ESOS_UIF14_H
1212
# include <all_generic.h>
1313

14-
// STRUCTURES
15-
14+
// this is the one data structure that is used throughout the UI
1615
typedef struct {
1716
BOOL b_SW1Pressed;
1817
BOOL b_SW1DoublePressed;
1918
BOOL b_SW2Pressed;
2019
BOOL b_SW2DoublePressed;
2120
BOOL b_SW3Pressed;
2221
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
2423

2524
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
2726
BOOL b_RPGMedium;
28-
BOOL b_RPGSlow;
27+
BOOL b_RPGSlow;
2928
BOOL b_RPGNotMoving;
3029
uint16_t u16_RPGLastChangeMs; //time of last RPGA change
3130
uint16_t u16_RPGPeriodMs; // time SINCE last RPGA change
3231
uint16_t u16_RPGNotMovingToSlowPeriodMs; //border between not moving and slow
3332
uint16_t u16_RPGSlowToMediumPeriodMs; //border between slow and medium
3433
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
3736
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?
4039
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
4442
BOOL b_LED1Flashing;
4543

4644
BOOL b_LED2On;
@@ -51,13 +49,13 @@ typedef struct {
5149
uint16_t u16_LED3FlashPeriod;
5250
BOOL b_LED3Flashing;
5351

54-
} _st_esos_uiF14Data_t;
52+
} _st_esos_uiF14Data_t; //the name of this data structure; it is instantiated in f14ui.c
5553

5654
// DEFINEs and CONSTANTs
5755
#define __ESOS_TICKS_TO_MS(x) (x/1)
5856
#define __ESOS_MS_TO_TICKS(x) (x*1)
5957
#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
6159

6260
// PRIVATE FUNCTION PROTOTYPES
6361

0 commit comments

Comments
 (0)