Mercurial > public > ostc4
annotate Common/Inc/settings.h @ 1028:3d9552e4997c GasConsumption
Code improvment: line <=> menu id function:
In generell the structure of the menus is defined by the tStructure.h using global state defines. In some implementation hardcoded line numbers are used. Risk: In case the order of menu items change the update of other code sections could be forgotten (in the case the update of the top menu) causing unintended behavior. To avoid this the hard coded lines have been replaced by a function connecting the intended function to the menu item defined in the tstructure.h.
| author | Ideenmodellierer |
|---|---|
| date | Sun, 07 Sep 2025 19:08:43 +0200 |
| parents | 158100a84ebd |
| children |
| 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" | |
| 1017 | 35 #include "firmwareEraseProgram.h" |
| 38 | 36 |
|
92
be35821a4974
Stable to test. button sensitiveness fix. + global_constants.
Dmitry Romanov <kitt@bk.ru>
parents:
38
diff
changeset
|
37 #include "global_constants.h" |
| 38 | 38 // From Common/Drivers/ |
| 39 #include "stm32f4xx_hal.h" | |
| 710 | 40 #include "stm32f4xx_hal_rtc.h" |
| 38 | 41 |
| 691 | 42 #include "configuration.h" |
| 43 | |
|
92
be35821a4974
Stable to test. button sensitiveness fix. + global_constants.
Dmitry Romanov <kitt@bk.ru>
parents:
38
diff
changeset
|
44 |
| 38 | 45 #define NUM_GASES 5 |
| 46 #define NUM_OFFSET_DILUENT 5 | |
| 47 #define SPECIAL_GAS_ID 0 | |
|
864
fa431d42b5fb
Fix incorrect logging of bailout to Open Circuit when using the best gas.
heinrichsweikamp
parents:
819
diff
changeset
|
48 #define NO_GAS_ID 255 |
| 38 | 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) |
|
993
df052f0347fb
Add settings that have been missing in the bluetooth API:
heinrichsweikamp
parents:
982
diff
changeset
|
78 |
|
df052f0347fb
Add settings that have been missing in the bluetooth API:
heinrichsweikamp
parents:
982
diff
changeset
|
79 #define MAX_COMPASS_DECLINATION_DEG 99 |
|
df052f0347fb
Add settings that have been missing in the bluetooth API:
heinrichsweikamp
parents:
982
diff
changeset
|
80 |
| 640 | 81 #define MAX_VIEWPORT_MODE (0x7F) |
|
560
5d80bb8d22cb
Added O2 sensor source and calibration parameters to setting structure
Ideenmodellierer
parents:
550
diff
changeset
|
82 |
|
1014
8c0134a287da
Add a log data event to the scrubber timer at the start of the dive and every time the timer (in minutes)
heinrichsweikamp
parents:
993
diff
changeset
|
83 #define MAX_SCRUBBER_TIME (999u) |
|
758
b6d8a6fbf4fd
- Colours for scrubber display when time remaining falls below a threshold value
heinrichsweikamp
parents:
741
diff
changeset
|
84 #define MIN_SCRUBBER_TIME -99 |
|
1014
8c0134a287da
Add a log data event to the scrubber timer at the start of the dive and every time the timer (in minutes)
heinrichsweikamp
parents:
993
diff
changeset
|
85 #define SCRUBBER_WARNING_TIME 30 |
|
8c0134a287da
Add a log data event to the scrubber timer at the start of the dive and every time the timer (in minutes)
heinrichsweikamp
parents:
993
diff
changeset
|
86 #define SCRUBBER_ERROR_TIME 0 |
|
8c0134a287da
Add a log data event to the scrubber timer at the start of the dive and every time the timer (in minutes)
heinrichsweikamp
parents:
993
diff
changeset
|
87 |
| 652 | 88 #define MIN_PPO2_SP_CBAR (40u) |
| 650 | 89 |
| 662 | 90 #define PSCR_MAX_O2_DROP (15u) |
| 91 #define PSCR_MIN_LUNG_RATIO (5u) | |
| 92 #define PSCR_MAX_LUNG_RATIO (20u) | |
| 93 | |
| 691 | 94 #define UART_MAX_PROTOCOL (2u) |
| 95 | |
|
805
dd7ce655db26
Adds a simple countdown timer, available as a custom view in surface and dive mode.
heinrichsweikamp
parents:
796
diff
changeset
|
96 #define FUTURE_SPARE_SIZE (0u) /* Applied for reuse of old, not used, scooter block (was 32 bytes)*/ |
| 662 | 97 |
| 1027 | 98 #define NUMBER_OF_PROFILES (4u) |
| 99 | |
|
560
5d80bb8d22cb
Added O2 sensor source and calibration parameters to setting structure
Ideenmodellierer
parents:
550
diff
changeset
|
100 typedef enum |
|
5d80bb8d22cb
Added O2 sensor source and calibration parameters to setting structure
Ideenmodellierer
parents:
550
diff
changeset
|
101 { |
|
5d80bb8d22cb
Added O2 sensor source and calibration parameters to setting structure
Ideenmodellierer
parents:
550
diff
changeset
|
102 O2_SENSOR_SOURCE_OPTIC = 0, |
|
5d80bb8d22cb
Added O2 sensor source and calibration parameters to setting structure
Ideenmodellierer
parents:
550
diff
changeset
|
103 O2_SENSOR_SOURCE_ANALOG, |
|
702
6d7c812fc173
Added digital o2 sensor to settings and data exchange:
Ideenmodellierer
parents:
691
diff
changeset
|
104 O2_SENSOR_SOURCE_DIGITAL, |
|
6d7c812fc173
Added digital o2 sensor to settings and data exchange:
Ideenmodellierer
parents:
691
diff
changeset
|
105 O2_SENSOR_SOURCE_ANADIG, |
| 691 | 106 #ifdef ENABLE_SENTINEL_MODE |
| 107 O2_SENSOR_SOURCE_SENTINEL, | |
| 108 #endif | |
|
560
5d80bb8d22cb
Added O2 sensor source and calibration parameters to setting structure
Ideenmodellierer
parents:
550
diff
changeset
|
109 O2_SENSOR_SOURCE_MAX |
|
5d80bb8d22cb
Added O2 sensor source and calibration parameters to setting structure
Ideenmodellierer
parents:
550
diff
changeset
|
110 } SensorSource; |
|
5d80bb8d22cb
Added O2 sensor source and calibration parameters to setting structure
Ideenmodellierer
parents:
550
diff
changeset
|
111 #define MAX_O2_SENSOR_SOURCE (2u) |
| 546 | 112 |
|
654
890440ab993a
Introduced new menu tab for addition CCR options:
Ideenmodellierer
parents:
652
diff
changeset
|
113 typedef enum |
|
890440ab993a
Introduced new menu tab for addition CCR options:
Ideenmodellierer
parents:
652
diff
changeset
|
114 { |
|
1014
8c0134a287da
Add a log data event to the scrubber timer at the start of the dive and every time the timer (in minutes)
heinrichsweikamp
parents:
993
diff
changeset
|
115 INVALID_SCRUB_TIMER_OFF = 0, |
|
654
890440ab993a
Introduced new menu tab for addition CCR options:
Ideenmodellierer
parents:
652
diff
changeset
|
116 SCRUB_TIMER_MINUTES, |
|
890440ab993a
Introduced new menu tab for addition CCR options:
Ideenmodellierer
parents:
652
diff
changeset
|
117 SCRUB_TIMER_PERCENT, |
|
890440ab993a
Introduced new menu tab for addition CCR options:
Ideenmodellierer
parents:
652
diff
changeset
|
118 SCRUB_TIMER_END |
|
890440ab993a
Introduced new menu tab for addition CCR options:
Ideenmodellierer
parents:
652
diff
changeset
|
119 } ScrubTimerMode_e; |
|
890440ab993a
Introduced new menu tab for addition CCR options:
Ideenmodellierer
parents:
652
diff
changeset
|
120 |
| 38 | 121 /* 2015 Jan 30, hw, deco and travel added for MenuEditGas |
| 122 * can be used for buehlmann, vpm, etc. later but be carefull | |
| 123 * with current implemenation */ | |
| 124 typedef struct{ | |
| 125 uint8_t active:1; | |
| 126 uint8_t first:1; | |
| 127 uint8_t deco:1; | |
| 128 uint8_t travel:1; | |
|
526
88c626d01ee5
Added new option to gas configuration: "Off":
Ideenmodellierer
parents:
505
diff
changeset
|
129 uint8_t off:1; |
|
830
b7d93ff6b3b2
Added selection if an active gas shall be used for deco calculation or not:
Ideenmodellierer
parents:
819
diff
changeset
|
130 uint8_t spare:2; |
| 38 | 131 } gasubit8_t; |
| 132 | |
| 133 typedef union{ | |
| 134 gasubit8_t ub; | |
| 135 uint8_t uw; | |
| 136 } gasbit8_Type; | |
| 137 | |
| 138 typedef struct{ | |
| 139 uint8_t standard:4; | |
| 140 uint8_t alternative:4; | |
| 141 } ubit2x4_t; | |
| 142 | |
| 143 typedef union{ | |
| 144 ubit2x4_t ub; | |
| 145 uint8_t uw; | |
| 146 } split2x4_Type; | |
| 147 | |
| 148 typedef union{ | |
| 149 uint8_t u8[4]; | |
| 150 uint32_t u32; | |
| 151 } general32to8_Type; | |
| 152 | |
| 153 typedef struct | |
| 154 { | |
| 155 uint8_t oxygen_percentage; | |
| 156 uint8_t helium_percentage; | |
| 157 gasbit8_Type note; | |
| 158 uint8_t depth_meter; | |
| 159 uint8_t depth_meter_travel; | |
| 160 uint8_t bottle_size_liter; | |
| 161 // uint8_t bottle_wireless_status; | |
| 162 uint16_t bottle_wireless_id; | |
| 163 } SGasLine; | |
| 164 | |
| 165 typedef struct | |
| 166 { | |
| 167 uint8_t setpoint_cbar; | |
| 168 uint8_t depth_meter; | |
| 169 gasbit8_Type note; | |
| 170 } SSetpointLine; | |
| 171 | |
|
654
890440ab993a
Introduced new menu tab for addition CCR options:
Ideenmodellierer
parents:
652
diff
changeset
|
172 |
| 710 | 173 typedef struct |
| 174 { | |
| 175 uint16_t TimerMax; | |
|
758
b6d8a6fbf4fd
- Colours for scrubber display when time remaining falls below a threshold value
heinrichsweikamp
parents:
741
diff
changeset
|
176 int16_t TimerCur; |
| 710 | 177 RTC_DateTypeDef lastDive; |
| 178 } SScrubberData; | |
| 179 | |
|
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
|
180 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
|
181 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
|
182 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
|
183 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
|
184 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
|
185 }; |
|
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
|
186 |
|
819
24b39a432bc2
Added debug information in case an error in the settings has been detected:
Ideenmodellierer
parents:
805
diff
changeset
|
187 typedef struct |
|
24b39a432bc2
Added debug information in case an error in the settings has been detected:
Ideenmodellierer
parents:
805
diff
changeset
|
188 { |
|
24b39a432bc2
Added debug information in case an error in the settings has been detected:
Ideenmodellierer
parents:
805
diff
changeset
|
189 uint8_t FirstCorrection; |
|
24b39a432bc2
Added debug information in case an error in the settings has been detected:
Ideenmodellierer
parents:
805
diff
changeset
|
190 uint8_t Corrections; |
|
24b39a432bc2
Added debug information in case an error in the settings has been detected:
Ideenmodellierer
parents:
805
diff
changeset
|
191 } SSettingsStatus; |
|
654
890440ab993a
Introduced new menu tab for addition CCR options:
Ideenmodellierer
parents:
652
diff
changeset
|
192 |
| 949 | 193 |
| 194 typedef struct | |
| 195 { | |
| 196 int8_t hours; | |
| 197 uint8_t minutes; | |
| 198 } StimeZone; | |
| 199 | |
| 200 | |
| 38 | 201 /* SSettings |
| 202 * gas[0] and setpoint[0] are the special ones configurable during the dive | |
| 203 */ | |
| 204 typedef struct | |
| 205 { | |
| 206 uint32_t header; | |
| 207 uint8_t warning_blink_dsec; | |
| 208 uint8_t lastDiveLogId; | |
| 209 uint32_t logFlashNextSampleStartAddress; | |
| 210 SGasLine gas[1 + (2*NUM_GASES)]; | |
| 211 SSetpointLine setpoint[1 + NUM_GASES]; | |
| 212 uint8_t CCR_Mode; | |
| 213 uint8_t dive_mode; | |
| 214 split2x4_Type deco_type; | |
| 215 uint8_t ppO2_max_deco; | |
| 216 uint8_t ppO2_max_std; | |
| 217 uint8_t ppO2_min; | |
| 218 uint8_t CNS_max; | |
| 219 uint8_t ascent_MeterPerMinute_max; | |
| 220 uint8_t ascent_MeterPerMinute_showGraph; | |
| 221 uint8_t future_TTS; | |
| 222 uint8_t GF_high; | |
| 223 uint8_t GF_low; | |
| 224 uint8_t aGF_high; | |
| 225 uint8_t aGF_low; | |
| 226 split2x4_Type VPM_conservatism; | |
| 227 uint8_t safetystopDuration; | |
| 228 uint8_t AtemMinutenVolumenLiter; | |
| 229 uint8_t ReserveFractionDenominator; | |
| 230 uint8_t salinity; | |
| 231 uint8_t last_stop_depth_meter; | |
| 232 uint8_t stop_increment_depth_meter; | |
| 233 uint8_t brightness; | |
| 234 uint8_t date_format; | |
| 235 uint8_t selected_language; | |
| 236 char customtext[60]; | |
| 237 uint16_t timeoutSurfacemode; | |
| 238 uint8_t timeoutMenuSurface; | |
| 239 uint8_t timeoutMenuDive; | |
| 240 uint8_t timeoutMenuEdit; | |
| 241 uint8_t timeoutInfo; | |
| 242 uint8_t timeoutInfoCompass; | |
| 243 uint8_t design; | |
| 244 uint16_t timeoutDiveReachedZeroDepth; | |
| 245 uint16_t divetimeToCreateLogbook; | |
| 246 uint8_t serialHigh; | |
| 247 uint8_t serialLow; | |
| 248 // SUFirmware firmwareVersion16to32bit; | |
| 249 uint32_t backup_localtime_rtc_tr; | |
| 250 uint32_t backup_localtime_rtc_dr; | |
| 251 uint16_t totalDiveCounter; | |
|
560
5d80bb8d22cb
Added O2 sensor source and calibration parameters to setting structure
Ideenmodellierer
parents:
550
diff
changeset
|
252 uint16_t personalDiveCount; |
| 38 | 253 uint8_t showDebugInfo; |
| 254 uint8_t ButtonResponsiveness[4];// changed content in 0xFFFF0016 | |
| 255 uint8_t nonMetricalSystem; | |
| 256 uint8_t fallbackToFixedSetpoint; | |
| 257 uint8_t bluetoothActive; /* will be set to zero on each startup at the moment */ | |
| 258 uint8_t safetystopDepth; | |
| 259 uint32_t updateSettingsAllowedFromHeader; | |
| 662 | 260 uint8_t pscr_lung_ratio; /* redefined in 0xFFFF0020 */ |
| 261 uint8_t pscr_o2_drop; /* redefined in 0xFFFF0020 */ | |
| 262 uint8_t co2_sensor_active; /* redefined in 0xFFFF0021 */ | |
| 691 | 263 uint8_t ext_uart_protocol; /* redefined in 0xFFFF0022 */ |
| 710 | 264 |
|
1014
8c0134a287da
Add a log data event to the scrubber timer at the start of the dive and every time the timer (in minutes)
heinrichsweikamp
parents:
993
diff
changeset
|
265 uint8_t scrubberActiveId; /* redefined in 0xFFFF0023 */ |
| 710 | 266 SScrubberData scrubberData[2]; |
| 796 | 267 uint8_t ext_sensor_map_Obsolete[5]; |
| 268 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
|
269 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
|
270 uint8_t delaySetpointLow; |
|
dd7ce655db26
Adds a simple countdown timer, available as a custom view in surface and dive mode.
heinrichsweikamp
parents:
796
diff
changeset
|
271 uint16_t timerDurationS; /* redefined in 0xFFFF0026 */ |
| 662 | 272 uint8_t Future_SPARE[FUTURE_SPARE_SIZE]; /* redefined in 0xFFFF0020 (old scooter Block was 32 byte)*/ |
| 38 | 273 // new in 0xFFFF0006 |
| 274 uint8_t ppo2sensors_deactivated; | |
| 275 uint8_t tX_colorscheme; | |
| 276 uint8_t tX_userselectedLeftLowerCornerPrimary; | |
| 277 uint8_t tX_userselectedLeftLowerCornerTimeout; | |
| 278 uint8_t tX_customViewPrimary; | |
| 279 uint8_t tX_customViewTimeout; | |
| 280 uint8_t timeoutEnterButtonSelectDive; | |
| 281 uint16_t logbookOffset; | |
| 282 uint8_t alwaysShowPPO2; | |
| 283 uint8_t extraDisplay; | |
| 284 uint16_t display_toogle_desc; | |
| 285 int8_t offsetPressure_mbar; | |
| 286 int8_t offsetTemperature_centigrad; | |
| 287 uint8_t gasConsumption_travel_l_min; | |
| 288 uint8_t gasConsumption_bottom_l_min; | |
| 289 uint8_t gasConsumption_deco_l_min; | |
| 290 uint8_t debugModeOnStart; | |
| 291 uint8_t IAmStolenPleaseKillMe; | |
| 292 int16_t compassBearing; | |
| 293 uint8_t lastKnownBatteryPercentage; | |
| 294 uint8_t buttonBalance[3]; // 0 = right, 1 = center, 2 = left | |
| 295 uint8_t firmwareVersion[4]; | |
| 296 uint16_t timeoutSurfacemodeWithSensors; | |
| 297 // new in 0xFFFF0016 | |
| 298 uint8_t VPM_model; | |
| 299 uint8_t GF_model; | |
| 300 // new in 0xFFFF0017 | |
| 301 uint8_t FactoryButtonBase; | |
| 302 uint8_t FactoryButtonBalance[3]; | |
|
112
fdf0272e9213
Added new nvm parameter"FlipDisplay" indicating the screen orientation
Ideenmodellierer
parents:
38
diff
changeset
|
303 /* new in 0xFFFF0018 */ |
|
fdf0272e9213
Added new nvm parameter"FlipDisplay" indicating the screen orientation
Ideenmodellierer
parents:
38
diff
changeset
|
304 uint8_t FlipDisplay; |
|
210
b2a9e9b02df0
New feature: make selected customviews persistent
Jan Mulder <jlmulder@xs4all.nl>
parents:
138
diff
changeset
|
305 /* new in 0xFFFF0019 */ |
|
b2a9e9b02df0
New feature: make selected customviews persistent
Jan Mulder <jlmulder@xs4all.nl>
parents:
138
diff
changeset
|
306 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
|
307 /* 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
|
308 uint8_t MotionDetection; |
|
498
4811f3dfaa52
Added dew parameter to enable selection of customer BigFont screens to be displayed
Ideenmodellierer
parents:
372
diff
changeset
|
309 /* new in 0xFFFF001B */ |
|
4811f3dfaa52
Added dew parameter to enable selection of customer BigFont screens to be displayed
Ideenmodellierer
parents:
372
diff
changeset
|
310 uint32_t cv_config_BigScreen; |
|
539
d784f281833a
Added inertia simulation for compass heading:
Ideenmodellierer
parents:
526
diff
changeset
|
311 /* new in 0xFFFF001C */ |
|
d784f281833a
Added inertia simulation for compass heading:
Ideenmodellierer
parents:
526
diff
changeset
|
312 uint8_t compassInertia; |
|
542
6960df7ddb09
Added new t3 view showing first deco stop and tts in parallel:
Ideenmodellierer
parents:
539
diff
changeset
|
313 uint8_t tX_customViewPrimaryBF; |
| 546 | 314 /* new in 0xFFFF001D */ |
|
626
3e1a0e267f38
Added option to select sensitivity of focus detection:
Ideenmodellierer
parents:
567
diff
changeset
|
315 uint8_t viewPortMode; /* 7-Reserve| 6..5 - Focus spot size | 4-Focusframe | 3-Reserve | 2..0-BacklightBoost */ |
| 546 | 316 uint16_t viewRoll; |
| 317 uint16_t viewPitch; | |
| 318 uint16_t viewYaw; | |
|
560
5d80bb8d22cb
Added O2 sensor source and calibration parameters to setting structure
Ideenmodellierer
parents:
550
diff
changeset
|
319 /* new in 0xFFFF001E */ |
|
5d80bb8d22cb
Added O2 sensor source and calibration parameters to setting structure
Ideenmodellierer
parents:
550
diff
changeset
|
320 uint8_t ppo2sensors_source; |
|
5d80bb8d22cb
Added O2 sensor source and calibration parameters to setting structure
Ideenmodellierer
parents:
550
diff
changeset
|
321 float ppo2sensors_calibCoeff[3]; |
| 567 | 322 uint8_t amPMTime; |
| 650 | 323 /* new in 0xFFFF001F */ |
| 324 uint8_t autoSetpoint; | |
| 710 | 325 uint16_t scrubTimerMax_Obsolete; /* have been replaced with new scrubber data format */ |
| 326 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
|
327 uint8_t scrubTimerMode; |
| 796 | 328 uint8_t ext_sensor_map[8]; /* redefined in 0xFFFF0027 */ |
|
834
2a8af51ab04d
Added event based display changes for big font view:
Ideenmodellierer
parents:
830
diff
changeset
|
329 uint8_t cvAutofocus; |
| 882 | 330 uint8_t slowExitTime; |
| 949 | 331 /* new in 0xFFFF002c */ |
| 332 StimeZone timeZone; | |
| 951 | 333 uint8_t warningBuzzer; |
| 1027 | 334 /* new in 0xFFFF002d */ |
| 335 uint8_t profileName[NUMBER_OF_PROFILES][9]; | |
| 336 uint8_t activeProfile; | |
| 38 | 337 } SSettings; |
| 338 | |
| 339 uint8_t writeData(uint8_t *); | |
| 340 uint8_t readData(uint8_t what,uint8_t *); | |
| 341 uint8_t readDataLimits__8and16BitValues_4and7BytesOutput(uint8_t what, uint8_t * data); | |
| 342 | |
| 343 uint8_t getPPO2Max(void); | |
| 344 uint8_t getPPO2Min(void); | |
| 345 uint8_t getDiveMode(void); | |
| 346 uint8_t getCCRMode(void); | |
| 347 uint8_t getDecoType(void); | |
| 348 uint8_t getFutureTTS(void); | |
| 349 | |
| 1027 | 350 uint16_t settingsGetSize(); |
| 38 | 351 SSettings* settingsGetPointer(void); |
| 1027 | 352 SSettings* profileGetPointer(uint8_t number); |
| 38 | 353 const SSettings* settingsGetPointerStandard(void); |
| 1027 | 354 void set_settings_to_Standard(uint8_t whichSettings); |
| 38 | 355 void mod_settings_for_first_start_with_empty_ext_flash(void); |
| 356 const SFirmwareData* firmwareDataGetPointer(void); | |
| 357 const SHardwareData* hardwareDataGetPointer(void); | |
| 358 uint8_t firmwareVersion_16bit_high(void); | |
| 359 uint8_t firmwareVersion_16bit_low(void); | |
| 360 void hardwareBatchCode(uint8_t *high, uint8_t *low); | |
| 361 | |
| 362 uint8_t RTEminimum_required_high(void); | |
| 363 uint8_t RTEminimum_required_low(void); | |
| 364 uint8_t FONTminimum_required_high(void); | |
| 365 uint8_t FONTminimum_required_low(void); | |
| 366 | |
| 367 void setActualRTEversion(uint8_t high, uint8_t low); | |
| 368 void getActualRTEandFONTversion(uint8_t *RTEhigh, uint8_t *RTElow, uint8_t *FONThigh, uint8_t *FONTlow); | |
| 369 | |
|
993
df052f0347fb
Add settings that have been missing in the bluetooth API:
heinrichsweikamp
parents:
982
diff
changeset
|
370 void setFlipDisplay(uint8_t flipDisplay); |
| 1027 | 371 void set_new_settings_missing_in_ext_flash(uint8_t whichSettings); |
| 372 uint8_t check_and_correct_settings(uint8_t whichSettings); | |
| 38 | 373 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
|
374 void set_settings_button_to_factory_with_individual_buttonBalance(void); |
| 38 | 375 uint8_t getLicence(void); |
| 376 void firmwareGetDate(RTC_DateTypeDef *SdateOutput); | |
| 377 | |
| 378 void settingsHelperButtonSens_original_translate_to_hwOS_values(const uint32_t inputValueRaw, uint8_t *outArray4Values); | |
| 379 | |
| 380 uint8_t buttonBalanceTranslatorHexToArray(uint8_t hexValue, uint8_t* outputArray); | |
| 381 uint8_t buttonBalanceTranslateArrayOutHex(const uint8_t* inputArray); | |
| 382 void getButtonFactorDefaults(uint8_t* basePercentage, uint8_t* buttonBalanceArray); | |
| 383 void settingsWriteFactoryDefaults(uint8_t inputValueRaw, uint8_t *inputBalanceArray); | |
| 384 | |
| 385 void settingsHelperButtonSens_keepPercentageValues(uint32_t inputValueRaw, uint8_t *outArray4Values); | |
| 386 uint8_t settingsHelperButtonSens_translate_percentage_to_hwOS_values(uint8_t inputValuePercentage); | |
| 387 uint8_t settingsHelperButtonSens_translate_hwOS_values_to_percentage(uint8_t inputValuePIC); | |
| 388 | |
|
819
24b39a432bc2
Added debug information in case an error in the settings has been detected:
Ideenmodellierer
parents:
805
diff
changeset
|
389 void get_CorrectionStatus(SSettingsStatus* Status); |
| 662 | 390 void reset_SettingWarning(); |
| 391 uint8_t isSettingsWarning(); | |
| 392 | |
|
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
|
393 bool checkAndFixSetpointSettings(void); |
|
1014
8c0134a287da
Add a log data event to the scrubber timer at the start of the dive and every time the timer (in minutes)
heinrichsweikamp
parents:
993
diff
changeset
|
394 |
|
8c0134a287da
Add a log data event to the scrubber timer at the start of the dive and every time the timer (in minutes)
heinrichsweikamp
parents:
993
diff
changeset
|
395 bool isScrubberWarning(const SScrubberData *scrubberData); |
|
8c0134a287da
Add a log data event to the scrubber timer at the start of the dive and every time the timer (in minutes)
heinrichsweikamp
parents:
993
diff
changeset
|
396 bool isScrubberError(const SScrubberData *scrubberData); |
| 38 | 397 #endif // SETTINGS_H |
