From 91b2439f3a823c118bbba946cfd5c8c8e9756fcf Mon Sep 17 00:00:00 2001 From: Marcio Teixeira Date: Mon, 5 Mar 2018 13:31:08 -0700 Subject: [PATCH] Fixed disappearing degree mark in Hibiscus UI. --- Marlin/Conditionals_LulzBot.h | 2 +- Marlin/status_screen_lite_ST7920.h | 18 +++++++++--------- Marlin/status_screen_lite_ST7920_class.h | 6 +++--- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Marlin/Conditionals_LulzBot.h b/Marlin/Conditionals_LulzBot.h index 57cbd2feb..a24f57c3a 100644 --- a/Marlin/Conditionals_LulzBot.h +++ b/Marlin/Conditionals_LulzBot.h @@ -13,7 +13,7 @@ * got disabled. */ -#define LULZBOT_FW_VERSION ".12" // Change this with each update +#define LULZBOT_FW_VERSION ".13" // Change this with each update #if ( \ !defined(LULZBOT_Gladiola_Mini) && \ diff --git a/Marlin/status_screen_lite_ST7920.h b/Marlin/status_screen_lite_ST7920.h index 0356b8e26..64c8544d9 100644 --- a/Marlin/status_screen_lite_ST7920.h +++ b/Marlin/status_screen_lite_ST7920.h @@ -555,21 +555,21 @@ void ST7920_Lite_Status_Screen::draw_temps(uint8_t line, const int16_t temp, con } } -void ST7920_Lite_Status_Screen::draw_extruder_1_temp(const int16_t temp, const int16_t target) { +void ST7920_Lite_Status_Screen::draw_extruder_1_temp(const int16_t temp, const int16_t target, bool forceUpdate) { const bool show_target = target && FAR(temp, target); - draw_temps(1, temp, target, show_target, display_state.E1_show_target != show_target); + draw_temps(1, temp, target, show_target, display_state.E1_show_target != show_target || forceUpdate); display_state.E1_show_target = show_target; } -void ST7920_Lite_Status_Screen::draw_extruder_2_temp(const int16_t temp, const int16_t target) { +void ST7920_Lite_Status_Screen::draw_extruder_2_temp(const int16_t temp, const int16_t target, bool forceUpdate) { const bool show_target = target && FAR(temp, target); - draw_temps(2, temp, target, show_target, display_state.E2_show_target != show_target); + draw_temps(2, temp, target, show_target, display_state.E2_show_target != show_target || forceUpdate); display_state.E2_show_target = show_target; } -void ST7920_Lite_Status_Screen::draw_bed_temp(const int16_t temp, const int16_t target) { +void ST7920_Lite_Status_Screen::draw_bed_temp(const int16_t temp, const int16_t target, bool forceUpdate) { const bool show_target = target && FAR(temp, target); draw_temps( @@ -578,7 +578,7 @@ void ST7920_Lite_Status_Screen::draw_bed_temp(const int16_t temp, const int16_t #else 3, #endif - temp, target, show_target, display_state.bed_show_target != show_target); + temp, target, show_target, display_state.bed_show_target != show_target || forceUpdate); display_state.bed_show_target = show_target; } @@ -720,11 +720,11 @@ void ST7920_Lite_Status_Screen::update_indicators(const bool forceUpdate) { const float bed_temp = thermalManager.degBed(); const float bed_target = thermalManager.degTargetBed(); - draw_extruder_1_temp(extruder_1_temp, extruder_1_target); + draw_extruder_1_temp(extruder_1_temp, extruder_1_target, forceUpdate); #if EXTRUDERS == 2 - draw_extruder_2_temp(extruder_2_temp, extruder_2_target); + draw_extruder_2_temp(extruder_2_temp, extruder_2_target, forceUpdate); #endif - draw_bed_temp(bed_temp, bed_target); + draw_bed_temp(bed_temp, bed_target, forceUpdate); draw_fan_speed(fan_speed); draw_print_time(seconds_elapsed); draw_feedrate_percentage(feedrate_perc); diff --git a/Marlin/status_screen_lite_ST7920_class.h b/Marlin/status_screen_lite_ST7920_class.h index 04e62743f..5790a5c72 100644 --- a/Marlin/status_screen_lite_ST7920_class.h +++ b/Marlin/status_screen_lite_ST7920_class.h @@ -81,9 +81,9 @@ class ST7920_Lite_Status_Screen { static void draw_fan_icon(const bool whichIcon); static void draw_heat_icon(const bool whichIcon, const bool heating); static void draw_temps(uint8_t line, const int16_t temp, const int16_t target, bool showTarget, bool targetStateChange); - static void draw_extruder_1_temp(const int16_t temp, const int16_t target); - static void draw_extruder_2_temp(const int16_t temp, const int16_t target); - static void draw_bed_temp(const int16_t temp, const int16_t target); + static void draw_extruder_1_temp(const int16_t temp, const int16_t target, bool forceUpdate = false); + static void draw_extruder_2_temp(const int16_t temp, const int16_t target, bool forceUpdate = false); + static void draw_bed_temp(const int16_t temp, const int16_t target, bool forceUpdate = false); static void draw_fan_speed(const uint8_t value); static void draw_print_time(const uint32_t elapsed); static void draw_feedrate_percentage(const uint8_t percentage);