code clean up

This commit is contained in:
Philipp 2025-06-18 15:35:33 +02:00
parent cd713d5849
commit eaca9d8cec
2 changed files with 6 additions and 5 deletions

View File

@ -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(())
}

View File

@ -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(())
}