comparison Discovery/Src/base.c @ 651:7b5a063f080f

Automatik setpoint change: Automatically switch setpoint in case the option is activated and the selected depth is passed
author Ideenmodellierer
date Mon, 19 Apr 2021 20:20:38 +0200
parents c737cf5d9067
children 1b995079c045
comparison
equal deleted inserted replaced
650:5f0d3dce5ef4 651:7b5a063f080f
232 #include "test_vpm.h" 232 #include "test_vpm.h"
233 #include "tDebug.h" 233 #include "tDebug.h"
234 #include "motion.h" 234 #include "motion.h"
235 #include "t7.h" 235 #include "t7.h"
236 #include "t3.h" 236 #include "t3.h"
237 #include "tMenuEditSetpoint.h"
237 238
238 #ifdef DEMOMODE 239 #ifdef DEMOMODE
239 #include "demo.h" 240 #include "demo.h"
240 static void TIM_DEMO_init(void); 241 static void TIM_DEMO_init(void);
241 #endif 242 #endif
1563 1564
1564 static CALC_WHAT what = CALC_INVALID; 1565 static CALC_WHAT what = CALC_INVALID;
1565 static int counter = 0; 1566 static int counter = 0;
1566 if((stateUsed->mode != MODE_DIVE) || (stateUsed->diveSettings.diveMode == DIVEMODE_Apnea) || (stateUsed->diveSettings.diveMode == DIVEMODE_Gauge) || (decoLock != DECO_CALC_ready )) 1567 if((stateUsed->mode != MODE_DIVE) || (stateUsed->diveSettings.diveMode == DIVEMODE_Apnea) || (stateUsed->diveSettings.diveMode == DIVEMODE_Gauge) || (decoLock != DECO_CALC_ready ))
1567 return; 1568 return;
1569
1570 if((stateUsed->warnings.betterSetpoint) && (settingsGetPointer()->autoSetpoint) && (settingsGetPointer()->CCR_Mode == CCRMODE_FixedSetpoint))
1571 {
1572 openEdit_DiveSelectBetterSetpoint();
1573 }
1568 1574
1569 decoLock = DECO_CALC_running; 1575 decoLock = DECO_CALC_running;
1570 1576
1571 if(stateDeco.diveSettings.deco_type.ub.standard == GF_MODE) 1577 if(stateDeco.diveSettings.deco_type.ub.standard == GF_MODE)
1572 { 1578 {