Refresh the lcd periodically during calibration

This commit is contained in:
Yuri D'Elia 2022-06-27 11:54:10 +02:00
parent 47d2e9e61c
commit 0680c0b428

View file

@ -2627,6 +2627,7 @@ void waiting_handler()
manage_heater(); manage_heater();
host_keepalive(); host_keepalive();
host_autoreport(); host_autoreport();
lcd_update(0);
} }
void wait(unsigned ms) void wait(unsigned ms)
@ -2668,8 +2669,8 @@ uint16_t record(uint16_t samples = REC_BUFFER_SIZE) {
uint16_t pos = 0; uint16_t pos = 0;
while(pos < samples) { while(pos < samples) {
if(!TEMP_MGR_INT_FLAG_STATE()) { if(!TEMP_MGR_INT_FLAG_STATE()) {
// temperatures not ready yet // temperatures not ready yet, just manage heaters while waiting to reduce jitter
waiting_handler(); manage_heater();
continue; continue;
} }
TEMP_MGR_INT_FLAG_CLEAR(); TEMP_MGR_INT_FLAG_CLEAR();
@ -2689,6 +2690,9 @@ uint16_t record(uint16_t samples = REC_BUFFER_SIZE) {
entry.temp = current_temperature_isr[0]; entry.temp = current_temperature_isr[0];
entry.pwm = soft_pwm[0]; entry.pwm = soft_pwm[0];
++pos; ++pos;
// it's now safer to give regular serial/lcd updates a shot
waiting_handler();
} }
return pos; return pos;