comparison Discovery/Src/simulation.c @ 790:3b5f9557c053

Fix bug introduced in 04b98a2, causing the deco planner to not show deco stops.
author heinrichsweikamp
date Tue, 25 Jul 2023 14:48:58 +0200
parents 21949c88da90
children dd7ce655db26
comparison
equal deleted inserted replaced
789:b7cd0c5c8e43 790:3b5f9557c053
131 131
132 static int last_second = -1; 132 static int last_second = -1;
133 static _Bool two_second = 0; 133 static _Bool two_second = 0;
134 static float lastPressure_bar = 0; 134 static float lastPressure_bar = 0;
135 135
136 if (sim_aim_time_minutes * 60 <= pDiveState->lifeData.dive_time_seconds) { 136 if (sim_aim_time_minutes && sim_aim_time_minutes * 60 <= pDiveState->lifeData.dive_time_seconds) {
137 simulation_set_aim_depth(0); 137 simulation_set_aim_depth(0);
138 } 138 }
139 139
140 float localCalibCoeff[3] = { 0.0, 0.0, 0.0 }; 140 float localCalibCoeff[3] = { 0.0, 0.0, 0.0 };
141 uint8_t index, index2; 141 uint8_t index, index2;
427 gasChangeListDepthGas20x2[0] =0; // depth zero 427 gasChangeListDepthGas20x2[0] =0; // depth zero
428 } 428 }
429 429
430 //Going down / descent 430 //Going down / descent
431 simulation_set_aim_depth(depth_meter); 431 simulation_set_aim_depth(depth_meter);
432 sim_aim_time_minutes = 0;
432 for(int i = 0; i < 60 * dive_time_minutes; i++) 433 for(int i = 0; i < 60 * dive_time_minutes; i++)
433 { 434 {
434 simulation_UpdateLifeData(0); 435 simulation_UpdateLifeData(0);
435 check_warning2(pDiveState); 436 check_warning2(pDiveState);
436 if(pDiveState->warnings.betterGas) 437 if(pDiveState->warnings.betterGas)