Mercurial > public > ostc4
diff 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 |
line wrap: on
line diff
--- a/Discovery/Src/simulation.c Wed Jul 12 10:13:25 2023 +0200 +++ b/Discovery/Src/simulation.c Tue Jul 25 14:48:58 2023 +0200 @@ -133,7 +133,7 @@ static _Bool two_second = 0; static float lastPressure_bar = 0; - if (sim_aim_time_minutes * 60 <= pDiveState->lifeData.dive_time_seconds) { + if (sim_aim_time_minutes && sim_aim_time_minutes * 60 <= pDiveState->lifeData.dive_time_seconds) { simulation_set_aim_depth(0); } @@ -429,6 +429,7 @@ //Going down / descent simulation_set_aim_depth(depth_meter); + sim_aim_time_minutes = 0; for(int i = 0; i < 60 * dive_time_minutes; i++) { simulation_UpdateLifeData(0);