Mercurial > public > ostc4
comparison Discovery/Src/tMenuEditPlanner.c @ 981:c6c781a2e85b default
Merge into default
| author | heinrichsweikamp |
|---|---|
| date | Tue, 11 Feb 2025 18:12:00 +0100 |
| parents | 79b522fbabe6 |
| children | 7891160acde3 |
comparison
equal
deleted
inserted
replaced
| 871:f7318457df4d | 981:c6c781a2e85b |
|---|---|
| 405 text[0] = TXT_2BYTE; | 405 text[0] = TXT_2BYTE; |
| 406 text[1] = TXT2BYTE_ButtonNext; | 406 text[1] = TXT2BYTE_ButtonNext; |
| 407 text[2] = 0; | 407 text[2] = 0; |
| 408 write_field_button(StMPLAN5_ExitResult, 30, 800, ME_Y_LINE6, &FontT48, text); | 408 write_field_button(StMPLAN5_ExitResult, 30, 800, ME_Y_LINE6, &FontT48, text); |
| 409 setEvent(StMPLAN5_ExitResult, (uint32_t)OnAction_PlanResultExit); | 409 setEvent(StMPLAN5_ExitResult, (uint32_t)OnAction_PlanResultExit); |
| 410 tMenuEdit_select(StMPLAN5_ExitResult); | |
| 410 } | 411 } |
| 411 | 412 |
| 412 | 413 |
| 413 | 414 |
| 414 void refresh_PlanResult_helper(char *text, int start) | 415 void refresh_PlanResult_helper(char *text, int start) |
| 447 GasIdPrev = 0; | 448 GasIdPrev = 0; |
| 448 ListCount = 0; | 449 ListCount = 0; |
| 449 | 450 |
| 450 for(int i = 1; i < BUEHLMANN_STRUCT_MAX_GASES; i++) | 451 for(int i = 1; i < BUEHLMANN_STRUCT_MAX_GASES; i++) |
| 451 { | 452 { |
| 452 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 #ifdef ENABLE_DECOCALC_OPTION | |
| 455 || (stateSimGetPointer()->diveSettings.gas[stateSimGetPointer()->diveSettings.decogaslist[i].GasIdInSettings].note.ub.decocalc == 0) | |
| 456 #endif | |
| 457 ) | |
| 453 break; | 458 break; |
| 454 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; |
| 455 if(depthPrev <= depthChange) | 460 if(depthPrev <= depthChange) |
| 456 { | 461 { |
| 457 GasIdPrev = i; | 462 GasIdPrev = i; |
| 462 } | 467 } |
| 463 } | 468 } |
| 464 | 469 |
| 465 for(int i = GasIdPrev + 1; i < BUEHLMANN_STRUCT_MAX_GASES; i++) | 470 for(int i = GasIdPrev + 1; i < BUEHLMANN_STRUCT_MAX_GASES; i++) |
| 466 { | 471 { |
| 467 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) |
| 473 #ifdef ENABLE_DECOCALC_OPTION | |
| 474 || (stateSimGetPointer()->diveSettings.gas[stateSimGetPointer()->diveSettings.decogaslist[i].GasIdInSettings].note.ub.decocalc == 0) | |
| 475 #endif | |
| 476 ) | |
| 468 break; | 477 break; |
| 469 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; |
| 470 if((depthChange < depthPrev) && (depthChange >= depthNext)) | 479 if((depthChange < depthPrev) && (depthChange >= depthNext)) |
| 471 { | 480 { |
| 472 GasIdNextList[ListCount++] = i; | 481 GasIdNextList[ListCount++] = i; |
