Mercurial > public > ostc4
changeset 505:06b21f1e47a5
Removed second big font profile
The nex big font views have been introduced using an additional profile because an individual selection was not possible. By introducing the selection dialog for big font data views this additional profile is no longer needed.
author | Ideenmodellierer |
---|---|
date | Sun, 30 Aug 2020 17:14:31 +0200 |
parents | 8428195a4967 |
children | 998529b3e142 |
files | Common/Inc/settings.h Discovery/Inc/configuration.h Discovery/Inc/tHome.h Discovery/Src/base.c Discovery/Src/settings.c Discovery/Src/tHome.c Discovery/Src/tMenuEditSystem.c |
diffstat | 7 files changed, 24 insertions(+), 32 deletions(-) [+] |
line wrap: on
line diff
--- a/Common/Inc/settings.h Mon Aug 24 19:59:28 2020 +0200 +++ b/Common/Inc/settings.h Sun Aug 30 17:14:31 2020 +0200 @@ -222,8 +222,6 @@ uint8_t MotionDetection; /* new in 0xFFFF001B */ uint32_t cv_config_BigScreen; - uint32_t cv_config_BigScreenV2; - } SSettings; typedef struct
--- a/Discovery/Inc/configuration.h Mon Aug 24 19:59:28 2020 +0200 +++ b/Discovery/Inc/configuration.h Sun Aug 30 17:14:31 2020 +0200 @@ -49,6 +49,4 @@ /* Enable to have access to the debug view options (turn on / off via menu instead of compile switch) */ /* #define HAVE_DEBUG_VIEW */ -/* Enable to add new BIG font layout to option menu */ -#define ENABLE_BIGFONT_VX #endif
--- a/Discovery/Inc/tHome.h Mon Aug 24 19:59:28 2020 +0200 +++ b/Discovery/Inc/tHome.h Sun Aug 30 17:14:31 2020 +0200 @@ -54,9 +54,6 @@ EXTRADISPLAY_none = 0, EXTRADISPLAY_BIGFONT, EXTRADISPLAY_DECOGAME, -#ifdef ENABLE_BIGFONT_VX - EXTRADISPLAY_BIGFONT2, -#endif EXTRADISPLAY_END }; @@ -83,19 +80,14 @@ CVIEW_T3_GasList, CVIEW_T3_Temperature, CVIEW_T3_ApnoeSurfaceInfo, -#ifdef ENABLE_BIGFONT_VX CVIEW_T3_Navigation, CVIEW_T3_DepthData, -#endif CVIEW_T3_END }; // for custom view switch on/off 161122 hw extern const uint8_t cv_changelist[]; extern const uint8_t cv_changelist_BS[]; -#ifdef ENABLE_BIGFONT_VX -extern const uint8_t cv_changelist_BSV2[]; -#endif #define CHECK_BIT_THOME(var,pos) (((var)>>(pos)) & 1) @@ -139,6 +131,7 @@ uint32_t tHome_DateCode(RTC_DateTypeDef *dateInput); void tHome_init_compass(void); +uint8_t tHome_getNumberOfAvailableCVs(const uint8_t* pcv_list); float t3_basics_lines_depth_and_divetime(GFX_DrawCfgScreen *tXscreen, GFX_DrawCfgWindow* tXl1, GFX_DrawCfgWindow* tXr1, uint8_t mode); void t3_basics_battery_low_customview_extra(GFX_DrawCfgWindow* tXc1); @@ -147,7 +140,7 @@ void t3_basics_refresh_apnoeRight(float depth, uint8_t tX_selection_customview, GFX_DrawCfgScreen *tXscreen, GFX_DrawCfgWindow* tXc1, GFX_DrawCfgWindow* tXc2, uint8_t mode); //void _findNextStop(const uint16_t *list, uint8_t *depthOut, uint16_t *lengthOut); void t3_basics_colorscheme_mod(char *text); -void t3_basics_change_customview(uint8_t *tX_selection_customview, uint8_t *tX_customviews, uint8_t action); +void t3_basics_change_customview(uint8_t *tX_selection_customview, const uint8_t *tX_customviews, uint8_t action); uint8_t tHome_show_lost_connection_count(GFX_DrawCfgScreen *ScreenToWriteOn);
--- a/Discovery/Src/base.c Mon Aug 24 19:59:28 2020 +0200 +++ b/Discovery/Src/base.c Sun Aug 30 17:14:31 2020 +0200 @@ -747,11 +747,7 @@ && (settingsGetPointer()->design < 7)) { settingsGetPointer()->design = 7; // auto switch to 9 if necessary } else if ((status.page == PageDive) && (status.line != 0)) { - if ((settingsGetPointer()->extraDisplay == EXTRADISPLAY_BIGFONT) -#ifdef ENABLE_BIGFONT_VX - || (settingsGetPointer()->extraDisplay == EXTRADISPLAY_BIGFONT2) -#endif - ) + if (settingsGetPointer()->extraDisplay == EXTRADISPLAY_BIGFONT) { settingsGetPointer()->design = 3; if(settingsGetPointer()->MotionDetection == MOTION_DETECT_SECTOR)
--- a/Discovery/Src/settings.c Mon Aug 24 19:59:28 2020 +0200 +++ b/Discovery/Src/settings.c Sun Aug 30 17:14:31 2020 +0200 @@ -84,7 +84,7 @@ * There might even be entries with fixed values that have no range */ const SSettings SettingsStandard = { - .header = 0xFFFF001A, + .header = 0xFFFF001B, .warning_blink_dsec = 8 * 2, .lastDiveLogId = 0, .logFlashNextSampleStartAddress = 0, @@ -311,7 +311,6 @@ .cv_configuration = 0xFFFFFFFF, .MotionDetection = MOTION_DETECT_OFF, .cv_config_BigScreen = 0xFFFFFFFF, - .cv_config_BigScreenV2 = 0xFFFFFFFF, }; /* Private function prototypes -----------------------------------------------*/ @@ -460,8 +459,10 @@ pSettings->MotionDetection = MOTION_DETECT_OFF; // no break case 0xFFFF001A: + /* deactivate new views => to be activated by customer */ pSettings->cv_config_BigScreen = 0xFFFFFFFF; - pSettings->cv_config_BigScreenV2 = 0xFFFFFFFF; + pSettings->cv_config_BigScreen &= pSettings->cv_configuration ^= 1 << CVIEW_T3_Navigation; + pSettings->cv_config_BigScreen &= pSettings->cv_configuration ^= 1 << CVIEW_T3_DepthData; // no break default: pSettings->header = pStandard->header;
--- a/Discovery/Src/tHome.c Mon Aug 24 19:59:28 2020 +0200 +++ b/Discovery/Src/tHome.c Sun Aug 30 17:14:31 2020 +0200 @@ -58,11 +58,7 @@ static uint16_t tHome_tick_count_field; const uint8_t cv_changelist[] = {CVIEW_Compass, CVIEW_SummaryOfLeftCorner, CVIEW_Tissues, CVIEW_Profile, CVIEW_EADTime, CVIEW_Gaslist, CVIEW_noneOrDebug, CVIEW_Decolist,CVIEW_sensors,CVIEW_sensors_mV, CVIEW_END}; -const uint8_t cv_changelist_BS[] = {CVIEW_T3_Decostop, CVIEW_sensors, CVIEW_Compass, CVIEW_T3_MaxDepth,CVIEW_T3_StopWatch, CVIEW_T3_TTS, CVIEW_T3_ppO2andGas, CVIEW_noneOrDebug, CVIEW_T3_END}; - -#ifdef ENABLE_BIGFONT_VX -const uint8_t cv_changelist_BSV2[] = {CVIEW_T3_Decostop, CVIEW_sensors, CVIEW_T3_Navigation, CVIEW_T3_DepthData, CVIEW_T3_TTS, CVIEW_T3_ppO2andGas, CVIEW_noneOrDebug, CVIEW_T3_END}; -#endif +const uint8_t cv_changelist_BS[] = {CVIEW_T3_Decostop, CVIEW_sensors, CVIEW_Compass, CVIEW_T3_MaxDepth,CVIEW_T3_StopWatch, CVIEW_T3_TTS, CVIEW_T3_ppO2andGas, CVIEW_noneOrDebug, CVIEW_T3_Navigation, CVIEW_T3_DepthData, CVIEW_T3_END}; /* Private function prototypes -----------------------------------------------*/ @@ -363,6 +359,21 @@ t6_change_customview(action); } +uint8_t tHome_getNumberOfAvailableCVs(const uint8_t* pcv_list) +{ + uint8_t cnt = 0; + + while((pcv_list[cnt] != CVIEW_END) && (pcv_list[cnt] != CVIEW_T3_END)) + { + cnt++; + if (cnt > 100) /* just in case an invalid list has been provided... */ + { + break; + } + } + cnt--; /* do not count end token */ + return cnt; +} void tHome_tick(void) {
--- a/Discovery/Src/tMenuEditSystem.c Mon Aug 24 19:59:28 2020 +0200 +++ b/Discovery/Src/tMenuEditSystem.c Sun Aug 30 17:14:31 2020 +0200 @@ -186,7 +186,6 @@ { pSettings->cv_configuration ^= (1 << CVIEW_noneOrDebug); } - WriteSettings = 1; InitMotionDetection(); /* consider new view setup for view selection by motion */ exitMenuEdit_to_Menu_with_Menu_Update(); } @@ -943,11 +942,7 @@ case EXTRADISPLAY_none: text[5] = TXT2BYTE_ExtraNone; break; -#ifdef ENABLE_BIGFONT_VX - case EXTRADISPLAY_BIGFONT2: - text[5] = TXT2BYTE_ExtraBigFontV2; - break; -#endif + default: snprintf(&text[4],2,"%u",settingsGetPointer()->extraDisplay); break;