From 972ecbbdc25cf16a8c994a639618db19692a9ef0 Mon Sep 17 00:00:00 2001 From: Victoria Fischer Date: Sun, 7 Dec 2025 12:55:23 +0100 Subject: [PATCH] tasks: mpu: emit gravity and forward sensor statuses --- src/tasks/mpu.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tasks/mpu.rs b/src/tasks/mpu.rs index c834dd3..63f7e2f 100644 --- a/src/tasks/mpu.rs +++ b/src/tasks/mpu.rs @@ -62,6 +62,8 @@ pub async fn mpu_task(events: DynamicSender<'static, Measurement>, bus: I2cDevic let sensor_ref = &mut sensor; events.send(Measurement::SensorHardwareStatus(SensorSource::IMU, crate::events::SensorState::Online)).await; + events.send(Measurement::SensorHardwareStatus(SensorSource::GravityReference, crate::events::SensorState::AcquiringFix)).await; + events.send(Measurement::SensorHardwareStatus(SensorSource::ForwardsReference, crate::events::SensorState::AcquiringFix)).await; //TODO: Need to read in a constant buffer of accelerometer measurements, which we can then use to determine where "forward" points in the body frame when converting from the sensor frame. // From there, we can rotate the body frame into the world frame using gps headings to generate a compass north fn lowpass(prev: f32, current: f32, alpha: f32) -> f32 {