PID_improvements #45
|
@ -364,12 +364,12 @@ impl Channels {
|
||||||
(duty * max, max)
|
(duty * max, max)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get actual current passing through TEC
|
// Get current passing through TEC
|
||||||
|
|||||||
pub fn get_tec_i(&mut self, channel: usize) -> ElectricCurrent {
|
pub fn get_tec_i(&mut self, channel: usize) -> ElectricCurrent {
|
||||||
(self.read_itec(channel) - self.read_vref(channel)) / ElectricalResistance::new::<ohm>(0.4)
|
(self.read_itec(channel) - self.read_vref(channel)) / ElectricalResistance::new::<ohm>(0.4)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get actual voltage across TEC
|
// Get voltage across TEC
|
||||||
pub fn get_tec_v(&mut self, channel: usize) -> ElectricPotential {
|
pub fn get_tec_v(&mut self, channel: usize) -> ElectricPotential {
|
||||||
(self.read_tec_u_meas(channel) - ElectricPotential::new::<volt>(1.5)) * 4.0
|
(self.read_tec_u_meas(channel) - ElectricPotential::new::<volt>(1.5)) * 4.0
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Actual?
There are quite a few variables describing currents, like current setpoint, dac voltage setpoint controlling output current, dac voltage readback for current control.
This returns the thermostat measured current that is passing through the TEC, hence "actual".
I'll rephrase the comment for clarity.