changeset 594:280c11153080

Added compile switch for new T3 View Profile
author Ideenmodellierer
date Mon, 04 Jan 2021 21:30:04 +0100
parents 3a6f922b73ea
children fd0b60dee6f3
files Discovery/Inc/configuration.h Discovery/Inc/tHome.h Discovery/Src/tHome.c Discovery/Src/tInfoLog.c Discovery/Src/tMenuEditCustom.c
diffstat 5 files changed, 27 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/Discovery/Inc/configuration.h	Mon Jan 04 21:24:24 2021 +0100
+++ b/Discovery/Inc/configuration.h	Mon Jan 04 21:30:04 2021 +0100
@@ -54,4 +54,9 @@
 
 /* Enable to have option to hide not needed gases from dive views */
 /* #define ENABLE_UNUSED_GAS_HIDING */
+
+/* Enable to have the new T3 profile view available */
+/* #define ENABLE_T3_PROFILE_VIEW */
+
+
 #endif
--- a/Discovery/Inc/tHome.h	Mon Jan 04 21:24:24 2021 +0100
+++ b/Discovery/Inc/tHome.h	Mon Jan 04 21:30:04 2021 +0100
@@ -83,6 +83,9 @@
 		CVIEW_T3_Navigation,
 		CVIEW_T3_DepthData,
 		CVIEW_T3_DecoTTS,
+#ifdef ENABLE_T3_PROFILE_VIEW
+		CVIEW_T3_Profile,
+#endif
 		CVIEW_T3_END
 };
 
--- a/Discovery/Src/tHome.c	Mon Jan 04 21:24:24 2021 +0100
+++ b/Discovery/Src/tHome.c	Mon Jan 04 21:30:04 2021 +0100
@@ -59,7 +59,12 @@
 static uint16_t tHome_tick_count_o2sens;
 
 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_GasList, CVIEW_T3_ppO2andGas, CVIEW_noneOrDebug, CVIEW_T3_Navigation, CVIEW_T3_DepthData, CVIEW_T3_DecoTTS, CVIEW_T3_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_GasList, CVIEW_T3_ppO2andGas, CVIEW_noneOrDebug,
+									CVIEW_T3_Navigation, CVIEW_T3_DepthData, CVIEW_T3_DecoTTS,
+#ifdef ENABLE_T3_PROFILE_VIEW
+									CVIEW_T3_Profile,
+#endif
+									CVIEW_T3_END};
 
 /* Private function prototypes -----------------------------------------------*/
 
--- a/Discovery/Src/tInfoLog.c	Mon Jan 04 21:24:24 2021 +0100
+++ b/Discovery/Src/tInfoLog.c	Mon Jan 04 21:30:04 2021 +0100
@@ -38,6 +38,7 @@
 #include "unit.h"
 #include "externLogbookFlash.h"
 #include "configuration.h"
+#include "logbook_miniLive.h"
 
 /* Exported variables --------------------------------------------------------*/
 
@@ -175,9 +176,20 @@
 
 void sendActionToInfoLogShow(uint8_t sendAction)
 {
+#ifdef ENABLE_T3_PROFILE_VIEW
+	uint8_t stepBack;
+#endif
     switch(sendAction)
     {
     case ACTION_BUTTON_ENTER:
+#ifdef ENABLE_T3_PROFILE_VIEW
+    	if(getActiveLogPage() == 1)
+    	{
+   		    stepBack = (6 * (infolog.page - 1)) + infolog.line - 1;
+    		prepareReplayLog(stepBack);
+    		updateReplayIncdicator(&INFOLOGscreen);
+    	}
+#endif
         break;
     case ACTION_BUTTON_NEXT:
         showNextLogPage();
--- a/Discovery/Src/tMenuEditCustom.c	Mon Jan 04 21:24:24 2021 +0100
+++ b/Discovery/Src/tMenuEditCustom.c	Mon Jan 04 21:30:04 2021 +0100
@@ -402,6 +402,7 @@
         text = TXT2BYTE_Tissues;
         break;
     case CVIEW_Profile:
+    case CVIEW_T3_Profile:
         text = TXT2BYTE_Profile;
         break;
     case CVIEW_Gaslist: