From ad731c2f151cc0214ce15bcab4b67246cbe3dc1b Mon Sep 17 00:00:00 2001 From: linuswck Date: Fri, 26 Jan 2024 12:25:26 +0800 Subject: [PATCH] rename pd_mon -> pd_responsitivity --- src/laser_diode/laser_diode.rs | 8 ++++---- src/laser_diode/mod.rs | 2 +- src/laser_diode/{pd_mon.rs => pd_responsitivity.rs} | 0 3 files changed, 5 insertions(+), 5 deletions(-) rename src/laser_diode/{pd_mon.rs => pd_responsitivity.rs} (100%) diff --git a/src/laser_diode/laser_diode.rs b/src/laser_diode/laser_diode.rs index 5c4e7cb..95d30e8 100644 --- a/src/laser_diode/laser_diode.rs +++ b/src/laser_diode/laser_diode.rs @@ -2,7 +2,7 @@ use miniconf::Miniconf; use stm32f4xx_hal::pac::ADC2; use crate::laser_diode::ld_ctrl::LdCtrl; 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 uom::si::{ @@ -45,7 +45,7 @@ pub struct Settings { ld_drive_current: ElectricCurrent, ld_drive_current_limit: ElectricCurrent, #[miniconf(defer)] - pd_responsitivity: pd_mon::Parameters, + pd_responsitivity: pd_responsitivity::Parameters, } impl Default for Settings { @@ -53,7 +53,7 @@ impl Default for Settings { Self { ld_drive_current: ElectricCurrent::new::(0.0), ld_drive_current_limit: ElectricCurrent::new::(0.0), - pd_responsitivity: pd_mon::Parameters::default(), + pd_responsitivity: pd_responsitivity::Parameters::default(), } } } @@ -127,7 +127,7 @@ impl LdDrive{ 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; } diff --git a/src/laser_diode/mod.rs b/src/laser_diode/mod.rs index 767cdaf..c765ba1 100644 --- a/src/laser_diode/mod.rs +++ b/src/laser_diode/mod.rs @@ -1,5 +1,5 @@ pub mod ld_ctrl; pub mod max5719; pub mod laser_diode; -pub mod pd_mon; +pub mod pd_responsitivity; pub mod ld_pwr_exc_protector; \ No newline at end of file diff --git a/src/laser_diode/pd_mon.rs b/src/laser_diode/pd_responsitivity.rs similarity index 100% rename from src/laser_diode/pd_mon.rs rename to src/laser_diode/pd_responsitivity.rs