diff --git a/src/laser_diode/ld_drive.rs b/src/laser_diode/ld_drive.rs index d472344..546325c 100644 --- a/src/laser_diode/ld_drive.rs +++ b/src/laser_diode/ld_drive.rs @@ -45,8 +45,8 @@ impl Settings{ #[derive(Clone, Debug, Miniconf)] pub struct Settings { - pub ld_drive_current: ElectricCurrent, - pub pd_i_to_out_pwr: i_to_power_unit, + ld_drive_current: ElectricCurrent, + pd_i_to_out_pwr: i_to_power_unit, } impl Default for Settings { @@ -85,6 +85,14 @@ impl LD_Drive{ self.ctrl.power_down(); } + pub fn get_ld_drive_current(&mut self) -> ElectricCurrent{ + self.settings.ld_drive_current + } + + pub fn set_pd_i_to_out_pwr(&mut self, val: i_to_power_unit){ + self.settings.pd_i_to_out_pwr = val; + } + pub fn ld_short(&mut self) { self.ctrl.ld_short_enable(); }