changeset 613:beeb23d18443

Added "Set Marker" to T3 quick menu: It is now possible to set a marker while in T?_Profile view using the quick menu access. Because the the string, which is used in the dive menu, is to long, a shorter string had to be added.
author Ideenmodellierer
date Fri, 15 Jan 2021 21:33:07 +0100
parents 82d58470fd94
children 7d6a51bb21d1
files Discovery/Src/t3.c Discovery/Src/tHome.c Discovery/Src/text_multilanguage.c
diffstat 3 files changed, 17 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/Discovery/Src/t3.c	Fri Jan 15 21:20:29 2021 +0100
+++ b/Discovery/Src/t3.c	Fri Jan 15 21:33:07 2021 +0100
@@ -660,6 +660,11 @@
     	        			text[textPointer++] = 0;
     	        			GFX_write_string_color(&FontT42,tXr1,text,1,CLUT_WarningYellow);
     	        break;
+
+    		case StDMARK:	snprintf(text,TEXTSIZE,"\a\003\001%c%c", TXT_2BYTE, TXT2BYTE_SetMarkerShort);
+							GFX_write_string_color(&FontT42,tXr1,text,1,CLUT_WarningYellow);
+    			break;
+
     		default:		/* show divetime */
 
 							Divetime.Total = stateUsed->lifeData.dive_time_seconds_without_surface_time;
--- a/Discovery/Src/tHome.c	Fri Jan 15 21:20:29 2021 +0100
+++ b/Discovery/Src/tHome.c	Fri Jan 15 21:33:07 2021 +0100
@@ -192,6 +192,8 @@
                         						set_globalState(StDMGAS);
             								}
             			break;
+            		case CVIEW_T3_Profile: 	set_globalState(StDMARK);
+            			break;
             		default:
             			break;
             	}
@@ -342,6 +344,9 @@
             else
                 dataOutGetPointer()->setEndDive = 1;
             break;
+        case StDMARK:	stateUsedWrite->events.manualMarker = 1;
+				        set_globalState(StD);
+        	break;
 
         default:
             break;
--- a/Discovery/Src/text_multilanguage.c	Fri Jan 15 21:20:29 2021 +0100
+++ b/Discovery/Src/text_multilanguage.c	Fri Jan 15 21:33:07 2021 +0100
@@ -737,6 +737,12 @@
 static uint8_t text_IT_SetMarker[] = "Marcatura";
 static uint8_t text_ES_SetMarker[] = "Poner Marcador";
 
+static uint8_t text_EN_SetMarkerShort[] = "Set Mark";
+static uint8_t text_DE_SetMarkerShort[] = "Markierung";
+static uint8_t text_FR_SetMarkerShort[] = "Repère";
+static uint8_t text_IT_SetMarkerShort[] = "Marcatura";
+static uint8_t text_ES_SetMarkerShort[] = "Marcador";
+
 // Dive Menu
 static uint8_t text_EN_CompassHeading[] = "Compass heading";
 static uint8_t text_DE_CompassHeading[] = "Kompasskurs";
@@ -1755,6 +1761,7 @@
     {(uint8_t)TXT2BYTE_Fonts,			{text_EN_Fonts, text_DE_Fonts, text_FR_Fonts, text_IT_Fonts, text_ES_Fonts}},
     {(uint8_t)TXT2BYTE_ResetStopwatch,  {text_EN_ResetStopwatch, text_DE_ResetStopwatch, text_FR_ResetStopwatch, text_IT_ResetStopwatch, text_ES_ResetStopwatch}},
     {(uint8_t)TXT2BYTE_SetMarker,		{text_EN_SetMarker, text_DE_SetMarker, text_FR_SetMarker, text_IT_SetMarker, text_ES_SetMarker}},
+	{(uint8_t)TXT2BYTE_SetMarkerShort,	{text_EN_SetMarkerShort, text_DE_SetMarkerShort, text_FR_SetMarkerShort, text_IT_SetMarkerShort, text_ES_SetMarkerShort}},
     {(uint8_t)TXT2BYTE_CompassHeading,  {text_EN_CompassHeading, text_DE_CompassHeading, text_FR_CompassHeading, text_IT_CompassHeading, text_ES_CompassHeading}},
 	{(uint8_t)TXT2BYTE_CalibView,  		{text_EN_CalibView, text_DE_CalibView, text_FR_CalibView, text_IT_CalibView, text_ES_CalibView}},
 	{(uint8_t)TXT2BYTE_IndicateFrame,	{text_EN_IndicateFrame, text_DE_IndicateFrame, text_FR_IndicateFrame, text_IT_IndicateFrame, text_ES_IndicateFrame}},