1
0
forked from M-Labs/kirdy

ld: correct timer and dac reset in pwr_up seq

This commit is contained in:
linuswck 2024-02-21 11:11:12 +08:00
parent 30ab228b4b
commit ed785b7c85

View File

@ -116,8 +116,8 @@ impl LdDrive{
} }
pub fn power_up(&mut self){ pub fn power_up(&mut self){
let _ = self.ctrl.set_i(ElectricCurrent::new::<milliampere>(0.0), Settings::LD_DRIVE_TRANSIMPEDANCE, Settings::DAC_OUT_V_MAX);
LdCurrentOutCtrlTimer::reset(); LdCurrentOutCtrlTimer::reset();
let _ = self.ctrl.set_i(ElectricCurrent::new::<milliampere>(0.0), Settings::LD_DRIVE_TRANSIMPEDANCE, Settings::DAC_OUT_V_MAX);
LdPwrExcProtector::pwr_on_and_arm_protection(); LdPwrExcProtector::pwr_on_and_arm_protection();
// Wait for LD Power Supply to start up before driving current to laser diode // Wait for LD Power Supply to start up before driving current to laser diode
sleep(30); sleep(30);