motion: docs++
This commit is contained in:
@@ -8,8 +8,9 @@ pub async fn motion_task(src: DynamicReceiver<'static, Measurement>, ui_sink: Dy
|
||||
let mut states = BikeStates::default();
|
||||
|
||||
loop {
|
||||
// TODO: Should be on a timeout, so we can correctly warn when we aren't receiving sensor events after some time
|
||||
let next_measurement = src.receive().await;
|
||||
debug!("measurement={next_measurement:?}");
|
||||
trace!("measurement={next_measurement:?}");
|
||||
match next_measurement {
|
||||
Measurement::IMU { accel, gyro } => {
|
||||
states.insert_imu(accel, gyro);
|
||||
@@ -23,8 +24,8 @@ pub async fn motion_task(src: DynamicReceiver<'static, Measurement>, ui_sink: Dy
|
||||
states.has_gps_fix.set(false);
|
||||
},
|
||||
// FIXME: This needs harmonized with the automatic data timeout from above, somehow?
|
||||
Measurement::SensorOnline(source) => warn!("Sensor {source:?} is online!"),
|
||||
Measurement::SensorOffline(source) => warn!("Sensor {source:?} is offline!"),
|
||||
Measurement::SensorOnline(source) => warn!("Sensor {source:?} reports online!"),
|
||||
Measurement::SensorOffline(source) => warn!("Sensor {source:?} reports offline!"),
|
||||
Measurement::SimulationProgress(source, duration, _pct) => debug!("{source:?} simulation time: {}", duration.as_secs()),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user