feat(config): improve ticker during notch adjustment
All checks were successful
Code quality / check (pull_request) Successful in 2m0s
Publish nightly release / build (push) Successful in 1m27s

This commit is contained in:
Naxdy 2024-04-20 11:39:58 +02:00
parent 974aa6b7af
commit 417c4a677a
Signed by: Naxdy
GPG key ID: CC15075846BCE91B

View file

@ -34,7 +34,7 @@ use embassy_sync::{
pubsub::Subscriber,
signal::Signal,
};
use embassy_time::{Duration, Ticker, Timer};
use embassy_time::Timer;
use crate::{gcc_hid::GcReport, input::CHANNEL_GCC_STATE};
@ -1057,8 +1057,6 @@ impl<'a> StickCalibrationProcess<'a> {
Timer::after_millis(100).await;
let mut ticker = Ticker::every(Duration::from_millis(20));
let notch_idx = NOTCH_ADJUSTMENT_ORDER
[self.calibration_step as usize - NO_OF_CALIBRATION_POINTS];
@ -1100,7 +1098,7 @@ impl<'a> StickCalibrationProcess<'a> {
None => self.adjust_notch(NotchAdjustmentType::None),
};
ticker.next().await;
Timer::after_millis(1).await;
yield_now().await;
}
};