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();
|
let mut states = BikeStates::default();
|
||||||
|
|
||||||
loop {
|
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;
|
let next_measurement = src.receive().await;
|
||||||
debug!("measurement={next_measurement:?}");
|
trace!("measurement={next_measurement:?}");
|
||||||
match next_measurement {
|
match next_measurement {
|
||||||
Measurement::IMU { accel, gyro } => {
|
Measurement::IMU { accel, gyro } => {
|
||||||
states.insert_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);
|
states.has_gps_fix.set(false);
|
||||||
},
|
},
|
||||||
// FIXME: This needs harmonized with the automatic data timeout from above, somehow?
|
// FIXME: This needs harmonized with the automatic data timeout from above, somehow?
|
||||||
Measurement::SensorOnline(source) => warn!("Sensor {source:?} is online!"),
|
Measurement::SensorOnline(source) => warn!("Sensor {source:?} reports online!"),
|
||||||
Measurement::SensorOffline(source) => warn!("Sensor {source:?} is offline!"),
|
Measurement::SensorOffline(source) => warn!("Sensor {source:?} reports offline!"),
|
||||||
Measurement::SimulationProgress(source, duration, _pct) => debug!("{source:?} simulation time: {}", duration.as_secs()),
|
Measurement::SimulationProgress(source, duration, _pct) => debug!("{source:?} simulation time: {}", duration.as_secs()),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user