comparison Discovery/Src/tMenuEditPlanner.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 dd7ce655db26
children 07af9efd7c13
comparison
equal deleted inserted replaced
829:d5e68cc08f9a 830:b7d93ff6b3b2
447 GasIdPrev = 0; 447 GasIdPrev = 0;
448 ListCount = 0; 448 ListCount = 0;
449 449
450 for(int i = 1; i < BUEHLMANN_STRUCT_MAX_GASES; i++) 450 for(int i = 1; i < BUEHLMANN_STRUCT_MAX_GASES; i++)
451 { 451 {
452 if(stateSimGetPointer()->diveSettings.decogaslist[i].change_during_ascent_depth_meter_otherwise_zero == 0) 452 if((stateSimGetPointer()->diveSettings.decogaslist[i].change_during_ascent_depth_meter_otherwise_zero == 0)
453 || (stateSimGetPointer()->diveSettings.gas[stateSimGetPointer()->diveSettings.decogaslist[i].GasIdInSettings].note.ub.decocalc == 0))
453 break; 454 break;
454 depthChange = stateSimGetPointer()->diveSettings.decogaslist[i].change_during_ascent_depth_meter_otherwise_zero; 455 depthChange = stateSimGetPointer()->diveSettings.decogaslist[i].change_during_ascent_depth_meter_otherwise_zero;
455 if(depthPrev <= depthChange) 456 if(depthPrev <= depthChange)
456 { 457 {
457 GasIdPrev = i; 458 GasIdPrev = i;
462 } 463 }
463 } 464 }
464 465
465 for(int i = GasIdPrev + 1; i < BUEHLMANN_STRUCT_MAX_GASES; i++) 466 for(int i = GasIdPrev + 1; i < BUEHLMANN_STRUCT_MAX_GASES; i++)
466 { 467 {
467 if(stateSimGetPointer()->diveSettings.decogaslist[i].change_during_ascent_depth_meter_otherwise_zero == 0) 468 if((stateSimGetPointer()->diveSettings.decogaslist[i].change_during_ascent_depth_meter_otherwise_zero == 0)
469 || (stateSimGetPointer()->diveSettings.gas[stateSimGetPointer()->diveSettings.decogaslist[i].GasIdInSettings].note.ub.decocalc == 0))
468 break; 470 break;
469 depthChange = stateSimGetPointer()->diveSettings.decogaslist[i].change_during_ascent_depth_meter_otherwise_zero; 471 depthChange = stateSimGetPointer()->diveSettings.decogaslist[i].change_during_ascent_depth_meter_otherwise_zero;
470 if((depthChange < depthPrev) && (depthChange >= depthNext)) 472 if((depthChange < depthPrev) && (depthChange >= depthNext))
471 { 473 {
472 GasIdNextList[ListCount++] = i; 474 GasIdNextList[ListCount++] = i;