Mercurial > public > ostc4
comparison Discovery/Src/settings.c @ 650:5f0d3dce5ef4
Automatik setpoint change:
In previous versions a better set point was suggested by the OSTC but had to be confirmed using the quick menu functionality. To improve usability an option has been added to the setpoint menu which allows the selection of automatically setpoint changes. If activated the OSTC will automatically switch to the setpoint in case the matching depth is passed.
author | Ideenmodellierer |
---|---|
date | Mon, 19 Apr 2021 20:19:32 +0200 |
parents | ebe3fc302ab8 |
children | f6212495f34f |
comparison
equal
deleted
inserted
replaced
649:60162a939c06 | 650:5f0d3dce5ef4 |
---|---|
83 | 83 |
84 /* always adjust check_and_correct_settings() accordingly | 84 /* always adjust check_and_correct_settings() accordingly |
85 * There might even be entries with fixed values that have no range | 85 * There might even be entries with fixed values that have no range |
86 */ | 86 */ |
87 const SSettings SettingsStandard = { | 87 const SSettings SettingsStandard = { |
88 .header = 0xFFFF001E, | 88 .header = 0xFFFF001F, |
89 .warning_blink_dsec = 8 * 2, | 89 .warning_blink_dsec = 8 * 2, |
90 .lastDiveLogId = 0, | 90 .lastDiveLogId = 0, |
91 .logFlashNextSampleStartAddress = 0, | 91 .logFlashNextSampleStartAddress = 0, |
92 | 92 |
93 .gas[0].oxygen_percentage = 21, | 93 .gas[0].oxygen_percentage = 21, |
321 .ppo2sensors_source = 0, | 321 .ppo2sensors_source = 0, |
322 .ppo2sensors_calibCoeff[0] = 0.0, | 322 .ppo2sensors_calibCoeff[0] = 0.0, |
323 .ppo2sensors_calibCoeff[1] = 0.0, | 323 .ppo2sensors_calibCoeff[1] = 0.0, |
324 .ppo2sensors_calibCoeff[2] = 0.0, | 324 .ppo2sensors_calibCoeff[2] = 0.0, |
325 .amPMTime = 0, | 325 .amPMTime = 0, |
326 .autoSetpoint = 0, | |
327 .scrubTimerMax = 0, | |
328 .scrubTimerCur = 0, | |
326 }; | 329 }; |
327 | 330 |
328 /* Private function prototypes -----------------------------------------------*/ | 331 /* Private function prototypes -----------------------------------------------*/ |
329 uint8_t checkValue(uint8_t value,uint8_t from, uint8_t to); | 332 uint8_t checkValue(uint8_t value,uint8_t from, uint8_t to); |
330 | 333 |
1437 if(Settings.amPMTime > 1) /* only boolean values allowed */ | 1440 if(Settings.amPMTime > 1) /* only boolean values allowed */ |
1438 { | 1441 { |
1439 Settings.amPMTime = 0; | 1442 Settings.amPMTime = 0; |
1440 corrections++; | 1443 corrections++; |
1441 } | 1444 } |
1445 | |
1446 if(Settings.autoSetpoint > 1) /* only boolean values allowed */ | |
1447 { | |
1448 Settings.autoSetpoint = 0; | |
1449 corrections++; | |
1450 } | |
1451 | |
1452 if((Settings.scrubTimerMax > MAX_SCRUBBER_TIME) || (Settings.scrubTimerCur > MAX_SCRUBBER_TIME)) | |
1453 { | |
1454 Settings.scrubTimerMax = 0; | |
1455 Settings.scrubTimerCur = 0; | |
1456 corrections++; | |
1457 } | |
1458 | |
1442 if(corrections > 255) | 1459 if(corrections > 255) |
1443 return 255; | 1460 return 255; |
1444 else | 1461 else |
1445 return (uint8_t)corrections; | 1462 return (uint8_t)corrections; |
1446 } | 1463 } |