ld_drive: add a param for setting to cal pd pwr

- Conversion ratio between pd current and ld output power
This commit is contained in:
linuswck 2024-01-09 16:10:14 +08:00
parent a99dde8b38
commit 707fac0775

View File

@ -1,6 +1,6 @@
use miniconf::Miniconf;
use crate::laser_diode::current_sources::CurrentSource;
use core::marker::PhantomData;
use core::{marker::PhantomData, f64::NAN};
use uom::si::{
electric_current::{milliampere},
@ -46,12 +46,14 @@ impl Settings{
#[derive(Clone, Debug, Miniconf)]
pub struct Settings {
pub ld_drive_current: ElectricCurrent,
pub pd_i_to_out_pwr: i_to_power_unit,
}
impl Default for Settings {
fn default() -> Self {
Self {
ld_drive_current: ElectricCurrent::new::<milliampere>(0.0),
pd_i_to_out_pwr: i_to_power_unit {dimension: PhantomData, units: PhantomData, value: NAN}
}
}
}