comparison Discovery/Src/settings.c @ 830:b7d93ff6b3b2 Evo_2_23

Added selection if an active gas shall be used for deco calculation or not: In previous version selecting a gas as deco gas automatically activated the gas for deco calculation. Some divers prever to have the deco time displayed which matches to the gas currently in use. These divers kept the gas deactivated unless they switch to it. Features like gas usability visualization or easy gas change using quick selection were not usable for these divers. With introduction of the new option the gas switching / visualization features may be used without having the gas been considered for calculation in the background. The option may be operated in the gas selection menu.
author Ideenmodellierer
date Thu, 16 Nov 2023 20:32:09 +0100
parents 7322adb00305
children 2a8af51ab04d
comparison
equal deleted inserted replaced
829:d5e68cc08f9a 830:b7d93ff6b3b2
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 = 0xFFFF0028, 92 .header = 0xFFFF0029,
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,
579 } 579 }
580 } 580 }
581 pSettings->cv_config_BigScreen = pSettings->cv_config_BigScreen >> (LEGACY_T3_START_ID_PRE_TIMER - 3); 581 pSettings->cv_config_BigScreen = pSettings->cv_config_BigScreen >> (LEGACY_T3_START_ID_PRE_TIMER - 3);
582 pSettings->cv_config_BigScreen &= ~0x00000007; /* just to be sure: clear lower three bits */ 582 pSettings->cv_config_BigScreen &= ~0x00000007; /* just to be sure: clear lower three bits */
583 pSettings->cv_config_BigScreen |= tmp; 583 pSettings->cv_config_BigScreen |= tmp;
584 584 // no break;
585 case 0xFFFF0028: /* In previous version deco gases were automatically used for deco calculation */
586 for(tmp=1; tmp<=2*NUM_GASES; tmp++) /* This is now handled by an additional parameter. Set it to true to maintain same behavior as before */
587 {
588 if(Settings.gas[tmp].note.ub.deco)
589 {
590 Settings.gas[tmp].note.ub.decocalc = 1;
591 }
592 else
593 {
594 Settings.gas[tmp].note.ub.decocalc = 0;
595 }
596 }
585 // no break; 597 // no break;
586 default: 598 default:
587 pSettings->header = pStandard->header; 599 pSettings->header = pStandard->header;
588 break; // no break before!! 600 break; // no break before!!
589 } 601 }