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.
This commit is contained in:
linuswck 2024-07-25 18:01:57 +08:00
parent a90031dd6c
commit 201148fb21
1 changed files with 2 additions and 3 deletions

View File

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