Mercurial > public > ostc4
comparison Discovery/Src/settings.c @ 882:608d3e918146 Evo_2_23
Added slow exit timer function:
At the end of the dive the final ascent to surface should be done slowly. The new function provides a comparison of the current divers depth compared to a linear ascent simulated by the OSTC. The visualization is shown instead of the ascent speed with a little different appearance. The linear ascent is starting from the last stop depth and the time for the ascent may be configurated in the deco settings. The simulated and real peth is compared and the depth color changes based on the difference of the values. In case the diver is much below the timer depth then the timer will stop and wait for the diver to follow.
author | Ideenmodellierer |
---|---|
date | Sat, 31 Aug 2024 17:35:52 +0200 |
parents | e373e90a48db |
children | 2225c467f1e9 |
comparison
equal
deleted
inserted
replaced
881:5b675077ccfb | 882:608d3e918146 |
---|---|
87 | 87 |
88 /* always adjust check_and_correct_settings() accordingly | 88 /* always adjust check_and_correct_settings() accordingly |
89 * There might even be entries with fixed values that have no range | 89 * There might even be entries with fixed values that have no range |
90 */ | 90 */ |
91 const SSettings SettingsStandard = { | 91 const SSettings SettingsStandard = { |
92 .header = 0xFFFF002A, | 92 .header = 0xFFFF002B, |
93 .warning_blink_dsec = 8 * 2, | 93 .warning_blink_dsec = 8 * 2, |
94 .lastDiveLogId = 0, | 94 .lastDiveLogId = 0, |
95 .logFlashNextSampleStartAddress = SAMPLESTART, | 95 .logFlashNextSampleStartAddress = SAMPLESTART, |
96 | 96 |
97 .gas[0].oxygen_percentage = 21, | 97 .gas[0].oxygen_percentage = 21, |
338 .buttonLockActive = 0, | 338 .buttonLockActive = 0, |
339 .compassDeclinationDeg = 0, | 339 .compassDeclinationDeg = 0, |
340 .delaySetpointLow = false, | 340 .delaySetpointLow = false, |
341 .timerDurationS = 180, | 341 .timerDurationS = 180, |
342 .cvAutofocus = 0, | 342 .cvAutofocus = 0, |
343 .slowExitTime = 0 | |
343 }; | 344 }; |
344 | 345 |
345 /* Private function prototypes -----------------------------------------------*/ | 346 /* Private function prototypes -----------------------------------------------*/ |
346 uint8_t checkValue(uint8_t value,uint8_t from, uint8_t to); | 347 uint8_t checkValue(uint8_t value,uint8_t from, uint8_t to); |
347 | 348 |
597 } | 598 } |
598 // no break; | 599 // no break; |
599 case 0xFFFF0029: | 600 case 0xFFFF0029: |
600 Settings.cvAutofocus = 0; | 601 Settings.cvAutofocus = 0; |
601 // no break; | 602 // no break; |
603 case 0xFFFF002A: | |
604 Settings.slowExitTime = 0; | |
605 // no break; | |
602 default: | 606 default: |
603 pSettings->header = pStandard->header; | 607 pSettings->header = pStandard->header; |
604 break; // no break before!! | 608 break; // no break before!! |
605 } | 609 } |
606 } | 610 } |
1294 /* uint16_t divetimeToCreateLogbook; | 1298 /* uint16_t divetimeToCreateLogbook; |
1295 */ | 1299 */ |
1296 if(Settings.divetimeToCreateLogbook != 60) | 1300 if(Settings.divetimeToCreateLogbook != 60) |
1297 { | 1301 { |
1298 Settings.divetimeToCreateLogbook = 60; | 1302 Settings.divetimeToCreateLogbook = 60; |
1303 corrections++; | |
1304 setFirstCorrection(parameterId); | |
1305 } | |
1306 parameterId++; | |
1307 if(Settings.slowExitTime > 9) | |
1308 { | |
1309 Settings.divetimeToCreateLogbook = 0; | |
1299 corrections++; | 1310 corrections++; |
1300 setFirstCorrection(parameterId); | 1311 setFirstCorrection(parameterId); |
1301 } | 1312 } |
1302 parameterId++; | 1313 parameterId++; |
1303 /* uint8_t serialHigh; | 1314 /* uint8_t serialHigh; |