From 433a8182c3614925b5f6b6bae6a1a58d16e3758d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Caruso?= <niccolo.caruso@skywarder.eu> Date: Thu, 5 Dec 2024 19:10:22 +0100 Subject: [PATCH] [ARP] Minor fix about atomic bools in Follower --- src/shared/algorithms/Follower/Follower.cpp | 2 +- src/shared/algorithms/Follower/Follower.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/shared/algorithms/Follower/Follower.cpp b/src/shared/algorithms/Follower/Follower.cpp index e652bac3c..18c0575b5 100644 --- a/src/shared/algorithms/Follower/Follower.cpp +++ b/src/shared/algorithms/Follower/Follower.cpp @@ -52,7 +52,7 @@ float minimizeRotation(float angle) Follower::Follower(std::chrono::milliseconds updatePeriod) : updatePeriod(static_cast<float>(updatePeriod.count()) / 1000), - targetAngles({0, 0, 0}), firstAntennaAttitudeSet(false), isInit(false) + targetAngles({0, 0, 0}) { } diff --git a/src/shared/algorithms/Follower/Follower.h b/src/shared/algorithms/Follower/Follower.h index 073453a1b..2f84b00e3 100644 --- a/src/shared/algorithms/Follower/Follower.h +++ b/src/shared/algorithms/Follower/Follower.h @@ -145,14 +145,14 @@ private: // actuation update period [s] float updatePeriod; // Initialization flag - std::atomic<bool> isInit; + std::atomic<bool> isInit{false}; // max number of retries for GPS data acquisition const uint8_t maxInitRetries = 120; bool antennaCoordinatesSet = false; bool rocketCoordinatesSet = false; - std::atomic<bool> firstAntennaAttitudeSet; + std::atomic<bool> firstAntennaAttitudeSet{false}; VN300Data lastAntennaAttitude; miosix::FastMutex lastAntennaAttitudeMutex; -- GitLab