From eddf05cae7cbfb50ff3e92995350f811605d2d1c Mon Sep 17 00:00:00 2001 From: atse Date: Fri, 9 Aug 2024 13:36:26 +0800 Subject: [PATCH] channels: 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 9cfed65..22a7156 100644 --- a/src/channels.rs +++ b/src/channels.rs @@ -144,7 +144,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 } @@ -470,7 +470,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); @@ -525,7 +525,7 @@ impl Channels { OutputSummary { channel, center: CenterPointJson(self.channel_state(channel).center.clone()), - i_set: self.get_i(channel), + i_set: self.get_i_set(channel), max_v: self.get_max_v(channel), max_i_pos: self.get_max_i_pos(channel), max_i_neg: self.get_max_i_neg(channel), diff --git a/src/command_handler.rs b/src/command_handler.rs index 77b953b..6d4a71a 100644 --- a/src/command_handler.rs +++ b/src/command_handler.rs @@ -206,7 +206,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 {