mirror of
https://github.com/Djeeberjr/fw-anwesenheit.git
synced 2025-07-01 16:54:17 +00:00
code clean up
This commit is contained in:
parent
cd713d5849
commit
eaca9d8cec
@ -1,7 +1,7 @@
|
||||
use anyhow::{Result, anyhow};
|
||||
use log::{trace, warn};
|
||||
use smart_leds::colors::GREEN;
|
||||
use std::env;
|
||||
use std::{env, time::Duration};
|
||||
use tokio::process::Command;
|
||||
|
||||
use crate::{feedback::{self, FeedbackImpl}, hardware::Hotspot, spi_led};
|
||||
@ -128,7 +128,7 @@ impl Hotspot for NMHotspot {
|
||||
}
|
||||
|
||||
feedback::CURRENTSTATUS = Ready;
|
||||
FeedbackImpl::flash_led_for_duration(led, GREEN, 1000);
|
||||
FeedbackImpl::flash_led_for_duration(led, GREEN, Duration::from_secs(1));
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
@ -175,6 +175,10 @@ async fn main() -> Result<()> {
|
||||
|
||||
let webserver_handle = run_webserver(store.clone(), sse_tx, hotspot.clone());
|
||||
|
||||
feedback::CURRENTSTATUS = Ready;
|
||||
FeedbackImpl::beep_startup(buzzer);
|
||||
FeedbackImpl::flash_led_for_duration(led, GREEN, Duration::from_secs(1));
|
||||
|
||||
let run_result = try_join!(pm3_handle, loop_handle, webserver_handle);
|
||||
|
||||
|
||||
@ -183,8 +187,5 @@ async fn main() -> Result<()> {
|
||||
return Err(e);
|
||||
}
|
||||
|
||||
feedback::CURRENTSTATUS = Ready;
|
||||
FeedbackImpl::beep_startup(buzzer);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user