From cc5c21e088119ad9499cb1b471ccad75efe9d809 Mon Sep 17 00:00:00 2001 From: Astro Date: Thu, 3 Oct 2019 01:35:37 +0200 Subject: [PATCH] main: use temperature as PID input --- firmware/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firmware/src/main.rs b/firmware/src/main.rs index 04b84a8..6845219 100644 --- a/firmware/src/main.rs +++ b/firmware/src/main.rs @@ -263,7 +263,7 @@ fn main() -> ! { let temperature = state.sh.get_temperature(voltage); if state.pid_enabled { - let width = state.pid.update(data as f32) as u16; + let width = state.pid.update(temperature) as u16; match channel { 0 => tec0.set(TecPin::ISet, width, PWM_PID_WIDTH), 1 => tec1.set(TecPin::ISet, width, PWM_PID_WIDTH),