diff --git a/cmake/dependencies.cmake b/cmake/dependencies.cmake index 31286e428d19780d9c6f8c07aaed992cff7e5c6e..1339fe2151b824440d6b35e282fbb3e22bbc1f82 100644 --- a/cmake/dependencies.cmake +++ b/cmake/dependencies.cmake @@ -45,6 +45,7 @@ set(MAIN_COMPUTER set(GROUNDSTATION_COMMON src/Groundstation/Common/Radio/RadioBase.cpp src/Groundstation/Common/Ports/EthernetBase.cpp + src/Groundstation/Common/Ports/EthernetSniffer.cpp src/Groundstation/Common/Ports/Serial.cpp src/Groundstation/Common/HubBase.cpp ) diff --git a/src/Groundstation/Automated/Hub.h b/src/Groundstation/Automated/Hub.h index 0828b3d2203ffa8ecb8ca051d6a37873147e9a65..0c537945bb647986101376a73445a6806c641dba 100644 --- a/src/Groundstation/Automated/Hub.h +++ b/src/Groundstation/Automated/Hub.h @@ -108,9 +108,9 @@ private: bool rocketNasSet = false; miosix::FastMutex coordinatesMutex; miosix::FastMutex nasStateMutex; - bool hasNewNasSet = false; - uint64_t lastFlightTMTimestamp; - uint64_t lastStatsTMTimestamp; + bool hasNewNasSet = false; + uint64_t lastFlightTMTimestamp = 0; + uint64_t lastStatsTMTimestamp = 0; }; } // namespace Antennas diff --git a/src/Groundstation/Automated/SMA/SMA.cpp b/src/Groundstation/Automated/SMA/SMA.cpp index 3470e27dbf793b0fad558fb8187b41d5324ab666..9fa53f0d1ee386c213f7e9533684193e296d69ad 100644 --- a/src/Groundstation/Automated/SMA/SMA.cpp +++ b/src/Groundstation/Automated/SMA/SMA.cpp @@ -145,8 +145,13 @@ void SMA::update() Hub* hub = static_cast<Hub*>(getModule<Groundstation::HubBase>()); auto* sensors = getModule<Sensors>(); + // TODO: Verify if same with the macrostate // Update the antenna position if in feedback - if (status.state == SMAState::FEEDBACK) + // if (testState(&SMA::state_feedback)) + if (testState(&SMA::state_init_done) || testState(&SMA::state_armed) || + testState(&SMA::state_fix_antennas) || + testState(&SMA::state_fix_rocket) || testState(&SMA::state_active) || + testState(&SMA::state_test)) { // update antenna coordinates data = sensors->getVN300LastSample();