Mercurial > public > ostc4
comparison Discovery/Src/settings.c @ 949:c6b858f2e025 Evo_2_23 tip
GNSS UTC in Date-Time menu:
The UTC time provided by the gnss module is not shown in the date-time settings menu. If a valid time signal is available then the OSTC RTC may be set to it by selecting the UTC menu entry. The time zone has to be selected manually. This is possible using a separate edit line.
author | Ideenmodellierer |
---|---|
date | Sun, 22 Dec 2024 21:19:21 +0100 |
parents | 2225c467f1e9 |
children |
comparison
equal
deleted
inserted
replaced
948:abdd72c8b567 | 949:c6b858f2e025 |
---|---|
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 = 0xFFFF002B, | 92 .header = 0xFFFF002C, |
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 .slowExitTime = 0, |
344 .timeZone.hours = 0, | |
345 .timeZone.minutes = 0 | |
344 }; | 346 }; |
345 | 347 |
346 /* Private function prototypes -----------------------------------------------*/ | 348 /* Private function prototypes -----------------------------------------------*/ |
347 uint8_t checkValue(uint8_t value,uint8_t from, uint8_t to); | 349 uint8_t checkValue(uint8_t value,uint8_t from, uint8_t to); |
348 | 350 |
601 Settings.cvAutofocus = 0; | 603 Settings.cvAutofocus = 0; |
602 // no break; | 604 // no break; |
603 case 0xFFFF002A: | 605 case 0xFFFF002A: |
604 Settings.slowExitTime = 0; | 606 Settings.slowExitTime = 0; |
605 // no break; | 607 // no break; |
608 case 0xFFFF002B: | |
609 Settings.timeZone.hours = 0; | |
610 Settings.timeZone.minutes = 0; | |
611 // no break; | |
606 default: | 612 default: |
607 pSettings->header = pStandard->header; | 613 pSettings->header = pStandard->header; |
608 break; // no break before!! | 614 break; // no break before!! |
609 } | 615 } |
610 } | 616 } |
1852 { | 1858 { |
1853 corrections++; | 1859 corrections++; |
1854 Settings.cvAutofocus = 0; | 1860 Settings.cvAutofocus = 0; |
1855 } | 1861 } |
1856 parameterId++; | 1862 parameterId++; |
1863 if((Settings.timeZone.hours > 14) | |
1864 || (Settings.timeZone.hours < -12) | |
1865 || (Settings.timeZone.minutes > 45)) | |
1866 { | |
1867 Settings.timeZone.hours = 0; | |
1868 Settings.timeZone.minutes = 0; | |
1869 corrections++; | |
1870 } | |
1871 parameterId++; | |
1857 if(corrections) | 1872 if(corrections) |
1858 { | 1873 { |
1859 settingsWarning = 1; | 1874 settingsWarning = 1; |
1860 } | 1875 } |
1861 else | 1876 else |