Mercurial > public > ostc4
comparison 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 |
comparison
equal
deleted
inserted
replaced
348:84f5c18b74ea | 349:9d82411d0afa |
---|---|
549 if(ticksdiff >= Scheduler.tick_execute1second) | 549 if(ticksdiff >= Scheduler.tick_execute1second) |
550 { | 550 { |
551 Scheduler.tick_execute1second = 0xFFFFFFFF; /* execute once only in the second cycle */ | 551 Scheduler.tick_execute1second = 0xFFFFFFFF; /* execute once only in the second cycle */ |
552 if(global.dataSendToSlave.diveModeInfo != DIVEMODE_Apnea) | 552 if(global.dataSendToSlave.diveModeInfo != DIVEMODE_Apnea) |
553 { | 553 { |
554 if(ManualExitDiveCounter) | |
555 { | |
556 ManualExitDiveCounter--; | |
557 } | |
558 scheduleUpdateLifeData(0); // includes tissues | 554 scheduleUpdateLifeData(0); // includes tissues |
559 global.lifeData.dive_time_seconds++; // there is dive_time_seconds_without_surface_time too | 555 global.lifeData.dive_time_seconds++; // there is dive_time_seconds_without_surface_time too |
560 global.lifeData.ppO2 = decom_calc_ppO2(global.lifeData.pressure_ambient_bar, &global.lifeData.actualGas); | 556 global.lifeData.ppO2 = decom_calc_ppO2(global.lifeData.pressure_ambient_bar, &global.lifeData.actualGas); |
561 decom_oxygen_calculate_cns(&global.lifeData.cns,global.lifeData.ppO2); | 557 decom_oxygen_calculate_cns(&global.lifeData.cns,global.lifeData.ppO2); |
562 decom_oxygen_calculate_otu(&global.lifeData.otu,global.lifeData.ppO2); | 558 decom_oxygen_calculate_otu(&global.lifeData.otu,global.lifeData.ppO2); |
832 global.accidentRemainingSeconds = 0; | 828 global.accidentRemainingSeconds = 0; |
833 vpm_init(&global.vpm, global.conservatism, global.repetitive_dive, global.seconds_since_last_dive); | 829 vpm_init(&global.vpm, global.conservatism, global.repetitive_dive, global.seconds_since_last_dive); |
834 clearDecoNow = 0; | 830 clearDecoNow = 0; |
835 } | 831 } |
836 | 832 |
833 if(ManualExitDiveCounter) | |
834 { | |
835 ManualExitDiveCounter--; | |
836 } | |
837 | |
837 if(global.seconds_since_last_dive) | 838 if(global.seconds_since_last_dive) |
838 { | 839 { |
839 schedule_update_timer_helper(-1); | 840 schedule_update_timer_helper(-1); |
840 } | 841 } |
841 | 842 |