diff --git a/src/main.rs b/src/main.rs index 820beeb..c8d0109 100644 --- a/src/main.rs +++ b/src/main.rs @@ -133,12 +133,10 @@ fn main() -> ! { } State::MainLoop => { let mut eth_is_pending = false; - let mut has_temp_reading = false; laser.poll_and_update_output_current(); if thermostat.poll_adc() { - has_temp_reading = true; thermostat.update_pid(); if thermostat.get_temp_mon_status().over_temp_alarm { laser.power_down(); @@ -158,6 +156,8 @@ fn main() -> ! { active_report[id] = false; } }); + + thermostat.start_tec_readings_conversion(); } cortex_m::interrupt::free(|cs| { @@ -178,9 +178,6 @@ fn main() -> ! { } } } - if has_temp_reading { - thermostat.start_tec_readings_conversion(); - } }) }; }