From 0680c0b428aaa3f677b2bfb1790f288052bb8808 Mon Sep 17 00:00:00 2001 From: Yuri D'Elia Date: Mon, 27 Jun 2022 11:54:10 +0200 Subject: [PATCH] Refresh the lcd periodically during calibration --- Firmware/temperature.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Firmware/temperature.cpp b/Firmware/temperature.cpp index 2e2f9683..0e46f1ae 100755 --- a/Firmware/temperature.cpp +++ b/Firmware/temperature.cpp @@ -2627,6 +2627,7 @@ void waiting_handler() manage_heater(); host_keepalive(); host_autoreport(); + lcd_update(0); } void wait(unsigned ms) @@ -2668,8 +2669,8 @@ uint16_t record(uint16_t samples = REC_BUFFER_SIZE) { uint16_t pos = 0; while(pos < samples) { if(!TEMP_MGR_INT_FLAG_STATE()) { - // temperatures not ready yet - waiting_handler(); + // temperatures not ready yet, just manage heaters while waiting to reduce jitter + manage_heater(); continue; } 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.pwm = soft_pwm[0]; ++pos; + + // it's now safer to give regular serial/lcd updates a shot + waiting_handler(); } return pos;