Give time for dac value to settle when calibrating
This commit is contained in:
parent
a2043baa1f
commit
0fc4a8878c
|
@ -20,6 +20,7 @@ use crate::{
|
|||
command_handler::JsonBuffer,
|
||||
pins,
|
||||
steinhart_hart,
|
||||
timer,
|
||||
};
|
||||
|
||||
pub const CHANNELS: usize = 2;
|
||||
|
@ -271,6 +272,7 @@ impl Channels {
|
|||
let mut best_error = ElectricPotential::new::<volt>(100.0);
|
||||
|
||||
for step in (0..18).rev() {
|
||||
timer::sleep(5);
|
||||
let mut prev_value = start_value;
|
||||
for value in (start_value..=ad5680::MAX_VALUE).step_by(1 << step) {
|
||||
match channel {
|
||||
|
|
Loading…
Reference in New Issue