diff --git a/src/boards/MockupMain/Configs/SensorsConfig.h b/src/boards/MockupMain/Configs/SensorsConfig.h index d98678eca18c6b421a052bdaa4021d5ffcdc95b4..9985c7d9e803599dd6d94288421c167a806e3a17 100644 --- a/src/boards/MockupMain/Configs/SensorsConfig.h +++ b/src/boards/MockupMain/Configs/SensorsConfig.h @@ -43,12 +43,12 @@ constexpr Boardcore::BMX160Config::AccelerometerRange BMX160_ACC_FSR_ENUM = Boardcore::BMX160Config::AccelerometerRange::G_16; constexpr Boardcore::BMX160Config::GyroscopeRange BMX160_GYRO_FSR_ENUM = Boardcore::BMX160Config::GyroscopeRange::DEG_1000; -constexpr unsigned int BMX160_ACC_GYRO_ODR = 800; +constexpr unsigned int BMX160_ACC_GYRO_ODR = 200; constexpr Boardcore::BMX160Config::OutputDataRate BMX160_ACC_GYRO_ODR_ENUM = - Boardcore::BMX160Config::OutputDataRate::HZ_800; -constexpr unsigned int BMX160_MAG_ODR = 800; + Boardcore::BMX160Config::OutputDataRate::HZ_200; +constexpr unsigned int BMX160_MAG_ODR = 100; constexpr Boardcore::BMX160Config::OutputDataRate BMX160_MAG_ODR_ENUM = - Boardcore::BMX160Config::OutputDataRate::HZ_800; + Boardcore::BMX160Config::OutputDataRate::HZ_100; constexpr unsigned int BMX160_TEMP_DIVIDER = 1000; @@ -72,7 +72,7 @@ constexpr uint32_t H3LIS331DL_PERIOD = 1; // [ms] 1000Hz // LPS22DF constexpr Boardcore::LPS22DF::AVG LPS22DF_AVG = Boardcore::LPS22DF::AVG_4; constexpr Boardcore::LPS22DF::ODR LPS22DF_ODR = Boardcore::LPS22DF::ODR_50; -constexpr uint32_t LPS22DF_PERIOD = 20; // [ms] 50Hz +constexpr uint32_t LPS22DF_PERIOD = 50; // [ms] 20Hz // UBXGPS constexpr uint8_t UBXGPS_SAMPLE_RATE = 10; diff --git a/src/boards/MockupMain/Sensors/Sensors.cpp b/src/boards/MockupMain/Sensors/Sensors.cpp index 88895590996dacdf6db9e3a04ac6e241b5160f0f..bf00c2cabbae50f1c9f3472a0f151025d7ebc488 100644 --- a/src/boards/MockupMain/Sensors/Sensors.cpp +++ b/src/boards/MockupMain/Sensors/Sensors.cpp @@ -113,15 +113,15 @@ bool Sensors::start() // Read the magnetometer calibration from predefined file // Init all the sensors - bmx160Init(); - bmx160WithCorrectionInit(); - lis3mdlInit(); + // bmx160Init(); + // bmx160WithCorrectionInit(); + // lis3mdlInit(); h3lisInit(); lps22Init(); - ubxGpsInit(); + // ubxGpsInit(); ads131Init(); - internalADCInit(); - batteryVoltageInit(); + // internalADCInit(); + // batteryVoltageInit(); loadCellInit(); // Add the magnetometer calibration to the scheduler diff --git a/src/boards/MockupMain/StateMachines/FlightModeManager/FlightModeManager.cpp b/src/boards/MockupMain/StateMachines/FlightModeManager/FlightModeManager.cpp index c980c5b68f8d674d66f87bf899f65332996389ea..7ff06df3996cf20e9e06c8d29624b98a531f0100 100644 --- a/src/boards/MockupMain/StateMachines/FlightModeManager/FlightModeManager.cpp +++ b/src/boards/MockupMain/StateMachines/FlightModeManager/FlightModeManager.cpp @@ -223,7 +223,7 @@ State FlightModeManager::state_sensors_calibration(const Event& event) } case FMM_ALGOS_CALIBRATE: { - return transition(&FlightModeManager::state_algos_calibration); + return transition(&FlightModeManager::state_ready); } default: { diff --git a/src/entrypoints/MockupMain/main-entry.cpp b/src/entrypoints/MockupMain/main-entry.cpp index 841240e1ac3e645ed60d8d0968342e58fe6efbc3..61851c5ce4271d651ecd80f3753268c6b781e3df 100644 --- a/src/entrypoints/MockupMain/main-entry.cpp +++ b/src/entrypoints/MockupMain/main-entry.cpp @@ -147,11 +147,11 @@ int main() LOG_ERR(logger, "Error starting the Sensors module"); } - if (!modules.get<NASController>()->start()) - { - initResult = false; - LOG_ERR(logger, "Error starting the NAS module"); - } + // if (!modules.get<NASController>()->start()) + // { + // initResult = false; + // LOG_ERR(logger, "Error starting the NAS module"); + // } if (!modules.get<FlightModeManager>()->start()) { @@ -165,11 +165,11 @@ int main() LOG_ERR(logger, "Error starting the Radio module"); } - if (!modules.get<PinHandler>()->start()) - { - initResult = false; - LOG_ERR(logger, "Error starting the PinHandler module"); - } + // if (!modules.get<PinHandler>()->start()) + // { + // initResult = false; + // LOG_ERR(logger, "Error starting the PinHandler module"); + // } if (!modules.get<BoardScheduler>()->start()) { @@ -177,14 +177,14 @@ int main() LOG_ERR(logger, "Error starting the Board Scheduler module"); } - // Log all the events - EventSniffer sniffer(EventBroker::getInstance(), TOPICS_LIST, - [](uint8_t event, uint8_t topic) - { - EventData ev{TimestampTimer::getTimestamp(), event, - topic}; - Logger::getInstance().log(ev); - }); + // // Log all the events + // EventSniffer sniffer(EventBroker::getInstance(), TOPICS_LIST, + // [](uint8_t event, uint8_t topic) + // { + // EventData ev{TimestampTimer::getTimestamp(), event, + // topic}; + // Logger::getInstance().log(ev); + // }); // Check the init result and launch an event if (initResult)