Skip to content
Snippets Groups Projects
Commit 84cfa2ba authored by Davide Mor's avatar Davide Mor
Browse files

[Main] Added simple way of disabling calibrations

parent 70a6bd8a
Branches
Tags
1 merge request!36[Main] Merge Main OBSW
......@@ -164,6 +164,9 @@ constexpr bool ENABLED = true;
namespace IMU
{
constexpr bool USE_CALIBRATED_LIS2MDL = true;
constexpr bool USE_CALIBRATED_LSM6DSRX = true;
constexpr Hertz RATE = 50_hz;
constexpr bool ENABLED = true;
} // namespace IMU
......
......@@ -691,8 +691,12 @@ void Sensors::rotatedImuInit()
rotatedImu = std::make_unique<RotatedIMU>(
[this]()
{
auto imu6 = getCalibratedLSM6DSRXLastSample();
auto mag = getCalibratedLIS2MDLLastSample();
auto imu6 = Config::Sensors::IMU::USE_CALIBRATED_LSM6DSRX
? getCalibratedLSM6DSRXLastSample()
: getLSM6DSRXLastSample();
auto mag = Config::Sensors::IMU::USE_CALIBRATED_LIS2MDL
? getCalibratedLIS2MDLLastSample()
: getLIS2MDLLastSample();
return IMUData{imu6, imu6, mag};
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment