From 707fac0775f6b29b2e6037424912f87a4bc32452 Mon Sep 17 00:00:00 2001 From: linuswck Date: Tue, 9 Jan 2024 16:10:14 +0800 Subject: [PATCH] ld_drive: add a param for setting to cal pd pwr - Conversion ratio between pd current and ld output power --- src/laser_diode/ld_drive.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/laser_diode/ld_drive.rs b/src/laser_diode/ld_drive.rs index 0408ce4..36cb074 100644 --- a/src/laser_diode/ld_drive.rs +++ b/src/laser_diode/ld_drive.rs @@ -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::(0.0), + pd_i_to_out_pwr: i_to_power_unit {dimension: PhantomData, units: PhantomData, value: NAN} } } }