# HG changeset patch # User Ideenmodellierer # Date 1659543543 -7200 # Node ID 980d7f8d55300b380521c27c7a3fe9475496f0f0 # Parent 9bc817e9e221a4f5312779ffb54df67cb0ac9c1a Bugfix automatic switch to o2 sensor custom view: In surface mode the custom view will automatically switch to the o2 sensor view in case the OSTC4 is set to sensor mode. This was also done in case the o2 sensor view was deactivated. This lead to a automatic switch to e.g. compass what was not intended. In the new version the automatic switching is deactivated in case the custom view is deactivated diff -r 9bc817e9e221 -r 980d7f8d5530 Discovery/Inc/t7.h --- a/Discovery/Inc/t7.h Thu Jun 02 20:24:59 2022 +0200 +++ b/Discovery/Inc/t7.h Wed Aug 03 18:19:03 2022 +0200 @@ -73,6 +73,7 @@ void init_t7_compass(void); uint8_t t7_GetEnabled_customviews(); +uint8_t t7_customview_disabled(uint8_t view); /* void t7c_refresh(uint32_t FramebufferStartAddress); diff -r 9bc817e9e221 -r 980d7f8d5530 Discovery/Src/tHome.c --- a/Discovery/Src/tHome.c Thu Jun 02 20:24:59 2022 +0200 +++ b/Discovery/Src/tHome.c Wed Aug 03 18:19:03 2022 +0200 @@ -590,7 +590,7 @@ } } - if((stateUsed->mode == MODE_SURFACE) && (stateUsed->diveSettings.ppo2sensors_deactivated != 0x07) && (stateUsed->diveSettings.ccrOption != 0)) + if((stateUsed->mode == MODE_SURFACE) && (stateUsed->diveSettings.ppo2sensors_deactivated != 0x07) && (stateUsed->diveSettings.ccrOption != 0) && (!t7_customview_disabled(CVIEW_sensors))) { tHome_tick_count_o2sens++; if(tHome_tick_count_o2sens > AUTORETURN_O2SENS)