Mercurial > public > ostc4
changeset 685:980d7f8d5530 Betatest
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
author | Ideenmodellierer |
---|---|
date | Wed, 03 Aug 2022 18:19:03 +0200 |
parents | 9bc817e9e221 |
children | b1e24513b83e |
files | Discovery/Inc/t7.h Discovery/Src/tHome.c |
diffstat | 2 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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);
--- 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)