changeset 493:b560e474e319

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.
author Ideenmodellierer
date Mon, 24 Aug 2020 19:36:18 +0200
parents 4ce932235578
children d78c48552f23
files Discovery/Inc/tHome.h Discovery/Inc/text_multilanguage.h Discovery/Src/base.c Discovery/Src/tHome.c Discovery/Src/tMenuEditSystem.c Discovery/Src/text_multilanguage.c
diffstat 6 files changed, 59 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- 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);
 
--- 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,
 		/* */
--- 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)
--- 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]);
--- 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;
--- 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 <stdint.h>
 #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}},