forked from M-Labs/thermostat
fixes
This commit is contained in:
parent
1849e6f5e7
commit
b1b6d1ea94
|
@ -65,7 +65,8 @@ impl Channels {
|
||||||
|
|
||||||
let dac_value = {
|
let dac_value = {
|
||||||
let state = self.channel_state(channel);
|
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 {
|
if state.pid_engaged {
|
||||||
Some(pid_output)
|
Some(pid_output)
|
||||||
|
|
|
@ -42,7 +42,6 @@ pub fn now() -> u32 {
|
||||||
|
|
||||||
/// block for at least `amount` milliseconds
|
/// block for at least `amount` milliseconds
|
||||||
pub fn sleep(amount: u32) {
|
pub fn sleep(amount: u32) {
|
||||||
use crate::timer::now;
|
|
||||||
let start = now();
|
let start = now();
|
||||||
while now() - start <= amount {}
|
while now() - start <= amount {}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue