ld: ld_soft_i_limit now limits ld_i_out being set
This commit is contained in:
parent
6b250aa1fd
commit
0e087c6992
|
@ -148,8 +148,8 @@ impl LdDrive{
|
|||
}
|
||||
|
||||
pub fn ld_set_i(&mut self, i: ElectricCurrent){
|
||||
self.settings.ld_drive_current = i;
|
||||
LdCurrentOutCtrlTimer::set_target_i_and_listen_irq(i, self.ctrl.get_i_set());
|
||||
self.settings.ld_drive_current = i.min(self.settings.ld_drive_current_limit);
|
||||
LdCurrentOutCtrlTimer::set_target_i_and_listen_irq(self.settings.ld_drive_current, self.ctrl.get_i_set());
|
||||
}
|
||||
|
||||
pub fn poll_and_update_output_current(&mut self) -> ElectricCurrent {
|
||||
|
|
Loading…
Reference in New Issue