mirror of
https://github.com/Djeeberjr/fw-anwesenheit.git
synced 2026-04-30 18:49:09 +00:00
added error state flag
This commit is contained in:
@@ -42,6 +42,12 @@ impl<B: Buzzer, L: StatusLed> Feedback<B, L> {
|
||||
});
|
||||
}
|
||||
|
||||
pub async fn activate_error_state(&mut self) -> Result<()> {
|
||||
self.led.turn_on(RED)?;
|
||||
Self::beep_nak(&mut self.buzzer).await?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
async fn blink_led_for_duration(led: &mut L, color: RGB8, duration: Duration) -> Result<()> {
|
||||
led.turn_on(color)?;
|
||||
sleep(duration).await;
|
||||
|
||||
Reference in New Issue
Block a user