From 201148fb21c3b2884d35833dfa3f77145ab47b6d Mon Sep 17 00:00:00 2001 From: linuswck Date: Thu, 25 Jul 2024 18:01:57 +0800 Subject: [PATCH] main: allow loading flash without device settings - Fix bugs: ld & thermostat settings cannot be loaded if device settings are not present. But, device settings can be left not configured. --- src/main.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index ec71424..194a058 100644 --- a/src/main.rs +++ b/src/main.rs @@ -101,10 +101,10 @@ fn main() -> ! { device_settings_flash = config; laser.set_pd_transconductance(config.pd_mon_fin_gain * config.pd_mon_transconductance); debug!("Found Device Settings"); + device_settings = device_settings_flash; } Ok(None) => { - debug!("Flash does not have Device Settings"); - continue; + info!("Flash does not have Device Settings"); } Err(e) => { debug!("Cannot Store Flash: {:?}", e); @@ -147,7 +147,6 @@ fn main() -> ! { } wd.feed(); - device_settings = device_settings_flash; thermostat.load_settings_from_summary(thermostat_settings); laser.load_settings_from_summary(laser_settings); }