diff --git a/Cargo.toml b/Cargo.toml index 1fd18b4..c37556c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -69,11 +69,11 @@ embassy-embedded-hal = "0.5.0" embedded-hal-async = "1.0.0" nalgebra = { version = "0.33.2", default-features = false, features = ["alloc", "libm"] } xtensa-lx-rt = { version = "*", features = ["float-save-restore"] } -futures = { version = "0.3.31", default-features = false, features = ["async-await"] } micromath = "2.1.0" enumset = "1.1.10" enum-map = "2.7.3" portable-atomic = { version = "1.11", features = ["critical-section"] } +embassy-futures = { version = "0.1.2", features = ["log"] } # Telemetry outputs esp-radio = { version = "*", optional = true, features = [ diff --git a/src/tasks/safetyui.rs b/src/tasks/safetyui.rs index c6e83d1..f7bd6af 100644 --- a/src/tasks/safetyui.rs +++ b/src/tasks/safetyui.rs @@ -4,7 +4,6 @@ use figments::prelude::*; use figments_render::output::Brightness; use rgb::Rgba; use core::fmt::Debug; -use futures::join; use log::*; use crate::{animation::{AnimDisplay, AnimatedSurface, Animation}, events::{Personality, Prediction}, graphics::{display::{DisplayControls, SegmentSpace, Uniforms}, shaders::*}, tasks::ui::UiSurfacePool}; @@ -84,10 +83,10 @@ impl { // FIXME: These should be a Off/Low/High enum, so the stopping brake looks different from the dayrunning brake. warn!("Active personality: Turning on safety lights"); - join!( + embassy_futures::join::join( TURN_ON.apply(&mut self.brakelight), TURN_ON.apply(&mut self.headlight) - ); + ).await; }, Personality::Parked => { warn!("Idle personality: Turning off safety lights"); - join!( + embassy_futures::join::join( TURN_OFF.apply(&mut self.brakelight), TURN_OFF.apply(&mut self.headlight) - ); + ).await; }, Personality::Sleeping => { warn!("Sleeping personality: Safety UI is going to sleep"); diff --git a/src/tasks/ui.rs b/src/tasks/ui.rs index b1f6926..67d5a3a 100644 --- a/src/tasks/ui.rs +++ b/src/tasks/ui.rs @@ -99,12 +99,12 @@ impl { @@ -114,12 +114,12 @@ impl { self.motion.set_shader(Movement::default());