forked from M-Labs/thermostat
calibration: read vref direct
This commit is contained in:
parent
ae3d8b51d4
commit
832df121a2
|
@ -266,9 +266,9 @@ impl<'a> Channels<'a> {
|
|||
let samples = 50;
|
||||
let mut target_voltage = ElectricPotential::new::<volt>(0.0);
|
||||
for _ in 0..samples {
|
||||
target_voltage = target_voltage + self.get_center(channel);
|
||||
target_voltage += self.read_vref(channel);
|
||||
}
|
||||
target_voltage = target_voltage / samples as f64;
|
||||
target_voltage /= samples as f64;
|
||||
let mut start_value = 1;
|
||||
let mut best_error = ElectricPotential::new::<volt>(100.0);
|
||||
|
||||
|
|
Loading…
Reference in New Issue