From 4cd328d98cae73b4831e1485dca384e3e84a7458 Mon Sep 17 00:00:00 2001 From: linuswck Date: Fri, 19 Jul 2024 10:59:05 +0800 Subject: [PATCH] ld: apply pwr limit setting to analog watchdog - This fixes a bug which power limit is not applied to pd_mon at startup --- src/laser_diode/laser_diode.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/laser_diode/laser_diode.rs b/src/laser_diode/laser_diode.rs index ace4c9a..797712b 100644 --- a/src/laser_diode/laser_diode.rs +++ b/src/laser_diode/laser_diode.rs @@ -255,6 +255,9 @@ impl LdDrive { 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; + + self.set_ld_power_limit(settings.ld_pwr_limit); + if self.settings.ld_terms_short { self.ld_short(); } else {