Mercurial > public > ostc4
comparison Discovery/Src/settings.c @ 687:5e9973957318 Betatest
Increased version numbers:
increased RTE version because of interface change and firmware as well to have a better indicator of the versions used during beta test phase.
author | Ideenmodellierer |
---|---|
date | Fri, 05 Aug 2022 15:10:10 +0200 |
parents | 12d029f38430 |
children | 49b164022335 |
comparison
equal
deleted
inserted
replaced
686:b1e24513b83e | 687:5e9973957318 |
---|---|
39 static uint8_t settingsWarning = 0; /* Active if setting values have been corrected */ | 39 static uint8_t settingsWarning = 0; /* Active if setting values have been corrected */ |
40 | 40 |
41 SSettings Settings; | 41 SSettings Settings; |
42 | 42 |
43 const uint8_t RTErequiredHigh = 2; | 43 const uint8_t RTErequiredHigh = 2; |
44 const uint8_t RTErequiredLow = 7; | 44 const uint8_t RTErequiredLow = 9; |
45 | 45 |
46 const uint8_t FONTrequiredHigh = 1; | 46 const uint8_t FONTrequiredHigh = 1; |
47 const uint8_t FONTrequiredLow = 0; | 47 const uint8_t FONTrequiredLow = 0; |
48 | 48 |
49 uint8_t RTEactualHigh = 0; | 49 uint8_t RTEactualHigh = 0; |
58 | 58 |
59 const SFirmwareData firmware_FirmwareData __attribute__( (section(".firmware_firmware_data")) ) = | 59 const SFirmwareData firmware_FirmwareData __attribute__( (section(".firmware_firmware_data")) ) = |
60 { | 60 { |
61 .versionFirst = 1, | 61 .versionFirst = 1, |
62 .versionSecond = 5, | 62 .versionSecond = 5, |
63 .versionThird = 9, | 63 .versionThird = 10, |
64 .versionBeta = 0, | 64 .versionBeta = 0, |
65 | 65 |
66 /* 4 bytes with trailing 0 */ | 66 /* 4 bytes with trailing 0 */ |
67 .signature = "mh", | 67 .signature = "mh", |
68 | 68 |
85 | 85 |
86 /* always adjust check_and_correct_settings() accordingly | 86 /* always adjust check_and_correct_settings() accordingly |
87 * There might even be entries with fixed values that have no range | 87 * There might even be entries with fixed values that have no range |
88 */ | 88 */ |
89 const SSettings SettingsStandard = { | 89 const SSettings SettingsStandard = { |
90 .header = 0xFFFF0021, | 90 .header = 0xFFFF0022, |
91 .warning_blink_dsec = 8 * 2, | 91 .warning_blink_dsec = 8 * 2, |
92 .lastDiveLogId = 0, | 92 .lastDiveLogId = 0, |
93 .logFlashNextSampleStartAddress = SAMPLESTART, | 93 .logFlashNextSampleStartAddress = SAMPLESTART, |
94 | 94 |
95 .gas[0].oxygen_percentage = 21, | 95 .gas[0].oxygen_percentage = 21, |
497 pSettings->pscr_o2_drop = 4; | 497 pSettings->pscr_o2_drop = 4; |
498 // no break | 498 // no break |
499 case 0xFFFF0020: | 499 case 0xFFFF0020: |
500 pSettings->co2_sensor_active = 0; | 500 pSettings->co2_sensor_active = 0; |
501 // no break; | 501 // no break; |
502 case 0xFFFF0021: | |
503 pSettings->ext_uart_protocol = 0; | |
504 // no break; | |
502 default: | 505 default: |
503 pSettings->header = pStandard->header; | 506 pSettings->header = pStandard->header; |
504 break; // no break before!! | 507 break; // no break before!! |
505 } | 508 } |
506 } | 509 } |
1483 } | 1486 } |
1484 | 1487 |
1485 if(Settings.co2_sensor_active > 1) | 1488 if(Settings.co2_sensor_active > 1) |
1486 { | 1489 { |
1487 Settings.co2_sensor_active = 0; | 1490 Settings.co2_sensor_active = 0; |
1491 corrections++; | |
1492 } | |
1493 if(Settings.co2_sensor_active > UART_MAX_PROTOCOL) | |
1494 { | |
1495 Settings.ext_uart_protocol = 0; | |
1488 corrections++; | 1496 corrections++; |
1489 } | 1497 } |
1490 | 1498 |
1491 if(corrections) | 1499 if(corrections) |
1492 { | 1500 { |