feat(config): improve ticker during notch adjustment
This commit is contained in:
parent
974aa6b7af
commit
417c4a677a
1 changed files with 2 additions and 4 deletions
|
@ -34,7 +34,7 @@ use embassy_sync::{
|
||||||
pubsub::Subscriber,
|
pubsub::Subscriber,
|
||||||
signal::Signal,
|
signal::Signal,
|
||||||
};
|
};
|
||||||
use embassy_time::{Duration, Ticker, Timer};
|
use embassy_time::Timer;
|
||||||
|
|
||||||
use crate::{gcc_hid::GcReport, input::CHANNEL_GCC_STATE};
|
use crate::{gcc_hid::GcReport, input::CHANNEL_GCC_STATE};
|
||||||
|
|
||||||
|
@ -1057,8 +1057,6 @@ impl<'a> StickCalibrationProcess<'a> {
|
||||||
|
|
||||||
Timer::after_millis(100).await;
|
Timer::after_millis(100).await;
|
||||||
|
|
||||||
let mut ticker = Ticker::every(Duration::from_millis(20));
|
|
||||||
|
|
||||||
let notch_idx = NOTCH_ADJUSTMENT_ORDER
|
let notch_idx = NOTCH_ADJUSTMENT_ORDER
|
||||||
[self.calibration_step as usize - NO_OF_CALIBRATION_POINTS];
|
[self.calibration_step as usize - NO_OF_CALIBRATION_POINTS];
|
||||||
|
|
||||||
|
@ -1100,7 +1098,7 @@ impl<'a> StickCalibrationProcess<'a> {
|
||||||
None => self.adjust_notch(NotchAdjustmentType::None),
|
None => self.adjust_notch(NotchAdjustmentType::None),
|
||||||
};
|
};
|
||||||
|
|
||||||
ticker.next().await;
|
Timer::after_millis(1).await;
|
||||||
yield_now().await;
|
yield_now().await;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue