fix(input): don't use raw waker (embassy)

This commit is contained in:
Naxdy 2024-03-27 20:09:14 +01:00
parent 4077220f27
commit 3514463dbb
Signed by: Naxdy
GPG key ID: CC15075846BCE91B

View file

@ -135,9 +135,11 @@ async fn update_stick_states<
let mut cy_sum = 0u32;
// TODO: lower interval possible?
let mut timer = Timer::at(Instant::now() + embassy_time::Duration::from_millis(1));
while embassy_futures::poll_once(&mut timer) != Poll::Ready(()) {
let end_time = Instant::now() + embassy_time::Duration::from_millis(1);
let timer = Timer::at(end_time);
while Instant::now() < end_time {
adc_count += 1;
ax_sum += read_ext_adc(
Stick::ControlStick,