diff --git a/src/channels.rs b/src/channels.rs index a428dd1..2017041 100644 --- a/src/channels.rs +++ b/src/channels.rs @@ -134,7 +134,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 } @@ -464,7 +464,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); @@ -518,7 +518,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 3f30083..0924fa7 100644 --- a/src/command_handler.rs +++ b/src/command_handler.rs @@ -207,7 +207,7 @@ impl Handler { } fn set_center_point(socket: &mut TcpSocket, channels: &mut Channels, 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 {