diff Discovery/Src/tMenuEditXtra.c @ 547:12f8745c8a94

Added viewport calibration to dive menu: To allow adjustments of the viewport during dive an option has been added to the dive menu "Xtra" including multi language strings
author Ideenmodellierer
date Mon, 02 Nov 2020 21:17:45 +0100
parents 77de014928d6
children 531e7818b737
line wrap: on
line diff
--- a/Discovery/Src/tMenuEditXtra.c	Mon Nov 02 21:15:42 2020 +0100
+++ b/Discovery/Src/tMenuEditXtra.c	Mon Nov 02 21:17:45 2020 +0100
@@ -34,6 +34,7 @@
 #include "timer.h"
 #include "tMenuEdit.h"
 #include "data_exchange_main.h"
+#include "motion.h"
 
 
 /* Private function prototypes -----------------------------------------------*/
@@ -66,6 +67,9 @@
         openEdit_SetManualMarker();
         break;
     case 4:
+    	openEdit_CalibViewport();
+        break;
+    case 5:
     	if(is_stateUsedSetToSim())
     	{
     		 openEdit_SimFollowDecostops();
@@ -103,6 +107,12 @@
     exitMenuEdit_to_Menu_with_Menu_Update();
 }
 
+void openEdit_CalibViewport(void)
+{
+	calibrateViewport(stateUsed->lifeData.compass_roll, stateUsed->lifeData.compass_pitch, stateUsed->lifeData.compass_heading);
+    exitMenuEdit_to_Home();
+}
+
 void refresh_CompassHeading(void)
 {
     uint16_t heading;