cmd_handler: change mW to W in SetLdPwrLimit cmd
This commit is contained in:
parent
489333c43d
commit
eaebdb390d
@ -333,7 +333,7 @@ class Laser:
|
||||
Set power limit for the power excursion monitor
|
||||
If the calculated power with the params of pd_mon > pwr_limit,
|
||||
overpower protection is triggered.
|
||||
- pwr_limit: mW
|
||||
- pwr_limit: W
|
||||
"""
|
||||
return await self._send_cmd(TARGET_LD, "SetLdPwrLimit", pwr_limit)
|
||||
|
||||
|
@ -5,7 +5,7 @@ use uom::si::{
|
||||
electric_current::{ampere, ElectricCurrent},
|
||||
electric_potential::{volt, ElectricPotential},
|
||||
electrical_resistance::{ohm, ElectricalResistance},
|
||||
power::{milliwatt, Power},
|
||||
power::{watt, Power},
|
||||
thermodynamic_temperature::{degree_celsius, ThermodynamicTemperature}
|
||||
};
|
||||
use crate::{laser_diode::{laser_diode::{
|
||||
@ -383,7 +383,7 @@ pub fn execute_cmd(buffer: &mut [u8], buffer_size: usize, socket: &mut SocketHan
|
||||
match cmd.json.data_f32 {
|
||||
Some(val) => {
|
||||
send_response(buffer, ResponseEnum::Acknowledge, None, socket);
|
||||
laser.set_ld_power_limit(Power::new::<milliwatt>(val))
|
||||
laser.set_ld_power_limit(Power::new::<watt>(val))
|
||||
}
|
||||
None => {
|
||||
send_response(buffer, ResponseEnum::InvalidDatatype, Some(ERR_MSG_MISSING_DATA_F32), socket);
|
||||
|
Loading…
Reference in New Issue
Block a user