tasks: motion: move the entire motion prediction engine into the second core, dedicating core 1 to hardware

This commit is contained in:
2025-12-22 15:55:06 +01:00
parent 73b037f0c2
commit 3f651718a4
5 changed files with 33 additions and 25 deletions

View File

@@ -52,7 +52,9 @@ pub enum Prediction {
Motion(MotionState),
Velocity(f32),
Location(Vector2<f64>),
WakeRequested
WakeRequested,
// States of external connections to the world
SensorStatus(SensorSource, SensorState),
}
#[derive(Clone, Copy, Debug)]
@@ -114,16 +116,14 @@ impl TryFrom<i8> for SensorSource {
#[derive(Debug)]
pub struct BusGarage {
pub motion: Channel<NoopRawMutex, Measurement, 5>,
pub notify: PubSubChannel<CriticalSectionRawMutex, Notification, 5, 2, 4>,
pub predict: Channel<CriticalSectionRawMutex, Prediction, 15>,
pub telemetry: PubSubChannel<CriticalSectionRawMutex, Telemetry, 15, 2, 4>
pub notify: PubSubChannel<NoopRawMutex, Notification, 5, 2, 4>,
pub predict: Channel<NoopRawMutex, Prediction, 15>,
pub telemetry: PubSubChannel<NoopRawMutex, Telemetry, 15, 2, 4>
}
impl Default for BusGarage {
fn default() -> Self {
Self {
motion: Channel::new(),
notify: PubSubChannel::new(),
predict: Channel::new(),
telemetry: PubSubChannel::new()