rename pd_mon -> pd_responsitivity
This commit is contained in:
parent
9d8a553669
commit
ad731c2f15
|
@ -2,7 +2,7 @@ use miniconf::Miniconf;
|
||||||
use stm32f4xx_hal::pac::ADC2;
|
use stm32f4xx_hal::pac::ADC2;
|
||||||
use crate::laser_diode::ld_ctrl::LdCtrl;
|
use crate::laser_diode::ld_ctrl::LdCtrl;
|
||||||
use crate::laser_diode::ld_pwr_exc_protector::{LdPwrExcProtector, self};
|
use crate::laser_diode::ld_pwr_exc_protector::{LdPwrExcProtector, self};
|
||||||
use crate::laser_diode::pd_mon;
|
use crate::laser_diode::pd_responsitivity;
|
||||||
use core::marker::PhantomData;
|
use core::marker::PhantomData;
|
||||||
|
|
||||||
use uom::si::{
|
use uom::si::{
|
||||||
|
@ -45,7 +45,7 @@ pub struct Settings {
|
||||||
ld_drive_current: ElectricCurrent,
|
ld_drive_current: ElectricCurrent,
|
||||||
ld_drive_current_limit: ElectricCurrent,
|
ld_drive_current_limit: ElectricCurrent,
|
||||||
#[miniconf(defer)]
|
#[miniconf(defer)]
|
||||||
pd_responsitivity: pd_mon::Parameters,
|
pd_responsitivity: pd_responsitivity::Parameters,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for Settings {
|
impl Default for Settings {
|
||||||
|
@ -53,7 +53,7 @@ impl Default for Settings {
|
||||||
Self {
|
Self {
|
||||||
ld_drive_current: ElectricCurrent::new::<milliampere>(0.0),
|
ld_drive_current: ElectricCurrent::new::<milliampere>(0.0),
|
||||||
ld_drive_current_limit: ElectricCurrent::new::<milliampere>(0.0),
|
ld_drive_current_limit: ElectricCurrent::new::<milliampere>(0.0),
|
||||||
pd_responsitivity: pd_mon::Parameters::default(),
|
pd_responsitivity: pd_responsitivity::Parameters::default(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -127,7 +127,7 @@ impl LdDrive{
|
||||||
LdPwrExcProtector::clear_alarm_status();
|
LdPwrExcProtector::clear_alarm_status();
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_pd_responsitivity(&mut self, responsitivity: pd_mon::ResponsitivityUnit){
|
pub fn set_pd_responsitivity(&mut self, responsitivity: pd_responsitivity::ResponsitivityUnit){
|
||||||
self.settings.pd_responsitivity.responsitivity = responsitivity;
|
self.settings.pd_responsitivity.responsitivity = responsitivity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
pub mod ld_ctrl;
|
pub mod ld_ctrl;
|
||||||
pub mod max5719;
|
pub mod max5719;
|
||||||
pub mod laser_diode;
|
pub mod laser_diode;
|
||||||
pub mod pd_mon;
|
pub mod pd_responsitivity;
|
||||||
pub mod ld_pwr_exc_protector;
|
pub mod ld_pwr_exc_protector;
|
Loading…
Reference in New Issue