remove boardaccess arc and replace with static lazy

This commit is contained in:
2023-12-27 20:00:06 +01:00
parent 4c02b99ea7
commit 5724088780
5 changed files with 20 additions and 25 deletions

View File

@@ -140,7 +140,7 @@ pub trait PlantCtrlBoardInteraction {
}
pub trait CreatePlantHal<'a> {
fn create() -> Result<Arc<Mutex<PlantCtrlBoard<'static>>>>;
fn create() -> Result<Mutex<PlantCtrlBoard<'static>>>;
}
pub struct PlantHal {}
@@ -557,12 +557,10 @@ impl PlantCtrlBoardInteraction for PlantCtrlBoard<'_> {
if wifi_config.exists() {
println!("Removing wifi config");
std::fs::remove_file(wifi_config)?;
Ok(ClearConfigType::WifiConfig);
return Ok(ClearConfigType::WifiConfig);
}
Ok((ClearConfigType::None));
return Ok((ClearConfigType::None));
}
fn get_wifi(&mut self) -> Result<config::WifiConfig> {