comparison Discovery/Src/buehlmann.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 305f251cc981
children e963d32f746e
comparison
equal deleted inserted replaced
829:d5e68cc08f9a 830:b7d93ff6b3b2
256 } while(next_depth == -1); 256 } while(next_depth == -1);
257 tts_seconds += ascend_time; 257 tts_seconds += ascend_time;
258 gStop.depth = next_depth; 258 gStop.depth = next_depth;
259 for(i = gGas_id + 1; i < BUEHLMANN_STRUCT_MAX_GASES; i++) 259 for(i = gGas_id + 1; i < BUEHLMANN_STRUCT_MAX_GASES; i++)
260 { 260 {
261 if(pDiveSettings->decogaslist[i].change_during_ascent_depth_meter_otherwise_zero == 0) 261 if((pDiveSettings->decogaslist[i].change_during_ascent_depth_meter_otherwise_zero == 0)
262 || (pDiveSettings->gas[pDiveSettings->decogaslist[i].GasIdInSettings].note.ub.decocalc == 0))
262 break; 263 break;
263 float pressureChange = ((float)pDiveSettings->decogaslist[i].change_during_ascent_depth_meter_otherwise_zero) / 10; 264 float pressureChange = ((float)pDiveSettings->decogaslist[i].change_during_ascent_depth_meter_otherwise_zero) / 10;
264 if(gStop.depth <= pressureChange + 0.00001f) 265 if(gStop.depth <= pressureChange + 0.00001f)
265 { 266 {
266 gGas_id = i; 267 gGas_id = i;
456 seconds = 0; 457 seconds = 0;
457 do{ 458 do{
458 pressureTop_tmp = pressureTop; 459 pressureTop_tmp = pressureTop;
459 for(i = gGas_id + 1; i < BUEHLMANN_STRUCT_MAX_GASES; i++) 460 for(i = gGas_id + 1; i < BUEHLMANN_STRUCT_MAX_GASES; i++)
460 { 461 {
461 if(pDiveSettings->decogaslist[i].change_during_ascent_depth_meter_otherwise_zero == 0) 462 if((pDiveSettings->decogaslist[i].change_during_ascent_depth_meter_otherwise_zero == 0)
463 || (pDiveSettings->gas[pDiveSettings->decogaslist[i].GasIdInSettings].note.ub.decocalc == 0))
462 break; 464 break;
463 pressureChange = gSurface_pressure_bar + ((float)pDiveSettings->decogaslist[i].change_during_ascent_depth_meter_otherwise_zero) / 10; 465 pressureChange = gSurface_pressure_bar + ((float)pDiveSettings->decogaslist[i].change_during_ascent_depth_meter_otherwise_zero) / 10;
464 if(pressureBottom <= pressureChange) 466 if(pressureBottom <= pressureChange)
465 { 467 {
466 gGas_id = i; 468 gGas_id = i;
471 } 473 }
472 474
473 } 475 }
474 for(i = gGas_id + 1; i < BUEHLMANN_STRUCT_MAX_GASES; i++) 476 for(i = gGas_id + 1; i < BUEHLMANN_STRUCT_MAX_GASES; i++)
475 { 477 {
476 if(pDiveSettings->decogaslist[i].change_during_ascent_depth_meter_otherwise_zero == 0) 478 if((pDiveSettings->decogaslist[i].change_during_ascent_depth_meter_otherwise_zero == 0)
479 || (pDiveSettings->gas[pDiveSettings->decogaslist[i].GasIdInSettings].note.ub.decocalc == 0))
477 break; 480 break;
478 pressureChange = gSurface_pressure_bar + ((float)pDiveSettings->decogaslist[i].change_during_ascent_depth_meter_otherwise_zero)/ 10; 481 pressureChange = gSurface_pressure_bar + ((float)pDiveSettings->decogaslist[i].change_during_ascent_depth_meter_otherwise_zero)/ 10;
479 if((pressureChange < pressureBottom) && (pressureChange > pressureTop)) 482 if((pressureChange < pressureBottom) && (pressureChange > pressureTop))
480 { 483 {
481 pressureTop_tmp = pressureChange; 484 pressureTop_tmp = pressureChange;