forked from M-Labs/kirdy
Start tec_readings_conversion after report is sent
- Before this fix, tec_readings only converts when eth_is_pending
This commit is contained in:
parent
7d2e14ef2f
commit
67f9e65df8
|
@ -133,12 +133,10 @@ fn main() -> ! {
|
||||||
}
|
}
|
||||||
State::MainLoop => {
|
State::MainLoop => {
|
||||||
let mut eth_is_pending = false;
|
let mut eth_is_pending = false;
|
||||||
let mut has_temp_reading = false;
|
|
||||||
|
|
||||||
laser.poll_and_update_output_current();
|
laser.poll_and_update_output_current();
|
||||||
|
|
||||||
if thermostat.poll_adc() {
|
if thermostat.poll_adc() {
|
||||||
has_temp_reading = true;
|
|
||||||
thermostat.update_pid();
|
thermostat.update_pid();
|
||||||
if thermostat.get_temp_mon_status().over_temp_alarm {
|
if thermostat.get_temp_mon_status().over_temp_alarm {
|
||||||
laser.power_down();
|
laser.power_down();
|
||||||
|
@ -158,6 +156,8 @@ fn main() -> ! {
|
||||||
active_report[id] = false;
|
active_report[id] = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
thermostat.start_tec_readings_conversion();
|
||||||
}
|
}
|
||||||
cortex_m::interrupt::free(|cs|
|
cortex_m::interrupt::free(|cs|
|
||||||
{
|
{
|
||||||
|
@ -178,9 +178,6 @@ fn main() -> ! {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if has_temp_reading {
|
|
||||||
thermostat.start_tec_readings_conversion();
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue