Mercurial > public > ostc4
annotate Small_CPU/Inc/scheduler.h @ 169:842f57bbaaad cleanup-1
Bugfix: highlight the menu underline correctly on selected state
This fixes an optical bug. In dive and simulation mode, the
underline in the top menu was not highlighted correctly for the
DECO ans SYS submenu's. The check when to highlight simply was not
correct. And, yes, this part of the code is rather obfuscated, and
deserves some attention later on.
Reported-by: Matthias Heinrichs <matthias.heinrichs@heinrichsweikamp.com>
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
author | Jan Mulder <jlmulder@xs4all.nl> |
---|---|
date | Sun, 10 Mar 2019 10:09:58 +0100 |
parents | ee744c7160ce |
children | 331882a89421 |
rev | line source |
---|---|
38 | 1 /** |
2 ****************************************************************************** | |
3 * @file scheduler.h | |
4 * @author heinrichs weikamp gmbh | |
5 * @version V0.0.5 | |
6 * @date 27-March-2014 | |
7 * @brief | |
8 * | |
9 ****************************************************************************** | |
10 * @attention | |
11 * | |
12 * <h2><center>© COPYRIGHT(c) 2015 heinrichs weikamp</center></h2> | |
13 * | |
14 ****************************************************************************** | |
15 */ | |
16 | |
17 | |
18 #ifndef SCHEDULER_H | |
19 #define SCHEDULER_H | |
20 | |
21 #ifdef __cplusplus | |
22 extern "C" { | |
23 #endif | |
24 | |
25 | |
26 /* Includes ------------------------------------------------------------------*/ | |
27 #include "data_central.h" | |
28 #include "data_exchange.h" | |
29 #include "settings.h" | |
30 | |
31 /* Types -------------------------------------------------------------*/ | |
32 #define MAX_WIRELESS_BYTES 10 | |
33 #define SENSOR_PRESSURE_ID 0 | |
34 #define MAX_SENSORS 1 | |
35 | |
36 typedef struct | |
37 { | |
38 uint8_t mode; | |
39 short conservatism; | |
40 short repetitive_dive; | |
41 long seconds_since_last_dive; | |
42 long no_fly_time_minutes; | |
43 uint8_t whichGas; | |
44 SGas aktualGas[2]; | |
45 float ceiling_from_main_CPU_mbar; | |
46 SLifeData lifeData; | |
47 SVpm vpm; | |
48 SSettings settings; | |
49 SDevice deviceData; | |
50 SDataExchangeSlaveToMasterDeviceData deviceDataSendToMaster; | |
51 SDataExchangeSlaveToMaster dataSendToMaster; | |
52 SDataReceiveFromMaster dataSendToSlave; | |
53 _Bool demo_mode; | |
54 uint8_t dataSendToSlaveIsValid; | |
55 uint8_t dataSendToSlavePending; | |
88 | 56 uint8_t dataSendToSlaveStopEval; |
38 | 57 uint32_t sync_error_count; |
58 uint32_t check_sync_not_running; | |
59 uint8_t ButtonResponsiveness[4]; | |
60 uint8_t chargerStatus; | |
61 uint8_t dataSendToSlaveIsNotValidCount; | |
62 uint8_t wirelessdata[MAX_WIRELESS_BYTES]; | |
63 uint8_t wirelessReceived; | |
64 uint8_t wirelessConfidenceStatus; | |
65 uint8_t ButtonPICdata[4]; | |
66 uint8_t accidentFlag; | |
67 uint32_t accidentRemainingSeconds; | |
68 uint8_t sensorError[MAX_SENSORS]; | |
69 uint8_t I2C_SystemStatus; | |
70 } SGlobal; | |
71 | |
72 typedef struct | |
73 { | |
74 long seconds_since_last_dive; | |
75 long no_fly_time_minutes; | |
76 } SBackup; | |
77 | |
144 | 78 typedef struct |
79 { | |
80 uint8_t counterSPIdata100msec; | |
81 uint8_t counterPressure100msec; | |
82 uint8_t counterCompass100msec; | |
83 uint8_t counterAmbientLight100msec; | |
84 uint16_t counterWireless1msec; | |
85 uint32_t tickstart; | |
86 } SScheduleCtrl; | |
87 | |
88 | |
38 | 89 /* Variables ---------------------------------------------------------*/ |
90 extern SGlobal global; | |
148
ee744c7160ce
Use SPI TX callback to synchronize to main CPU
Ideenmodellierer
parents:
144
diff
changeset
|
91 extern uint8_t dohardspisync; |
38 | 92 |
93 | |
94 /* Function prototypes -----------------------------------------------*/ | |
95 | |
96 void initGlobals(void); | |
97 | |
98 void scheduleSurfaceMode(void); | |
99 void scheduleDiveMode(void); | |
100 void scheduleSleepMode(void); | |
101 void scheduleCompassCalibrationMode(void); | |
102 void scheduleTestMode(void); | |
103 | |
104 void scheduleUpdateLifeData(int32_t asynchron_milliseconds_since_last); | |
105 void scheduleSpecial_Evaluate_DataSendToSlave(void); | |
106 void scheduleUpdateDeviceDataChargerFull(void); | |
107 void scheduleUpdateDeviceDataChargerCharging(void); | |
108 | |
109 uint8_t scheduleSetButtonResponsiveness(void); | |
110 | |
111 void copyBatteryData(void); | |
112 | |
113 //void scheduleSurfaceMode_test(void); | |
114 //void scheduleSleepMode_test(void); | |
115 | |
116 #ifdef __cplusplus | |
117 } | |
118 #endif | |
119 | |
120 #endif /* SCHEDULER_H */ | |
121 | |
122 /************************ (C) COPYRIGHT heinrichs weikamp *****END OF FILE****/ |