Mercurial > public > ostc4
annotate Common/Inc/settings.h @ 818:40e951cfa443
1.6.4 release
author | heinrichsweikamp |
---|---|
date | Thu, 14 Sep 2023 13:24:30 +0200 |
parents | dd7ce655db26 |
children | 24b39a432bc2 |
rev | line source |
---|---|
38 | 1 /////////////////////////////////////////////////////////////////////////////// |
2 /// -*- coding: UTF-8 -*- | |
3 /// | |
4 /// \file Common/Inc/settings.h | |
5 /// \brief | |
6 /// \author Heinrichs Weikamp | |
7 /// \date 2018 | |
8 /// | |
9 /// $Id$ | |
10 /////////////////////////////////////////////////////////////////////////////// | |
11 /// \par Copyright (c) 2014-2018 Heinrichs Weikamp gmbh | |
12 /// | |
13 /// This program is free software: you can redistribute it and/or modify | |
14 /// it under the terms of the GNU General Public License as published by | |
15 /// the Free Software Foundation, either version 3 of the License, or | |
16 /// (at your option) any later version. | |
17 /// | |
18 /// This program is distributed in the hope that it will be useful, | |
19 /// but WITHOUT ANY WARRANTY; without even the implied warranty of | |
20 /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
21 /// GNU General Public License for more details. | |
22 /// | |
23 /// You should have received a copy of the GNU General Public License | |
24 /// along with this program. If not, see <http://www.gnu.org/licenses/>. | |
25 ////////////////////////////////////////////////////////////////////////////// | |
26 | |
27 #ifndef SETTINGS_H | |
28 #define SETTINGS_H | |
29 | |
788
4abfb8a2a435
Define explicit setpoints for low / high / deco. Add an option to delay the switch to SPlow until all decompression has been cleared. (mikeller)
heinrichsweikamp
parents:
776
diff
changeset
|
30 #include <stdint.h> |
4abfb8a2a435
Define explicit setpoints for low / high / deco. Add an option to delay the switch to SPlow until all decompression has been cleared. (mikeller)
heinrichsweikamp
parents:
776
diff
changeset
|
31 #include <stdbool.h> |
4abfb8a2a435
Define explicit setpoints for low / high / deco. Add an option to delay the switch to SPlow until all decompression has been cleared. (mikeller)
heinrichsweikamp
parents:
776
diff
changeset
|
32 |
38 | 33 // From Common/Inc: |
34 #include "FirmwareData.h" | |
35 | |
36 //#include "data_central.h" | |
37 | |
92
be35821a4974
Stable to test. button sensitiveness fix. + global_constants.
Dmitry Romanov <kitt@bk.ru>
parents:
38
diff
changeset
|
38 #include "global_constants.h" |
38 | 39 // From Common/Drivers/ |
40 #include "stm32f4xx_hal.h" | |
710 | 41 #include "stm32f4xx_hal_rtc.h" |
38 | 42 |
691 | 43 #include "configuration.h" |
44 | |
92
be35821a4974
Stable to test. button sensitiveness fix. + global_constants.
Dmitry Romanov <kitt@bk.ru>
parents:
38
diff
changeset
|
45 |
38 | 46 #define NUM_GASES 5 |
47 #define NUM_OFFSET_DILUENT 5 | |
48 #define SPECIAL_GAS_ID 0 | |
49 | |
50 #define ERROR_ 0xFF | |
51 | |
52 #define CCRMODE_FixedSetpoint 0 | |
53 #define CCRMODE_Sensors 1 | |
662 | 54 #define CCRMODE_Simulation 2 |
38 | 55 |
56 #define DIVEMODE_OC 0 | |
57 #define DIVEMODE_CCR 1 | |
58 #define DIVEMODE_Gauge 2 | |
59 #define DIVEMODE_Apnea 3 | |
662 | 60 #define DIVEMODE_PSCR 4 |
38 | 61 |
62 #define GF_MODE 1 | |
63 #define VPM_MODE 2 | |
64 | |
65 #define VPM_FROM_FORTRAN 0 | |
66 #define VPM_BACHELORWORK 1 | |
67 | |
68 #define BUEHLMANN_OSTC4 0 | |
69 #define BUEHLMANN_hwOS 1 | |
70 | |
71 #define MMDDYY 0 | |
72 #define DDMMYY 1 | |
73 #define YYMMDD 2 | |
74 | |
337
38367bb982b8
Set Max value for pressure offset to 50mBar (20mBar before)
ideenmodellierer
parents:
210
diff
changeset
|
75 #define PRESSURE_OFFSET_LIMIT_MBAR 50 |
38367bb982b8
Set Max value for pressure offset to 50mBar (20mBar before)
ideenmodellierer
parents:
210
diff
changeset
|
76 |
560
5d80bb8d22cb
Added O2 sensor source and calibration parameters to setting structure
Ideenmodellierer
parents:
550
diff
changeset
|
77 #define MAX_COMPASS_COMP (2u) |
640 | 78 #define MAX_VIEWPORT_MODE (0x7F) |
560
5d80bb8d22cb
Added O2 sensor source and calibration parameters to setting structure
Ideenmodellierer
parents:
550
diff
changeset
|
79 |
676 | 80 #define MAX_SCRUBBER_TIME (999u) |
758
b6d8a6fbf4fd
- Colours for scrubber display when time remaining falls below a threshold value
heinrichsweikamp
parents:
741
diff
changeset
|
81 #define MIN_SCRUBBER_TIME -99 |
652 | 82 #define MIN_PPO2_SP_CBAR (40u) |
650 | 83 |
662 | 84 #define PSCR_MAX_O2_DROP (15u) |
85 #define PSCR_MIN_LUNG_RATIO (5u) | |
86 #define PSCR_MAX_LUNG_RATIO (20u) | |
87 | |
691 | 88 #define UART_MAX_PROTOCOL (2u) |
89 | |
805
dd7ce655db26
Adds a simple countdown timer, available as a custom view in surface and dive mode.
heinrichsweikamp
parents:
796
diff
changeset
|
90 #define FUTURE_SPARE_SIZE (0u) /* Applied for reuse of old, not used, scooter block (was 32 bytes)*/ |
662 | 91 |
560
5d80bb8d22cb
Added O2 sensor source and calibration parameters to setting structure
Ideenmodellierer
parents:
550
diff
changeset
|
92 typedef enum |
5d80bb8d22cb
Added O2 sensor source and calibration parameters to setting structure
Ideenmodellierer
parents:
550
diff
changeset
|
93 { |
5d80bb8d22cb
Added O2 sensor source and calibration parameters to setting structure
Ideenmodellierer
parents:
550
diff
changeset
|
94 O2_SENSOR_SOURCE_OPTIC = 0, |
5d80bb8d22cb
Added O2 sensor source and calibration parameters to setting structure
Ideenmodellierer
parents:
550
diff
changeset
|
95 O2_SENSOR_SOURCE_ANALOG, |
702
6d7c812fc173
Added digital o2 sensor to settings and data exchange:
Ideenmodellierer
parents:
691
diff
changeset
|
96 O2_SENSOR_SOURCE_DIGITAL, |
6d7c812fc173
Added digital o2 sensor to settings and data exchange:
Ideenmodellierer
parents:
691
diff
changeset
|
97 O2_SENSOR_SOURCE_ANADIG, |
691 | 98 #ifdef ENABLE_SENTINEL_MODE |
99 O2_SENSOR_SOURCE_SENTINEL, | |
100 #endif | |
560
5d80bb8d22cb
Added O2 sensor source and calibration parameters to setting structure
Ideenmodellierer
parents:
550
diff
changeset
|
101 O2_SENSOR_SOURCE_MAX |
5d80bb8d22cb
Added O2 sensor source and calibration parameters to setting structure
Ideenmodellierer
parents:
550
diff
changeset
|
102 } SensorSource; |
5d80bb8d22cb
Added O2 sensor source and calibration parameters to setting structure
Ideenmodellierer
parents:
550
diff
changeset
|
103 #define MAX_O2_SENSOR_SOURCE (2u) |
546 | 104 |
654
890440ab993a
Introduced new menu tab for addition CCR options:
Ideenmodellierer
parents:
652
diff
changeset
|
105 typedef enum |
890440ab993a
Introduced new menu tab for addition CCR options:
Ideenmodellierer
parents:
652
diff
changeset
|
106 { |
890440ab993a
Introduced new menu tab for addition CCR options:
Ideenmodellierer
parents:
652
diff
changeset
|
107 SCRUB_TIMER_OFF = 0, |
890440ab993a
Introduced new menu tab for addition CCR options:
Ideenmodellierer
parents:
652
diff
changeset
|
108 SCRUB_TIMER_MINUTES, |
890440ab993a
Introduced new menu tab for addition CCR options:
Ideenmodellierer
parents:
652
diff
changeset
|
109 SCRUB_TIMER_PERCENT, |
890440ab993a
Introduced new menu tab for addition CCR options:
Ideenmodellierer
parents:
652
diff
changeset
|
110 SCRUB_TIMER_END |
890440ab993a
Introduced new menu tab for addition CCR options:
Ideenmodellierer
parents:
652
diff
changeset
|
111 } ScrubTimerMode_e; |
890440ab993a
Introduced new menu tab for addition CCR options:
Ideenmodellierer
parents:
652
diff
changeset
|
112 |
38 | 113 /* 2015 Jan 30, hw, deco and travel added for MenuEditGas |
114 * can be used for buehlmann, vpm, etc. later but be carefull | |
115 * with current implemenation */ | |
116 typedef struct{ | |
117 uint8_t active:1; | |
118 uint8_t first:1; | |
119 uint8_t deco:1; | |
120 uint8_t travel:1; | |
526
88c626d01ee5
Added new option to gas configuration: "Off":
Ideenmodellierer
parents:
505
diff
changeset
|
121 uint8_t off:1; |
88c626d01ee5
Added new option to gas configuration: "Off":
Ideenmodellierer
parents:
505
diff
changeset
|
122 uint8_t spare:3; |
38 | 123 } gasubit8_t; |
124 | |
125 typedef union{ | |
126 gasubit8_t ub; | |
127 uint8_t uw; | |
128 } gasbit8_Type; | |
129 | |
130 typedef struct{ | |
131 uint8_t standard:4; | |
132 uint8_t alternative:4; | |
133 } ubit2x4_t; | |
134 | |
135 typedef union{ | |
136 ubit2x4_t ub; | |
137 uint8_t uw; | |
138 } split2x4_Type; | |
139 | |
140 typedef union{ | |
141 uint8_t u8[4]; | |
142 uint32_t u32; | |
143 } general32to8_Type; | |
144 | |
145 typedef struct | |
146 { | |
147 uint8_t oxygen_percentage; | |
148 uint8_t helium_percentage; | |
149 gasbit8_Type note; | |
150 uint8_t depth_meter; | |
151 uint8_t depth_meter_travel; | |
152 uint8_t bottle_size_liter; | |
153 // uint8_t bottle_wireless_status; | |
154 uint16_t bottle_wireless_id; | |
155 } SGasLine; | |
156 | |
157 typedef struct | |
158 { | |
159 uint8_t setpoint_cbar; | |
160 uint8_t depth_meter; | |
161 gasbit8_Type note; | |
162 } SSetpointLine; | |
163 | |
654
890440ab993a
Introduced new menu tab for addition CCR options:
Ideenmodellierer
parents:
652
diff
changeset
|
164 |
710 | 165 typedef struct |
166 { | |
167 uint16_t TimerMax; | |
758
b6d8a6fbf4fd
- Colours for scrubber display when time remaining falls below a threshold value
heinrichsweikamp
parents:
741
diff
changeset
|
168 int16_t TimerCur; |
710 | 169 RTC_DateTypeDef lastDive; |
170 } SScrubberData; | |
171 | |
788
4abfb8a2a435
Define explicit setpoints for low / high / deco. Add an option to delay the switch to SPlow until all decompression has been cleared. (mikeller)
heinrichsweikamp
parents:
776
diff
changeset
|
172 enum { |
4abfb8a2a435
Define explicit setpoints for low / high / deco. Add an option to delay the switch to SPlow until all decompression has been cleared. (mikeller)
heinrichsweikamp
parents:
776
diff
changeset
|
173 SETPOINT_INDEX_CUSTOM = 0, |
4abfb8a2a435
Define explicit setpoints for low / high / deco. Add an option to delay the switch to SPlow until all decompression has been cleared. (mikeller)
heinrichsweikamp
parents:
776
diff
changeset
|
174 SETPOINT_INDEX_AUTO_LOW, |
4abfb8a2a435
Define explicit setpoints for low / high / deco. Add an option to delay the switch to SPlow until all decompression has been cleared. (mikeller)
heinrichsweikamp
parents:
776
diff
changeset
|
175 SETPOINT_INDEX_AUTO_HIGH, |
4abfb8a2a435
Define explicit setpoints for low / high / deco. Add an option to delay the switch to SPlow until all decompression has been cleared. (mikeller)
heinrichsweikamp
parents:
776
diff
changeset
|
176 SETPOINT_INDEX_AUTO_DECO, |
4abfb8a2a435
Define explicit setpoints for low / high / deco. Add an option to delay the switch to SPlow until all decompression has been cleared. (mikeller)
heinrichsweikamp
parents:
776
diff
changeset
|
177 }; |
4abfb8a2a435
Define explicit setpoints for low / high / deco. Add an option to delay the switch to SPlow until all decompression has been cleared. (mikeller)
heinrichsweikamp
parents:
776
diff
changeset
|
178 |
654
890440ab993a
Introduced new menu tab for addition CCR options:
Ideenmodellierer
parents:
652
diff
changeset
|
179 |
38 | 180 /* SSettings |
181 * gas[0] and setpoint[0] are the special ones configurable during the dive | |
182 */ | |
183 typedef struct | |
184 { | |
185 uint32_t header; | |
186 uint8_t warning_blink_dsec; | |
187 uint8_t lastDiveLogId; | |
188 uint32_t logFlashNextSampleStartAddress; | |
189 SGasLine gas[1 + (2*NUM_GASES)]; | |
190 SSetpointLine setpoint[1 + NUM_GASES]; | |
191 uint8_t CCR_Mode; | |
192 uint8_t dive_mode; | |
193 split2x4_Type deco_type; | |
194 uint8_t ppO2_max_deco; | |
195 uint8_t ppO2_max_std; | |
196 uint8_t ppO2_min; | |
197 uint8_t CNS_max; | |
198 uint8_t ascent_MeterPerMinute_max; | |
199 uint8_t ascent_MeterPerMinute_showGraph; | |
200 uint8_t future_TTS; | |
201 uint8_t GF_high; | |
202 uint8_t GF_low; | |
203 uint8_t aGF_high; | |
204 uint8_t aGF_low; | |
205 split2x4_Type VPM_conservatism; | |
206 uint8_t safetystopDuration; | |
207 uint8_t AtemMinutenVolumenLiter; | |
208 uint8_t ReserveFractionDenominator; | |
209 uint8_t salinity; | |
210 uint8_t last_stop_depth_meter; | |
211 uint8_t stop_increment_depth_meter; | |
212 uint8_t brightness; | |
213 uint8_t date_format; | |
214 uint8_t selected_language; | |
215 char customtext[60]; | |
216 uint16_t timeoutSurfacemode; | |
217 uint8_t timeoutMenuSurface; | |
218 uint8_t timeoutMenuDive; | |
219 uint8_t timeoutMenuEdit; | |
220 uint8_t timeoutInfo; | |
221 uint8_t timeoutInfoCompass; | |
222 uint8_t design; | |
223 uint16_t timeoutDiveReachedZeroDepth; | |
224 uint16_t divetimeToCreateLogbook; | |
225 uint8_t serialHigh; | |
226 uint8_t serialLow; | |
227 // SUFirmware firmwareVersion16to32bit; | |
228 uint32_t backup_localtime_rtc_tr; | |
229 uint32_t backup_localtime_rtc_dr; | |
230 uint16_t totalDiveCounter; | |
560
5d80bb8d22cb
Added O2 sensor source and calibration parameters to setting structure
Ideenmodellierer
parents:
550
diff
changeset
|
231 uint16_t personalDiveCount; |
38 | 232 uint8_t showDebugInfo; |
233 uint8_t ButtonResponsiveness[4];// changed content in 0xFFFF0016 | |
234 uint8_t nonMetricalSystem; | |
235 uint8_t fallbackToFixedSetpoint; | |
236 uint8_t bluetoothActive; /* will be set to zero on each startup at the moment */ | |
237 uint8_t safetystopDepth; | |
238 uint32_t updateSettingsAllowedFromHeader; | |
662 | 239 uint8_t pscr_lung_ratio; /* redefined in 0xFFFF0020 */ |
240 uint8_t pscr_o2_drop; /* redefined in 0xFFFF0020 */ | |
241 uint8_t co2_sensor_active; /* redefined in 0xFFFF0021 */ | |
691 | 242 uint8_t ext_uart_protocol; /* redefined in 0xFFFF0022 */ |
710 | 243 |
244 uint8_t scubberActiveId; /* redefined in 0xFFFF0023 */ | |
245 SScrubberData scrubberData[2]; | |
796 | 246 uint8_t ext_sensor_map_Obsolete[5]; |
247 uint8_t buttonLockActive; /* redefined in 0xFFFF0025 */ | |
788
4abfb8a2a435
Define explicit setpoints for low / high / deco. Add an option to delay the switch to SPlow until all decompression has been cleared. (mikeller)
heinrichsweikamp
parents:
776
diff
changeset
|
248 int8_t compassDeclinationDeg; |
805
dd7ce655db26
Adds a simple countdown timer, available as a custom view in surface and dive mode.
heinrichsweikamp
parents:
796
diff
changeset
|
249 uint8_t delaySetpointLow; |
dd7ce655db26
Adds a simple countdown timer, available as a custom view in surface and dive mode.
heinrichsweikamp
parents:
796
diff
changeset
|
250 uint16_t timerDurationS; /* redefined in 0xFFFF0026 */ |
662 | 251 uint8_t Future_SPARE[FUTURE_SPARE_SIZE]; /* redefined in 0xFFFF0020 (old scooter Block was 32 byte)*/ |
38 | 252 // new in 0xFFFF0006 |
253 uint8_t ppo2sensors_deactivated; | |
254 uint8_t tX_colorscheme; | |
255 uint8_t tX_userselectedLeftLowerCornerPrimary; | |
256 uint8_t tX_userselectedLeftLowerCornerTimeout; | |
257 uint8_t tX_customViewPrimary; | |
258 uint8_t tX_customViewTimeout; | |
259 uint8_t timeoutEnterButtonSelectDive; | |
260 uint16_t logbookOffset; | |
261 uint8_t alwaysShowPPO2; | |
262 uint8_t extraDisplay; | |
263 uint16_t display_toogle_desc; | |
264 int8_t offsetPressure_mbar; | |
265 int8_t offsetTemperature_centigrad; | |
266 uint8_t gasConsumption_travel_l_min; | |
267 uint8_t gasConsumption_bottom_l_min; | |
268 uint8_t gasConsumption_deco_l_min; | |
269 uint8_t debugModeOnStart; | |
270 uint8_t IAmStolenPleaseKillMe; | |
271 int16_t compassBearing; | |
272 uint8_t lastKnownBatteryPercentage; | |
273 uint8_t buttonBalance[3]; // 0 = right, 1 = center, 2 = left | |
274 uint8_t firmwareVersion[4]; | |
275 uint16_t timeoutSurfacemodeWithSensors; | |
276 // new in 0xFFFF0016 | |
277 uint8_t VPM_model; | |
278 uint8_t GF_model; | |
279 // new in 0xFFFF0017 | |
280 uint8_t FactoryButtonBase; | |
281 uint8_t FactoryButtonBalance[3]; | |
112
fdf0272e9213
Added new nvm parameter"FlipDisplay" indicating the screen orientation
Ideenmodellierer
parents:
38
diff
changeset
|
282 /* new in 0xFFFF0018 */ |
fdf0272e9213
Added new nvm parameter"FlipDisplay" indicating the screen orientation
Ideenmodellierer
parents:
38
diff
changeset
|
283 uint8_t FlipDisplay; |
210
b2a9e9b02df0
New feature: make selected customviews persistent
Jan Mulder <jlmulder@xs4all.nl>
parents:
138
diff
changeset
|
284 /* new in 0xFFFF0019 */ |
b2a9e9b02df0
New feature: make selected customviews persistent
Jan Mulder <jlmulder@xs4all.nl>
parents:
138
diff
changeset
|
285 uint32_t cv_configuration; |
368
50ea68c7a153
Added menu item for motion detection. There are several possibility to use motion detection for user action input. To select of the a new menu entry has been added to the Sys2 =>Custom View Menu (Variables in german)
ideenmodellierer
parents:
210
diff
changeset
|
286 /* new in 0xFFFF001A */ |
50ea68c7a153
Added menu item for motion detection. There are several possibility to use motion detection for user action input. To select of the a new menu entry has been added to the Sys2 =>Custom View Menu (Variables in german)
ideenmodellierer
parents:
210
diff
changeset
|
287 uint8_t MotionDetection; |
498
4811f3dfaa52
Added dew parameter to enable selection of customer BigFont screens to be displayed
Ideenmodellierer
parents:
372
diff
changeset
|
288 /* new in 0xFFFF001B */ |
4811f3dfaa52
Added dew parameter to enable selection of customer BigFont screens to be displayed
Ideenmodellierer
parents:
372
diff
changeset
|
289 uint32_t cv_config_BigScreen; |
539
d784f281833a
Added inertia simulation for compass heading:
Ideenmodellierer
parents:
526
diff
changeset
|
290 /* new in 0xFFFF001C */ |
d784f281833a
Added inertia simulation for compass heading:
Ideenmodellierer
parents:
526
diff
changeset
|
291 uint8_t compassInertia; |
542
6960df7ddb09
Added new t3 view showing first deco stop and tts in parallel:
Ideenmodellierer
parents:
539
diff
changeset
|
292 uint8_t tX_customViewPrimaryBF; |
546 | 293 /* new in 0xFFFF001D */ |
626
3e1a0e267f38
Added option to select sensitivity of focus detection:
Ideenmodellierer
parents:
567
diff
changeset
|
294 uint8_t viewPortMode; /* 7-Reserve| 6..5 - Focus spot size | 4-Focusframe | 3-Reserve | 2..0-BacklightBoost */ |
546 | 295 uint16_t viewRoll; |
296 uint16_t viewPitch; | |
297 uint16_t viewYaw; | |
560
5d80bb8d22cb
Added O2 sensor source and calibration parameters to setting structure
Ideenmodellierer
parents:
550
diff
changeset
|
298 /* new in 0xFFFF001E */ |
5d80bb8d22cb
Added O2 sensor source and calibration parameters to setting structure
Ideenmodellierer
parents:
550
diff
changeset
|
299 uint8_t ppo2sensors_source; |
5d80bb8d22cb
Added O2 sensor source and calibration parameters to setting structure
Ideenmodellierer
parents:
550
diff
changeset
|
300 float ppo2sensors_calibCoeff[3]; |
567 | 301 uint8_t amPMTime; |
650 | 302 /* new in 0xFFFF001F */ |
303 uint8_t autoSetpoint; | |
710 | 304 uint16_t scrubTimerMax_Obsolete; /* have been replaced with new scrubber data format */ |
305 uint16_t scrubTimerCur_Obsolete; /* have been replaced with new scrubber data format */ | |
654
890440ab993a
Introduced new menu tab for addition CCR options:
Ideenmodellierer
parents:
652
diff
changeset
|
306 uint8_t scrubTimerMode; |
796 | 307 uint8_t ext_sensor_map[8]; /* redefined in 0xFFFF0027 */ |
38 | 308 } SSettings; |
309 | |
310 typedef struct | |
311 { | |
312 // 8 bytes | |
313 uint16_t primarySerial; | |
314 uint8_t primaryLicence; | |
315 uint8_t revision8bit; | |
316 uint8_t production_year; | |
317 uint8_t production_month; | |
318 uint8_t production_day; | |
319 uint8_t production_bluetooth_name_set; | |
320 | |
321 // 44 bytes | |
322 char production_info[44]; | |
323 | |
324 // 8 bytes | |
325 uint16_t secondarySerial; | |
326 uint8_t secondaryLicence; | |
327 uint8_t secondaryReason8bit; | |
328 uint8_t secondary_year; | |
329 uint8_t secondary_month; | |
330 uint8_t secondary_day; | |
331 uint8_t secondary_bluetooth_name_set; | |
332 | |
333 // 4 bytes | |
334 char secondary_info[4]; | |
335 } SHardwareData; | |
336 | |
337 uint8_t writeData(uint8_t *); | |
338 uint8_t readData(uint8_t what,uint8_t *); | |
339 uint8_t readDataLimits__8and16BitValues_4and7BytesOutput(uint8_t what, uint8_t * data); | |
340 | |
341 uint8_t getPPO2Max(void); | |
342 uint8_t getPPO2Min(void); | |
343 uint8_t getDiveMode(void); | |
344 uint8_t getCCRMode(void); | |
345 uint8_t getDecoType(void); | |
346 uint8_t getFutureTTS(void); | |
347 | |
348 SSettings* settingsGetPointer(void); | |
349 const SSettings* settingsGetPointerStandard(void); | |
350 void set_settings_to_Standard(void); | |
351 void mod_settings_for_first_start_with_empty_ext_flash(void); | |
352 const SFirmwareData* firmwareDataGetPointer(void); | |
353 const SHardwareData* hardwareDataGetPointer(void); | |
354 uint8_t firmwareVersion_16bit_high(void); | |
355 uint8_t firmwareVersion_16bit_low(void); | |
356 void hardwareBatchCode(uint8_t *high, uint8_t *low); | |
357 | |
358 uint8_t RTEminimum_required_high(void); | |
359 uint8_t RTEminimum_required_low(void); | |
360 uint8_t FONTminimum_required_high(void); | |
361 uint8_t FONTminimum_required_low(void); | |
362 | |
363 void setActualRTEversion(uint8_t high, uint8_t low); | |
364 void getActualRTEandFONTversion(uint8_t *RTEhigh, uint8_t *RTElow, uint8_t *FONThigh, uint8_t *FONTlow); | |
365 | |
366 void set_new_settings_missing_in_ext_flash(void); | |
367 uint8_t check_and_correct_settings(void); | |
368 uint8_t newFirmwareVersionCheckViaSettings(void); | |
765
da8126d5ea9f
After a firmware update, use the factory settings for button sensitivity if these exist, the default settings otherwise.
heinrichsweikamp
parents:
758
diff
changeset
|
369 void set_settings_button_to_factory_with_individual_buttonBalance(void); |
38 | 370 uint8_t getLicence(void); |
371 void firmwareGetDate(RTC_DateTypeDef *SdateOutput); | |
372 | |
373 void settingsHelperButtonSens_original_translate_to_hwOS_values(const uint32_t inputValueRaw, uint8_t *outArray4Values); | |
374 | |
375 uint8_t buttonBalanceTranslatorHexToArray(uint8_t hexValue, uint8_t* outputArray); | |
376 uint8_t buttonBalanceTranslateArrayOutHex(const uint8_t* inputArray); | |
377 void getButtonFactorDefaults(uint8_t* basePercentage, uint8_t* buttonBalanceArray); | |
378 void settingsWriteFactoryDefaults(uint8_t inputValueRaw, uint8_t *inputBalanceArray); | |
379 | |
380 void settingsHelperButtonSens_keepPercentageValues(uint32_t inputValueRaw, uint8_t *outArray4Values); | |
381 uint8_t settingsHelperButtonSens_translate_percentage_to_hwOS_values(uint8_t inputValuePercentage); | |
382 uint8_t settingsHelperButtonSens_translate_hwOS_values_to_percentage(uint8_t inputValuePIC); | |
383 | |
662 | 384 void reset_SettingWarning(); |
385 uint8_t isSettingsWarning(); | |
386 | |
788
4abfb8a2a435
Define explicit setpoints for low / high / deco. Add an option to delay the switch to SPlow until all decompression has been cleared. (mikeller)
heinrichsweikamp
parents:
776
diff
changeset
|
387 bool checkAndFixSetpointSettings(void); |
38 | 388 #endif // SETTINGS_H |