Try to minimize auto screen clear/redraws
Re-enable M851 to use for adjusting Live-Z offset
This commit is contained in:
parent
bbf13db82a
commit
305d9d8dad
|
|
@ -467,7 +467,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of
|
|||
//===========================================================================
|
||||
|
||||
// Custom M code points
|
||||
//#define CUSTOM_M_CODES
|
||||
#define CUSTOM_M_CODES
|
||||
#ifdef CUSTOM_M_CODES
|
||||
#define CUSTOM_M_CODE_SET_Z_PROBE_OFFSET 851
|
||||
#define Z_PROBE_OFFSET_RANGE_MIN -15
|
||||
|
|
|
|||
|
|
@ -116,8 +116,6 @@ union Data
|
|||
int value;
|
||||
};
|
||||
|
||||
int8_t ReInitLCD = 0;
|
||||
|
||||
int8_t SDscrool = 0;
|
||||
|
||||
int8_t SilentModeMenu = 0;
|
||||
|
|
@ -450,19 +448,9 @@ static void lcd_status_screen()
|
|||
lcdDrawUpdate = 1;
|
||||
if (lcdDrawUpdate)
|
||||
{
|
||||
ReInitLCD++;
|
||||
// ***Note: Removed lcd reinit from here
|
||||
|
||||
// Re-init lcd every 30 re-draw updates (Why? Are things this un-reliable?)
|
||||
if (ReInitLCD == 30) {
|
||||
lcd_implementation_init( // to maybe revive the LCD if static electricity killed it.
|
||||
#if defined(LCD_PROGRESS_BAR) && defined(SDSUPPORT)
|
||||
currentMenu == lcd_status_screen
|
||||
#endif
|
||||
);
|
||||
ReInitLCD = 0 ;
|
||||
}
|
||||
|
||||
lcd_implementation_status_screen();
|
||||
lcd_implementation_status_screen();
|
||||
|
||||
if (farm_mode)
|
||||
{
|
||||
|
|
@ -6146,29 +6134,34 @@ void lcd_update(uint8_t lcdDrawUpdateOverride)
|
|||
#endif
|
||||
|
||||
#ifdef ULTIPANEL
|
||||
if (lcd_timeoutToStatus < millis() && currentMenu != lcd_status_screen)
|
||||
{
|
||||
// Exiting a menu. Let's call the menu function the last time with menuExiting flag set to true
|
||||
// to give it a chance to save its state.
|
||||
// This is useful for example, when the babystep value has to be written into EEPROM.
|
||||
if (currentMenu != NULL) {
|
||||
menuExiting = true;
|
||||
(*currentMenu)();
|
||||
menuExiting = false;
|
||||
}
|
||||
lcd_implementation_clear();
|
||||
lcd_return_to_status();
|
||||
lcdDrawUpdate = 2;
|
||||
}
|
||||
if (lcd_timeoutToStatus < millis() && currentMenu != lcd_status_screen)
|
||||
{
|
||||
// Exiting a menu. Let's call the menu function the last time with menuExiting flag set to true
|
||||
// to give it a chance to save its state.
|
||||
// This is useful for example, when the babystep value has to be written into EEPROM.
|
||||
if (currentMenu != NULL) {
|
||||
menuExiting = true;
|
||||
(*currentMenu)();
|
||||
menuExiting = false;
|
||||
}
|
||||
|
||||
lcd_return_to_status();
|
||||
lcdDrawUpdate = 2;
|
||||
}
|
||||
#endif//ULTIPANEL
|
||||
if (lcdDrawUpdate == 2) lcd_implementation_clear();
|
||||
if (lcdDrawUpdate) lcdDrawUpdate--;
|
||||
lcd_next_update_millis = millis() + LCD_UPDATE_INTERVAL;
|
||||
}
|
||||
if (!SdFatUtil::test_stack_integrity()) stack_error();
|
||||
lcd_ping(); //check that we have received ping command if we are in farm mode
|
||||
lcd_send_status();
|
||||
if (lcd_commands_type == LCD_COMMAND_V2_CAL) lcd_commands();
|
||||
if (lcdDrawUpdate == 2) lcd_implementation_clear();
|
||||
if (lcdDrawUpdate) lcdDrawUpdate--;
|
||||
lcd_next_update_millis = millis() + LCD_UPDATE_INTERVAL;
|
||||
}
|
||||
|
||||
if (!SdFatUtil::test_stack_integrity())
|
||||
stack_error();
|
||||
|
||||
lcd_ping(); //check that we have received ping command if we are in farm mode
|
||||
lcd_send_status();
|
||||
|
||||
if (lcd_commands_type == LCD_COMMAND_V2_CAL)
|
||||
lcd_commands();
|
||||
}
|
||||
|
||||
void lcd_printer_connected() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue