forked from M-Labs/thermostat
calibration: read vref direct
This commit is contained in:
parent
76547be90a
commit
5aaa1edad7
@ -264,9 +264,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
Block a user