From c49586460271a054885cfb359ae436cb9aba17b8 Mon Sep 17 00:00:00 2001
From: Alberto Nidasio <alberto.nidasio@skywarder.eu>
Date: Sat, 8 Oct 2022 18:17:58 +0200
Subject: [PATCH] [TMRepository] Rolled back test code

---
 skyward-boardcore                              |  2 +-
 .../NASController/NASController.cpp            |  1 -
 src/boards/Main/TMRepository/TMRepository.cpp  | 18 ++++--------------
 3 files changed, 5 insertions(+), 16 deletions(-)

diff --git a/skyward-boardcore b/skyward-boardcore
index 77bbf515f..2a2bc66df 160000
--- a/skyward-boardcore
+++ b/skyward-boardcore
@@ -1 +1 @@
-Subproject commit 77bbf515fe7eeac550db458279e4490e2a9f7115
+Subproject commit 2a2bc66dfc1856b6d67b1270c5ca543a4a0e7111
diff --git a/src/boards/Main/StateMachines/NASController/NASController.cpp b/src/boards/Main/StateMachines/NASController/NASController.cpp
index 4fa5114b7..166ec0f67 100644
--- a/src/boards/Main/StateMachines/NASController/NASController.cpp
+++ b/src/boards/Main/StateMachines/NASController/NASController.cpp
@@ -80,7 +80,6 @@ void NASController::update()
     }
 
 #ifdef HILSimulation
-    // useful only for hil testing
     updateData(nas.getState());
 #endif  // HILSimulation
 }
diff --git a/src/boards/Main/TMRepository/TMRepository.cpp b/src/boards/Main/TMRepository/TMRepository.cpp
index 83e639981..89173c5b4 100644
--- a/src/boards/Main/TMRepository/TMRepository.cpp
+++ b/src/boards/Main/TMRepository/TMRepository.cpp
@@ -278,24 +278,14 @@ mavlink_message_t TMRepository::packSystemTm(SystemTMList tmId, uint8_t msgId,
             tm.nas_vn     = nasState.vn;
             tm.nas_ve     = nasState.ve;
             tm.nas_vd     = nasState.vd;
+            tm.nas_qx     = nasState.qx;
+            tm.nas_qy     = nasState.qy;
+            tm.nas_qz     = nasState.qz;
+            tm.nas_qw     = nasState.qw;
             tm.nas_bias_x = nasState.bx;
             tm.nas_bias_y = nasState.by;
             tm.nas_bias_z = nasState.bz;
 
-            // Test triad
-            StateInitializer state;
-            state.triad({imuData.accelerationX, imuData.accelerationY,
-                         imuData.accelerationZ},
-                        {imuData.magneticFieldX, imuData.magneticFieldY,
-                         imuData.magneticFieldZ},
-                        Common::ReferenceConfig::nedMag);
-            auto testState = state.getInitX();
-
-            tm.nas_qw = testState(9);
-            tm.nas_qx = testState(6);
-            tm.nas_qy = testState(7);
-            tm.nas_qz = testState(8);
-
             // Sensing pins statuses
             tm.pin_launch =
                 PinHandler::getInstance().getPinsData()[LAUNCH_PIN].lastState;
-- 
GitLab