From 9eaa0a9d11f26f752cd87e0663b859d4f962610a Mon Sep 17 00:00:00 2001
From: Emilio Corigliano <emilio.corigliano@skywarder.eu>
Date: Wed, 2 Oct 2024 15:17:13 +0200
Subject: [PATCH] [ARP] Added 5 seconds timeout to VN300 constructor

---
 .../Groundstation/Automated/Sensors/Sensors.cpp       | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/boards/Groundstation/Automated/Sensors/Sensors.cpp b/src/boards/Groundstation/Automated/Sensors/Sensors.cpp
index 35af6ce8a..4f9fcd256 100644
--- a/src/boards/Groundstation/Automated/Sensors/Sensors.cpp
+++ b/src/boards/Groundstation/Automated/Sensors/Sensors.cpp
@@ -51,11 +51,12 @@ bool Sensors::start()
 
 bool Sensors::vn300Init()
 {
-    vn300 = new Boardcore::VN300(
-        getModule<LyraGS::Buses>()->usart2, 115200,
-        VN300Defs::SampleOptions::ARP,
-        VNCommonSerial::CRCOptions::CRC_ENABLE_16);  ///< TODO: see that CRC
-                                                     ///< behaves correctly
+    vn300 =
+        new Boardcore::VN300(getModule<LyraGS::Buses>()->usart2, 115200,
+                             VN300Defs::SampleOptions::ARP,
+                             VNCommonSerial::CRCOptions::CRC_ENABLE_16,
+                             std::chrono::seconds(5));  ///< TODO: see that CRC
+                                                        ///< behaves correctly
 
     SensorInfo info("VN300", SAMPLE_PERIOD_VN300,
                     bind(&Sensors::vn300Callback, this));
-- 
GitLab