Mercurial > public > ostc4
diff Small_CPU/Src/scheduler.c @ 349:9d82411d0afa FlightMode_Improvment
Decrease ManualExitDiveCounter in surface mode
Bugfix: option would be enabled for 30 dive minutes instead of 30 minutes surface time
author | ideenmodellierer |
---|---|
date | Thu, 03 Oct 2019 21:39:28 +0200 |
parents | 73325a78c907 |
children | cb3870f79e9d |
line wrap: on
line diff
--- a/Small_CPU/Src/scheduler.c Thu Oct 03 21:34:52 2019 +0200 +++ b/Small_CPU/Src/scheduler.c Thu Oct 03 21:39:28 2019 +0200 @@ -551,10 +551,6 @@ Scheduler.tick_execute1second = 0xFFFFFFFF; /* execute once only in the second cycle */ if(global.dataSendToSlave.diveModeInfo != DIVEMODE_Apnea) { - if(ManualExitDiveCounter) - { - ManualExitDiveCounter--; - } scheduleUpdateLifeData(0); // includes tissues global.lifeData.dive_time_seconds++; // there is dive_time_seconds_without_surface_time too global.lifeData.ppO2 = decom_calc_ppO2(global.lifeData.pressure_ambient_bar, &global.lifeData.actualGas); @@ -834,6 +830,11 @@ clearDecoNow = 0; } + if(ManualExitDiveCounter) + { + ManualExitDiveCounter--; + } + if(global.seconds_since_last_dive) { schedule_update_timer_helper(-1);