diff --git a/src/tasks/safetyui.rs b/src/tasks/safetyui.rs index dfaa47c..bef47f0 100644 --- a/src/tasks/safetyui.rs +++ b/src/tasks/safetyui.rs @@ -72,21 +72,20 @@ 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"); - TURN_ON.apply([ + TURN_ON_FAST.apply([ &mut self.brakelight, &mut self.headlight ]).await; }, Personality::Parked => { warn!("Idle personality: Turning off safety lights"); - TURN_OFF.apply([ + TURN_OFF_FAST.apply([ &mut self.brakelight, &mut self.headlight ]).await; @@ -120,8 +119,9 @@ impl = Animation::new().duration(Duration::from_secs(1)).from(Fract8::MIN).to(Fract8::MAX); -const TURN_OFF: Animation = Animation::new().duration(Duration::from_secs(1)).from(Fract8::MAX).to(Fract8::MIN); +const TURN_ON_FAST: Animation = Animation::new().duration(Duration::from_secs(1)).from(Fract8::MIN).to(Fract8::MAX); +const TURN_OFF_FAST: Animation = Animation::new().duration(Duration::from_secs(1)).from(Fract8::MAX).to(Fract8::MIN); +const TURN_ON_SLOW: Animation = Animation::new().duration(Duration::from_secs(3)).from(Fract8::MIN).to(Fract8::MAX); #[embassy_executor::task] pub async fn safety_ui_main(mut events: DynSubscriber<'static, Prediction>, mut ui: SafetyUi<::Surface>) {