forked from M-Labs/kirdy
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:
parent
a90031dd6c
commit
201148fb21
|
@ -101,10 +101,10 @@ fn main() -> ! {
|
||||||
device_settings_flash = config;
|
device_settings_flash = config;
|
||||||
laser.set_pd_transconductance(config.pd_mon_fin_gain * config.pd_mon_transconductance);
|
laser.set_pd_transconductance(config.pd_mon_fin_gain * config.pd_mon_transconductance);
|
||||||
debug!("Found Device Settings");
|
debug!("Found Device Settings");
|
||||||
|
device_settings = device_settings_flash;
|
||||||
}
|
}
|
||||||
Ok(None) => {
|
Ok(None) => {
|
||||||
debug!("Flash does not have Device Settings");
|
info!("Flash does not have Device Settings");
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
debug!("Cannot Store Flash: {:?}", e);
|
debug!("Cannot Store Flash: {:?}", e);
|
||||||
|
@ -147,7 +147,6 @@ fn main() -> ! {
|
||||||
}
|
}
|
||||||
|
|
||||||
wd.feed();
|
wd.feed();
|
||||||
device_settings = device_settings_flash;
|
|
||||||
thermostat.load_settings_from_summary(thermostat_settings);
|
thermostat.load_settings_from_summary(thermostat_settings);
|
||||||
laser.load_settings_from_summary(laser_settings);
|
laser.load_settings_from_summary(laser_settings);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue