ultralcd: eliminate display flicker in pid_extruder

This commit is contained in:
Ted Hess 2018-01-04 17:13:03 -05:00
parent ce36964279
commit 05a31ff2da
1 changed files with 12 additions and 9 deletions

View File

@ -2223,15 +2223,18 @@ static void lcd_adjust_bed()
void pid_extruder() { void pid_extruder() {
lcd_implementation_clear(); if ((encoderPosition != 0) || (lcdDrawUpdate == 1)) {
lcd.setCursor(1, 0); lcd_implementation_clear();
lcd_printPGM(MSG_SET_TEMPERATURE); lcd.setCursor(1, 0);
pid_temp += int(encoderPosition); lcd_printPGM(MSG_SET_TEMPERATURE);
if (pid_temp > HEATER_0_MAXTEMP) pid_temp = HEATER_0_MAXTEMP; pid_temp += int(encoderPosition);
if (pid_temp < HEATER_0_MINTEMP) pid_temp = HEATER_0_MINTEMP; if (pid_temp > HEATER_0_MAXTEMP) pid_temp = HEATER_0_MAXTEMP;
encoderPosition = 0; if (pid_temp < HEATER_0_MINTEMP) pid_temp = HEATER_0_MINTEMP;
lcd.setCursor(1, 2); encoderPosition = 0;
lcd.print(ftostr3(pid_temp)); lcd.setCursor(1, 2);
lcd.print(ftostr3(pid_temp));
lcdDrawUpdate = 1;
}
if (lcd_clicked()) { if (lcd_clicked()) {
lcd_commands_type = LCD_COMMAND_PID_EXTRUDER; lcd_commands_type = LCD_COMMAND_PID_EXTRUDER;
lcd_return_to_status(); lcd_return_to_status();