comparison Discovery/Src/tMenuEditGasOC.c @ 647:15f6f0b5786c

Integrated selection of bailout in the diluent selection page: To be able to introduce a new menu page for future development, the selection of bailout cases is now combined with the selection of the diluent at one page. To enable this the concept of a "shadow page" has been introduced. With that the original functionality may be reused without need to a a standalone page. The bailout /diluen page is now switched (surface mode) using the last menu line of the gas selection page
author Ideenmodellierer
date Tue, 13 Apr 2021 19:25:41 +0200
parents a9c195be907e
children 1b995079c045
comparison
equal deleted inserted replaced
646:0fc1b47d2482 647:15f6f0b5786c
87 /* Exported functions --------------------------------------------------------*/ 87 /* Exported functions --------------------------------------------------------*/
88 88
89 void openEdit_GasCC(uint8_t line) 89 void openEdit_GasCC(uint8_t line)
90 { 90 {
91 if(actual_menu_content == MENU_SURFACE) 91 if(actual_menu_content == MENU_SURFACE)
92 openEdit_Gas(line , 1); 92 {
93 if(line == 6)
94 {
95 if((settingsGetPointer()->dive_mode == DIVEMODE_CCR) || (stateUsed->diveSettings.ccrOption == 1))
96 {
97 selectPage(StMOG);
98 }
99 }
100 else
101 {
102 openEdit_Gas(line , 1);
103 }
104 }
105 else
106 {
107 if(line == 6)
108 {
109 openEdit_SpecialDiveGasMenu(1);
110 }
111 else
112 {
113 openEdit_DiveGasSelect(line, 1);
114 }
115 }
116 }
117
118
119 void openEdit_GasOC(uint8_t line)
120 {
121 if(actual_menu_content == MENU_SURFACE)
122 {
123 if(line == 6)
124 {
125 if((settingsGetPointer()->dive_mode == DIVEMODE_CCR) || (stateUsed->diveSettings.ccrOption == 1))
126 {
127 selectPage(StMCG);
128 }
129 }
130 else
131 {
132 openEdit_Gas(line, 0);
133 }
134 }
93 else 135 else
94 if(line == 6) 136 if(line == 6)
95 openEdit_SpecialDiveGasMenu(1); 137 {
96 else
97 openEdit_DiveGasSelect(line, 1);
98 }
99
100
101 void openEdit_GasOC(uint8_t line)
102 {
103 if(actual_menu_content == MENU_SURFACE)
104 openEdit_Gas(line, 0);
105 else
106 if(line == 6)
107 openEdit_SpecialDiveGasMenu(0); 138 openEdit_SpecialDiveGasMenu(0);
108 else 139 }
140 else
141 {
109 openEdit_DiveGasSelect(line, 0); 142 openEdit_DiveGasSelect(line, 0);
143 }
110 } 144 }
111 145
112 146
113 /* dive mode */ 147 /* dive mode */
114 void openEdit_DiveSelectBetterGas(void) 148 void openEdit_DiveSelectBetterGas(void)