Reduce unnecessary LCD CGRAM writes
This commit is contained in:
parent
400f673fe0
commit
6afc87d3c8
|
|
@ -644,8 +644,6 @@ uint8_t lcd_status_update_delay = 0;
|
|||
|
||||
lcd_longpress_func_t lcd_longpress_func = 0;
|
||||
|
||||
lcd_charsetup_func_t lcd_charsetup_func = 0;
|
||||
|
||||
lcd_lcdupdate_func_t lcd_lcdupdate_func = 0;
|
||||
|
||||
static ShortTimer buttonBlanking;
|
||||
|
|
@ -718,8 +716,6 @@ void lcd_update_enable(uint8_t enabled)
|
|||
lcd_next_update_millis = _millis() - 1;
|
||||
// Full update.
|
||||
lcd_clear();
|
||||
if (lcd_charsetup_func)
|
||||
lcd_charsetup_func();
|
||||
lcd_update(2);
|
||||
} else
|
||||
{
|
||||
|
|
@ -924,28 +920,6 @@ const uint8_t lcd_chardata_clock[8] PROGMEM = {
|
|||
B00000,
|
||||
B00000}; //thanks Sonny Mounicou
|
||||
|
||||
const uint8_t lcd_chardata_arrup[8] PROGMEM = {
|
||||
B00100,
|
||||
B01110,
|
||||
B11111,
|
||||
B00000,
|
||||
B00000,
|
||||
B00000,
|
||||
B00000,
|
||||
B00000};
|
||||
|
||||
const uint8_t lcd_chardata_arrdown[8] PROGMEM = {
|
||||
B00000,
|
||||
B00000,
|
||||
B00000,
|
||||
B00000,
|
||||
B00000,
|
||||
B10001,
|
||||
B01010,
|
||||
B00100};
|
||||
|
||||
|
||||
|
||||
void lcd_set_custom_characters(void)
|
||||
{
|
||||
lcd_createChar_P(LCD_STR_BEDTEMP[0], lcd_chardata_bedTemp);
|
||||
|
|
@ -956,13 +930,6 @@ void lcd_set_custom_characters(void)
|
|||
lcd_createChar_P(LCD_STR_FOLDER[0], lcd_chardata_folder);
|
||||
lcd_createChar_P(LCD_STR_FEEDRATE[0], lcd_chardata_feedrate);
|
||||
lcd_createChar_P(LCD_STR_CLOCK[0], lcd_chardata_clock);
|
||||
//lcd_createChar_P(LCD_STR_ARROW_UP[0], lcd_chardata_arrup);
|
||||
//lcd_createChar_P(LCD_STR_ARROW_DOWN[0], lcd_chardata_arrdown);
|
||||
}
|
||||
|
||||
void lcd_set_custom_characters_arrows(void)
|
||||
{
|
||||
lcd_createChar_P(1, lcd_chardata_arrdown);
|
||||
}
|
||||
|
||||
const uint8_t lcd_chardata_arr2down[8] PROGMEM = {
|
||||
|
|
@ -990,8 +957,3 @@ void lcd_set_custom_characters_nextpage(void)
|
|||
lcd_createChar_P(2, lcd_chardata_confirm);
|
||||
}
|
||||
|
||||
void lcd_set_custom_characters_degree(void)
|
||||
{
|
||||
lcd_createChar_P(1, lcd_chardata_degree);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -112,8 +112,6 @@ extern uint8_t lcd_status_update_delay;
|
|||
extern lcd_longpress_func_t lcd_longpress_func;
|
||||
extern bool lcd_longpress_trigger;
|
||||
|
||||
extern lcd_charsetup_func_t lcd_charsetup_func;
|
||||
|
||||
extern lcd_lcdupdate_func_t lcd_lcdupdate_func;
|
||||
|
||||
|
||||
|
|
@ -199,14 +197,10 @@ private:
|
|||
#define LCD_STR_FOLDER "\x05"
|
||||
#define LCD_STR_FEEDRATE "\x06"
|
||||
#define LCD_STR_CLOCK "\x07"
|
||||
#define LCD_STR_ARROW_UP "\x0B"
|
||||
#define LCD_STR_ARROW_DOWN "\x01"
|
||||
#define LCD_STR_ARROW_RIGHT "\x7E" //from the default character set
|
||||
|
||||
extern void lcd_set_custom_characters(void);
|
||||
extern void lcd_set_custom_characters_arrows(void);
|
||||
extern void lcd_set_custom_characters_nextpage(void);
|
||||
extern void lcd_set_custom_characters_degree(void);
|
||||
|
||||
//! @brief Consume click event
|
||||
inline void lcd_consume_click()
|
||||
|
|
|
|||
|
|
@ -728,9 +728,6 @@ void manage_response(bool move_axes, bool turn_off_nozzle, uint8_t move)
|
|||
screen=0;
|
||||
}
|
||||
|
||||
lcd_set_degree();
|
||||
|
||||
|
||||
//5 seconds delay
|
||||
for (uint8_t i = 0; i < 5; i++) {
|
||||
if (lcd_clicked()) {
|
||||
|
|
|
|||
|
|
@ -3232,7 +3232,6 @@ void lcd_adjust_z() {
|
|||
|
||||
#ifdef PINDA_THERMISTOR
|
||||
bool lcd_wait_for_pinda(float temp) {
|
||||
lcd_set_custom_characters_degree();
|
||||
setAllTargetHotends(0);
|
||||
setTargetBed(0);
|
||||
LongTimer pinda_timeout;
|
||||
|
|
@ -3255,7 +3254,6 @@ bool lcd_wait_for_pinda(float temp) {
|
|||
break;
|
||||
}
|
||||
}
|
||||
lcd_set_custom_characters_arrows();
|
||||
lcd_update_enable(true);
|
||||
return target_temp_reached;
|
||||
}
|
||||
|
|
@ -3263,7 +3261,6 @@ bool lcd_wait_for_pinda(float temp) {
|
|||
|
||||
void lcd_wait_for_heater() {
|
||||
lcd_display_message_fullscreen_P(_T(MSG_WIZARD_HEATING));
|
||||
lcd_set_degree();
|
||||
lcd_set_cursor(0, 4);
|
||||
lcd_print(LCD_STR_THERMOMETER[0]);
|
||||
lcd_print(ftostr3(degHotend(active_extruder)));
|
||||
|
|
@ -3273,7 +3270,6 @@ void lcd_wait_for_heater() {
|
|||
}
|
||||
|
||||
void lcd_wait_for_cool_down() {
|
||||
lcd_set_custom_characters_degree();
|
||||
setAllTargetHotends(0);
|
||||
setTargetBed(0);
|
||||
int fanSpeedBckp = fanSpeed;
|
||||
|
|
@ -3292,12 +3288,10 @@ void lcd_wait_for_cool_down() {
|
|||
lcd_print(ftostr3(degBed()));
|
||||
lcd_print("/0");
|
||||
lcd_print(LCD_STR_DEGREE);
|
||||
lcd_set_custom_characters();
|
||||
delay_keep_alive(1000);
|
||||
serialecho_temperatures();
|
||||
}
|
||||
fanSpeed = fanSpeedBckp;
|
||||
lcd_set_custom_characters_arrows();
|
||||
lcd_update_enable(true);
|
||||
}
|
||||
|
||||
|
|
@ -3440,7 +3434,6 @@ static const char* lcd_display_message_fullscreen_nonBlocking_P(const char *msg,
|
|||
|
||||
if (multi_screen) {
|
||||
// Display the "next screen" indicator character.
|
||||
// lcd_set_custom_characters_arrows();
|
||||
lcd_set_custom_characters_nextpage();
|
||||
lcd_set_cursor(19, 3);
|
||||
// Display the down arrow.
|
||||
|
|
@ -4421,10 +4414,6 @@ static void lcd_fsensor_state_set()
|
|||
}
|
||||
#endif //FILAMENT_SENSOR
|
||||
|
||||
void lcd_set_degree() {
|
||||
lcd_set_custom_characters_degree();
|
||||
}
|
||||
|
||||
#if (LANG_MODE != 0)
|
||||
|
||||
void menu_setlang(unsigned char lang)
|
||||
|
|
@ -4793,7 +4782,6 @@ static void wait_preheat()
|
|||
plan_buffer_line_curposXYZE(homing_feedrate[Z_AXIS] / 60);
|
||||
delay_keep_alive(2000);
|
||||
lcd_display_message_fullscreen_P(_T(MSG_WIZARD_HEATING));
|
||||
lcd_set_custom_characters();
|
||||
while (fabs(degHotend(0) - degTargetHotend(0)) > 3) {
|
||||
lcd_display_message_fullscreen_P(_T(MSG_WIZARD_HEATING));
|
||||
|
||||
|
|
@ -8596,10 +8584,8 @@ void ultralcd_init()
|
|||
lcd_init();
|
||||
lcd_refresh();
|
||||
lcd_longpress_func = menu_lcd_longpress_func;
|
||||
lcd_charsetup_func = menu_lcd_charsetup_func;
|
||||
lcd_lcdupdate_func = menu_lcd_lcdupdate_func;
|
||||
menu_menu = lcd_status_screen;
|
||||
menu_lcd_charsetup_func();
|
||||
|
||||
SET_INPUT(BTN_EN1);
|
||||
SET_INPUT(BTN_EN2);
|
||||
|
|
@ -8812,14 +8798,6 @@ void menu_lcd_longpress_func(void)
|
|||
}
|
||||
}
|
||||
|
||||
void menu_lcd_charsetup_func(void)
|
||||
{
|
||||
if (menu_menu == lcd_status_screen)
|
||||
lcd_set_custom_characters_degree();
|
||||
else
|
||||
lcd_set_custom_characters_arrows();
|
||||
}
|
||||
|
||||
static inline bool z_menu_expired()
|
||||
{
|
||||
return (menu_menu == lcd_babystep_z
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
#include "config.h"
|
||||
|
||||
extern void menu_lcd_longpress_func(void);
|
||||
extern void menu_lcd_charsetup_func(void);
|
||||
extern void menu_lcd_lcdupdate_func(void);
|
||||
|
||||
// Call with a false parameter to suppress the LCD update from various places like the planner or the temp control.
|
||||
|
|
@ -219,8 +218,6 @@ void lcd_temp_calibration_set();
|
|||
|
||||
void display_loading();
|
||||
|
||||
void lcd_set_degree();
|
||||
|
||||
#if (LANG_MODE != 0)
|
||||
void lcd_language();
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue