Mercurial > public > ostc4
comparison Discovery/Src/tMenuEditPlanner.c @ 973:79b522fbabe6 Evo_2_23
Deactivate deco gas calculation option:
In the previous version had the option to consider a deco gas i the calculation or not. Reason for this was to have the automatic gas suggestion available while the deco calculation is still based on the current gas.
This might cause a critical situation in case the diver is not sure if the option is active or not => In the new version the TTS / deco is always calculated considering all deco gases.
| author | Ideenmodellierer |
|---|---|
| date | Sun, 26 Jan 2025 19:31:38 +0100 |
| parents | 07af9efd7c13 |
| children | 7891160acde3 |
comparison
equal
deleted
inserted
replaced
| 972:12426391edd9 | 973:79b522fbabe6 |
|---|---|
| 449 ListCount = 0; | 449 ListCount = 0; |
| 450 | 450 |
| 451 for(int i = 1; i < BUEHLMANN_STRUCT_MAX_GASES; i++) | 451 for(int i = 1; i < BUEHLMANN_STRUCT_MAX_GASES; i++) |
| 452 { | 452 { |
| 453 if((stateSimGetPointer()->diveSettings.decogaslist[i].change_during_ascent_depth_meter_otherwise_zero == 0) | 453 if((stateSimGetPointer()->diveSettings.decogaslist[i].change_during_ascent_depth_meter_otherwise_zero == 0) |
| 454 || (stateSimGetPointer()->diveSettings.gas[stateSimGetPointer()->diveSettings.decogaslist[i].GasIdInSettings].note.ub.decocalc == 0)) | 454 #ifdef ENABLE_DECOCALC_OPTION |
| 455 || (stateSimGetPointer()->diveSettings.gas[stateSimGetPointer()->diveSettings.decogaslist[i].GasIdInSettings].note.ub.decocalc == 0) | |
| 456 #endif | |
| 457 ) | |
| 455 break; | 458 break; |
| 456 depthChange = stateSimGetPointer()->diveSettings.decogaslist[i].change_during_ascent_depth_meter_otherwise_zero; | 459 depthChange = stateSimGetPointer()->diveSettings.decogaslist[i].change_during_ascent_depth_meter_otherwise_zero; |
| 457 if(depthPrev <= depthChange) | 460 if(depthPrev <= depthChange) |
| 458 { | 461 { |
| 459 GasIdPrev = i; | 462 GasIdPrev = i; |
| 465 } | 468 } |
| 466 | 469 |
| 467 for(int i = GasIdPrev + 1; i < BUEHLMANN_STRUCT_MAX_GASES; i++) | 470 for(int i = GasIdPrev + 1; i < BUEHLMANN_STRUCT_MAX_GASES; i++) |
| 468 { | 471 { |
| 469 if((stateSimGetPointer()->diveSettings.decogaslist[i].change_during_ascent_depth_meter_otherwise_zero == 0) | 472 if((stateSimGetPointer()->diveSettings.decogaslist[i].change_during_ascent_depth_meter_otherwise_zero == 0) |
| 470 || (stateSimGetPointer()->diveSettings.gas[stateSimGetPointer()->diveSettings.decogaslist[i].GasIdInSettings].note.ub.decocalc == 0)) | 473 #ifdef ENABLE_DECOCALC_OPTION |
| 474 || (stateSimGetPointer()->diveSettings.gas[stateSimGetPointer()->diveSettings.decogaslist[i].GasIdInSettings].note.ub.decocalc == 0) | |
| 475 #endif | |
| 476 ) | |
| 471 break; | 477 break; |
| 472 depthChange = stateSimGetPointer()->diveSettings.decogaslist[i].change_during_ascent_depth_meter_otherwise_zero; | 478 depthChange = stateSimGetPointer()->diveSettings.decogaslist[i].change_during_ascent_depth_meter_otherwise_zero; |
| 473 if((depthChange < depthPrev) && (depthChange >= depthNext)) | 479 if((depthChange < depthPrev) && (depthChange >= depthNext)) |
| 474 { | 480 { |
| 475 GasIdNextList[ListCount++] = i; | 481 GasIdNextList[ListCount++] = i; |
