From b1b6d1ea9416df9aca6b0051ccd0282c56b42376 Mon Sep 17 00:00:00 2001 From: Astro Date: Mon, 14 Sep 2020 00:12:28 +0200 Subject: [PATCH] fixes --- src/channels.rs | 3 ++- src/timer.rs | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/channels.rs b/src/channels.rs index 17ae9af..f82d778 100644 --- a/src/channels.rs +++ b/src/channels.rs @@ -65,7 +65,8 @@ impl Channels { let dac_value = { let state = self.channel_state(channel); - let pid_output = state.update_pid(instant, data); + state.update(instant, data); + let pid_output = state.update_pid(); if state.pid_engaged { Some(pid_output) diff --git a/src/timer.rs b/src/timer.rs index cfdd3b6..f02f4f9 100644 --- a/src/timer.rs +++ b/src/timer.rs @@ -42,7 +42,6 @@ pub fn now() -> u32 { /// block for at least `amount` milliseconds pub fn sleep(amount: u32) { - use crate::timer::now; let start = now(); while now() - start <= amount {} }