Remove stale reference to channel_state vref

This commit is contained in:
atse 2023-08-22 17:01:00 +08:00
parent 9df0fe406f
commit bb4f43fe1c
1 changed files with 2 additions and 5 deletions

View File

@ -97,11 +97,8 @@ impl Channels {
/// calculate the TEC i_set centerpoint /// calculate the TEC i_set centerpoint
pub fn get_center(&mut self, channel: usize) -> ElectricPotential { pub fn get_center(&mut self, channel: usize) -> ElectricPotential {
match self.channel_state(channel).center { match self.channel_state(channel).center {
CenterPoint::Vref => { CenterPoint::Vref =>
let vref = self.read_vref(channel); self.read_vref(channel),
self.channel_state(channel).vref = vref;
vref
},
CenterPoint::Override(center_point) => CenterPoint::Override(center_point) =>
ElectricPotential::new::<volt>(center_point.into()), ElectricPotential::new::<volt>(center_point.into()),
} }