comparison Discovery/Src/tMenuEditGasOC.c @ 682:8775d3dc6325 Betatest

Bugfix low ppO2 warning in bailout mode: the code has different sources for divesettings (real and simulated). The ppo2 calculation code used the pointer to the real structure. As result in simulation mode an error occured caused by the ppo2 calculation which was not aware that a bailout happened (because the real structure was references instead of the simulator ones). The problem has been fixed by using the "stateUsed" pointer which is refering to the structure currenty in use.
author Ideenmodellierer
date Mon, 25 Apr 2022 21:15:01 +0200
parents 1b995079c045
children 01f40cb1057e
comparison
equal deleted inserted replaced
681:7fa5ef6ae419 682:8775d3dc6325
165 165
166 166
167 /* select gas in divemode */ 167 /* select gas in divemode */
168 void openEdit_DiveGasSelect(uint8_t line, uint8_t ccr) 168 void openEdit_DiveGasSelect(uint8_t line, uint8_t ccr)
169 { 169 {
170 openEdit_DiveGasSelect_Subroutine(line, ccr); 170 if(!ccr)
171 if(!ccr) 171 {
172 tMEGas_check_switch_to_bailout(); 172 tMEGas_check_switch_to_bailout();
173 }
174 openEdit_DiveGasSelect_Subroutine(line, ccr);
175
173 exitMenuEdit_to_Home_with_Menu_Update(); 176 exitMenuEdit_to_Home_with_Menu_Update();
174 } 177 }
175 178
176 179
177 void openEdit_DiveGasSelect_Subroutine(uint8_t line, uint8_t ccr) 180 void openEdit_DiveGasSelect_Subroutine(uint8_t line, uint8_t ccr)