From 10873f47919ea5fd9869130cfdbbe8f5ae70795b Mon Sep 17 00:00:00 2001 From: linuswck Date: Tue, 9 Apr 2024 11:42:04 +0800 Subject: [PATCH] firmware: Load default pwr_on settings from flash --- src/laser_diode/laser_diode.rs | 2 +- src/thermostat/thermostat.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/laser_diode/laser_diode.rs b/src/laser_diode/laser_diode.rs index 0faa163..79e3b8d 100644 --- a/src/laser_diode/laser_diode.rs +++ b/src/laser_diode/laser_diode.rs @@ -235,7 +235,7 @@ impl LdDrive{ self.settings.ld_drive_current_limit = settings.ld_drive_current_limit.value; self.settings.pd_mon_params = settings.pd_mon_params; self.settings.ld_pwr_limit = settings.ld_pwr_limit; - + self.settings.default_pwr_on = settings.default_pwr_on; if self.settings.ld_terms_short { self.ld_short(); } else { diff --git a/src/thermostat/thermostat.rs b/src/thermostat/thermostat.rs index fa274f9..e4fbe13 100644 --- a/src/thermostat/thermostat.rs +++ b/src/thermostat/thermostat.rs @@ -537,7 +537,7 @@ impl Thermostat{ if !settings.pid_engaged { self.set_i(settings.tec_settings.i_set.value); } - + self.set_default_pwr_on(settings.default_pwr_on); if settings.default_pwr_on { self.power_up(); } else {