# HG changeset patch # User Ideenmodellierer # Date 1598290578 -7200 # Node ID b560e474e3190d31c40e61c487088704f919276c # Parent 4ce932235578e98f05c971b852d03954b002ec56 Added possibility to switch between "classic" bigfont views and a selection with a new information combination New strings for the selection have been added and the menu handling has been updated to enable the selection. diff -r 4ce932235578 -r b560e474e319 Discovery/Inc/tHome.h --- a/Discovery/Inc/tHome.h Thu Aug 20 21:25:38 2020 +0200 +++ b/Discovery/Inc/tHome.h Mon Aug 24 19:36:18 2020 +0200 @@ -42,6 +42,7 @@ #include "data_central.h" #include "data_exchange.h" #include "check_warning.h" +#include "configuration.h" extern const uint16_t BigFontSeperationLeftRight; // in t3.c extern const uint16_t BigFontSeperationTopBottom; // in t3.c @@ -53,6 +54,9 @@ EXTRADISPLAY_none = 0, EXTRADISPLAY_BIGFONT, EXTRADISPLAY_DECOGAME, +#ifdef ENABLE_BIGFONT_VX + EXTRADISPLAY_BIGFONT2, +#endif EXTRADISPLAY_END }; @@ -79,11 +83,20 @@ 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) typedef struct @@ -134,7 +147,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, const uint8_t *tX_customviews, uint8_t action); +void t3_basics_change_customview(uint8_t *tX_selection_customview, uint8_t *tX_customviews, uint8_t action); uint8_t tHome_show_lost_connection_count(GFX_DrawCfgScreen *ScreenToWriteOn); diff -r 4ce932235578 -r b560e474e319 Discovery/Inc/text_multilanguage.h --- a/Discovery/Inc/text_multilanguage.h Thu Aug 20 21:25:38 2020 +0200 +++ b/Discovery/Inc/text_multilanguage.h Mon Aug 24 19:36:18 2020 +0200 @@ -270,6 +270,7 @@ /* */ TXT2BYTE_ExtraDisplay, TXT2BYTE_ExtraBigFont, + TXT2BYTE_ExtraBigFontV2, TXT2BYTE_ExtraDecoGame, TXT2BYTE_ExtraNone, /* */ diff -r 4ce932235578 -r b560e474e319 Discovery/Src/base.c --- a/Discovery/Src/base.c Thu Aug 20 21:25:38 2020 +0200 +++ b/Discovery/Src/base.c Mon Aug 24 19:36:18 2020 +0200 @@ -747,7 +747,11 @@ && (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) + if ((settingsGetPointer()->extraDisplay == EXTRADISPLAY_BIGFONT) +#ifdef ENABLE_BIGFONT_VX + || (settingsGetPointer()->extraDisplay == EXTRADISPLAY_BIGFONT2) +#endif + ) { settingsGetPointer()->design = 3; if(settingsGetPointer()->MotionDetection == MOTION_DETECT_SECTOR) diff -r 4ce932235578 -r b560e474e319 Discovery/Src/tHome.c --- a/Discovery/Src/tHome.c Thu Aug 20 21:25:38 2020 +0200 +++ b/Discovery/Src/tHome.c Mon Aug 24 19:36:18 2020 +0200 @@ -58,6 +58,11 @@ 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 /* Private function prototypes -----------------------------------------------*/ @@ -431,7 +436,7 @@ SDataExchangeSlaveToMaster* dataIn=get_dataInPointer(); SDataReceiveFromMaster* pDataOut = dataOutGetPointer(); - snprintf(text,32,"spi err:\002 %i/%i",DataEX_lost_connection_count(),get_num_SPI_CALLBACKS()); + snprintf(text,32,"spi err:\002 %ld/%ld",DataEX_lost_connection_count(),get_num_SPI_CALLBACKS()); Gfx_write_label_var(ScreenToWriteOn, 100,300, 0,&FontT24,CLUT_ButtonSymbols,text); // snprintf(text,32,"header:\002%X%X%X%X",dataIn->header.checkCode[0],dataIn->header.checkCode[1],dataIn->header.checkCode[2],dataIn->header.checkCode[3]); diff -r 4ce932235578 -r b560e474e319 Discovery/Src/tMenuEditSystem.c --- a/Discovery/Src/tMenuEditSystem.c Thu Aug 20 21:25:38 2020 +0200 +++ b/Discovery/Src/tMenuEditSystem.c Mon Aug 24 19:36:18 2020 +0200 @@ -41,6 +41,7 @@ #include "motion.h" #include "t7.h" + #define CV_SUBPAGE_MAX (2u) /* max number of customer view selection pages */ /*#define HAVE_DEBUG_VIEW */ static uint8_t infoPage = 0; @@ -942,6 +943,11 @@ 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; @@ -1095,20 +1101,15 @@ uint8_t OnAction_ExtraDisplay (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) { uint8_t newValue; - switch(settingsGetPointer()->extraDisplay) + + newValue = settingsGetPointer()->extraDisplay + 1; + if(newValue == EXTRADISPLAY_DECOGAME) /* Decogame not yet implemented */ { - case EXTRADISPLAY_BIGFONT: - newValue = EXTRADISPLAY_none; - break; - case EXTRADISPLAY_DECOGAME: - newValue = EXTRADISPLAY_BIGFONT; - break; - case EXTRADISPLAY_none: - newValue = EXTRADISPLAY_BIGFONT; - break; - default: - newValue = EXTRADISPLAY_BIGFONT; - break; + newValue++; + } + if(newValue >= EXTRADISPLAY_END) + { + newValue = EXTRADISPLAY_none; } settingsGetPointer()->extraDisplay = newValue; return UNSPECIFIC_RETURN; diff -r 4ce932235578 -r b560e474e319 Discovery/Src/text_multilanguage.c --- a/Discovery/Src/text_multilanguage.c Thu Aug 20 21:25:38 2020 +0200 +++ b/Discovery/Src/text_multilanguage.c Mon Aug 24 19:36:18 2020 +0200 @@ -33,6 +33,7 @@ #include #include "text_multilanguage.h" +#include "configuration.h" /* Text ----------------------------------------------------------------------*/ @@ -1257,11 +1258,26 @@ static uint8_t text_ES_ExtraDisplay[] = "Letras grandes"; // Menu SYS2 +#ifdef ENABLE_BIGFONT_VX +static uint8_t text_EN_ExtraBigFont[] = "classic"; +static uint8_t text_DE_ExtraBigFont[] = "klassisch"; +static uint8_t text_FR_ExtraBigFont[] = "classic"; +static uint8_t text_IT_ExtraBigFont[] = "classic"; +static uint8_t text_ES_ExtraBigFont[] = "classic"; + +static uint8_t text_EN_ExtraBigFontV2[] = "V2"; +static uint8_t text_DE_ExtraBigFontV2[] = "V2"; +static uint8_t text_FR_ExtraBigFontV2[] = "V2"; +static uint8_t text_IT_ExtraBigFontV2[] = "V2"; +static uint8_t text_ES_ExtraBigFontV2[] = "V2"; + +#else static uint8_t text_EN_ExtraBigFont[] = "yes"; static uint8_t text_DE_ExtraBigFont[] = "ja"; static uint8_t text_FR_ExtraBigFont[] = "si"; static uint8_t text_IT_ExtraBigFont[] = "si"; static uint8_t text_ES_ExtraBigFont[] = "si"; +#endif // Menu SYS2 (future feature) static uint8_t text_EN_ExtraDecoGame[] = "Deco game"; @@ -1753,6 +1769,9 @@ {(uint8_t)TXT2BYTE_DiveResetAvgQ, {text_EN_DiveResetAvgQ, text_DE_DiveResetAvgQ, text_FR_DiveResetAvgQ, text_IT_DiveResetAvgQ, text_ES_DiveResetAvgQ}}, {(uint8_t)TXT2BYTE_ExtraDisplay, {text_EN_ExtraDisplay, text_DE_ExtraDisplay, text_FR_ExtraDisplay, text_IT_ExtraDisplay, text_ES_ExtraDisplay}}, {(uint8_t)TXT2BYTE_ExtraBigFont, {text_EN_ExtraBigFont, text_DE_ExtraBigFont, text_FR_ExtraBigFont, text_IT_ExtraBigFont, text_ES_ExtraBigFont}}, +#ifdef ENABLE_BIGFONT_VX + {(uint8_t)TXT2BYTE_ExtraBigFontV2, {text_EN_ExtraBigFontV2, text_DE_ExtraBigFontV2, text_FR_ExtraBigFontV2, text_IT_ExtraBigFontV2, text_ES_ExtraBigFontV2}}, +#endif {(uint8_t)TXT2BYTE_ExtraDecoGame, {text_EN_ExtraDecoGame, text_DE_ExtraDecoGame, text_FR_ExtraDecoGame, text_IT_ExtraDecoGame, text_ES_ExtraDecoGame}}, {(uint8_t)TXT2BYTE_ExtraNone, {text_EN_ExtraNone, text_DE_ExtraNone, text_FR_ExtraNone, text_IT_ExtraNone, text_ES_ExtraNone}}, {(uint8_t)TXT2BYTE_MotionCtrl, {text_EN_MotionCtrl, text_DE_MotionCtrl, text_FR_MotionCtrl, text_IT_MotionCtrl, text_ES_MotionCtrl}},