comparison Discovery/Src/tHome.c @ 810:e6827fcd7604

Only jump to Sensor view during charging if sensors are connected: In the past it could happen that the charger view was replaced by the sensor view which was not displaying values because no sensors were connected => no added value in performing the switch. In the new version the automatic jump to the sensor view will only be performed if sennsors are connected.
author Ideenmodellierer
date Sun, 27 Aug 2023 20:55:57 +0200
parents dd7ce655db26
children c4ee952b9425
comparison
equal deleted inserted replaced
809:9602a7338f28 810:e6827fcd7604
646 t3_set_customview_to_primary(); 646 t3_set_customview_to_primary();
647 } 647 }
648 } 648 }
649 } 649 }
650 650
651 if((stateUsed->mode == MODE_SURFACE) && (stateUsed->diveSettings.ppo2sensors_deactivated != 0x07) && (stateUsed->diveSettings.ccrOption != 0) && (!t7_customview_disabled(CVIEW_sensors))) 651 if((stateUsed->mode == MODE_SURFACE) && (!t7_customview_disabled(CVIEW_sensors)))
652 { 652 {
653 tHome_tick_count_o2sens++; 653 tHome_tick_count_o2sens++;
654 if(tHome_tick_count_o2sens > AUTORETURN_O2SENS) 654 if(tHome_tick_count_o2sens > AUTORETURN_O2SENS)
655 { 655 {
656 tHome_tick_count_o2sens = 0; 656 tHome_tick_count_o2sens = 0;
657 t7_select_customview(CVIEW_sensors); 657 if((stateUsed->chargeStatus == CHARGER_off)
658 || (stateUsed->lifeData.ppO2Sensor_bar[0] != 0.0)
659 || (stateUsed->lifeData.ppO2Sensor_bar[1] != 0.0)
660 || (stateUsed->lifeData.ppO2Sensor_bar[2] != 0.0))
661 {
662 t7_select_customview(CVIEW_sensors);
663 }
658 } 664 }
659 } 665 }
660 666
661 t7_tick(); 667 t7_tick();
662 } 668 }