From ef362643a78dda23e163741d9076cf3b81141556 Mon Sep 17 00:00:00 2001 From: atse Date: Tue, 6 Aug 2024 12:50:51 +0800 Subject: [PATCH] get_i -> get_i_set --- src/channels.rs | 6 +++--- src/command_handler.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/channels.rs b/src/channels.rs index 158a570..0af115e 100644 --- a/src/channels.rs +++ b/src/channels.rs @@ -139,7 +139,7 @@ impl Channels { voltage } - pub fn get_i(&mut self, channel: usize) -> ElectricCurrent { + pub fn get_i_set(&mut self, channel: usize) -> ElectricCurrent { let i_set = self.channel_state(channel).i_set; i_set } @@ -474,7 +474,7 @@ impl Channels { } fn report(&mut self, channel: usize) -> Report { - let i_set = self.get_i(channel); + let i_set = self.get_i_set(channel); let i_tec = self.adc_read(channel, PinsAdcReadTarget::ITec, 16); let tec_i = self.get_tec_i(channel); let dac_value = self.get_dac(channel); @@ -529,7 +529,7 @@ impl Channels { PwmSummary { channel, center: CenterPointJson(self.channel_state(channel).center.clone()), - i_set: (self.get_i(channel), MAX_TEC_I).into(), + i_set: (self.get_i_set(channel), MAX_TEC_I).into(), max_v: self.get_max_v(channel).into(), max_i_pos: self.get_max_i_pos(channel).into(), max_i_neg: self.get_max_i_neg(channel).into(), diff --git a/src/command_handler.rs b/src/command_handler.rs index 9f97725..bc17072 100644 --- a/src/command_handler.rs +++ b/src/command_handler.rs @@ -207,7 +207,7 @@ impl Handler { channel: usize, center: CenterPoint, ) -> Result { - let i_set = channels.get_i(channel); + let i_set = channels.get_i_set(channel); let state = channels.channel_state(channel); state.center = center; if !state.pid_engaged {