diff Discovery/Src/t7.c @ 777:6a8cf91e5b22

This is only showing if one of the compass views is visible. It should make it possible to verify that a correct heading is set as the user can see the compass readout when pushing the button. (mikeller)
author heinrichsweikamp
date Mon, 22 May 2023 09:14:27 +0200
parents 46c6d2380d4e
children 74253a41cf80
line wrap: on
line diff
--- a/Discovery/Src/t7.c	Thu May 11 12:13:03 2023 +0200
+++ b/Discovery/Src/t7.c	Mon May 22 09:14:27 2023 +0200
@@ -2800,6 +2800,11 @@
 
         GFX_write_string_color(&FontT48, &t7c2, TextR1, 0, CLUT_WarningYellow);
     }
+    else if(get_globalState() == StDBEAR)
+    {
+        snprintf(TextR1, TEXTSIZE, "\a\001 %c%c? ", TXT_2BYTE, TXT2BYTE_DiveBearingQ);
+        GFX_write_string_color(&FontT48,&t7c2,TextR1,0,CLUT_WarningYellow);
+    }
     else if(get_globalState() == StDSIM1)
     {
         snprintf(TextR1,TEXTSIZE,"\a\001%c%c", TXT_2BYTE, TXT2BYTE_DiveQuitQ);
@@ -4481,3 +4486,8 @@
     }
 
 }
+
+bool t7_isCompassShowing(void)
+{
+    return selection_customview == CVIEW_Compass || selection_custom_field == LLC_Compass;
+}