#ifndef ULTRALCD_H #define ULTRALCD_H #include "Marlin.h" #include "mesh_bed_calibration.h" #ifdef ULTRA_LCD void lcd_update(uint8_t lcdDrawUpdateOverride = 0); // Call with a false parameter to suppress the LCD update from various places like the planner or the temp control. void lcd_update_enable(bool enable); void lcd_init(); void lcd_setstatus(const char* message); void lcd_setstatuspgm(const char* message); void lcd_setalertstatuspgm(const char* message); void lcd_reset_alert_level(); void lcd_adjust_z(); void lcd_pick_babystep(); void lcd_alright(); void EEPROM_save_B(int pos, int* value); void EEPROM_read_B(int pos, int* value); void lcd_wait_interact(); void lcd_change_filament(); void lcd_loading_filament(); void lcd_change_success(); void lcd_loading_color(); void lcd_force_language_selection(); void lcd_sdcard_stop(); void prusa_statistics(int _message); void lcd_confirm_print(); void lcd_mylang(); bool lcd_detected(void); static void lcd_selftest(); static bool lcd_selfcheck_endstops(); static bool lcd_selfcheck_axis(int _axis, int _travel); static bool lcd_selfcheck_check_heater(bool _isbed); static int lcd_selftest_screen(int _step, int _progress, int _progress_scale, bool _clear, int _delay); static void lcd_selftest_screen_step(int _row, int _col, int _state, const char *_name, const char *_indicator); static bool lcd_selftest_fan_dialog(int _fan); static void lcd_selftest_error(int _error_no, const char *_error_1, const char *_error_2); void lcd_menu_statistics(); static bool lcd_selfcheck_pulleys(int axis); extern const char* lcd_display_message_fullscreen_P(const char *msg, uint8_t &nlines); inline const char* lcd_display_message_fullscreen_P(const char *msg) { uint8_t nlines; return lcd_display_message_fullscreen_P(msg, nlines); } extern void lcd_wait_for_click(); extern void lcd_show_fullscreen_message_and_wait_P(const char *msg); // 0: no, 1: yes, -1: timeouted extern int8_t lcd_show_fullscreen_message_yes_no_and_wait_P(const char *msg, bool allow_timeouting = true, bool default_yes = false); // Ask the user to move the Z axis up to the end stoppers and let // the user confirm that it has been done. extern bool lcd_calibrate_z_end_stop_manual(bool only_z); // Show the result of the calibration process on the LCD screen. extern void lcd_bed_calibration_show_result(BedSkewOffsetDetectionResultType result, uint8_t point_too_far_mask); extern void lcd_diag_show_end_stops(); #ifdef DOGLCD extern int lcd_contrast; void lcd_setcontrast(uint8_t value); #endif static unsigned char blink = 0; // Variable for visualization of fan rotation in GLCD #define LCD_MESSAGEPGM(x) lcd_setstatuspgm(PSTR(x)) #define LCD_ALERTMESSAGEPGM(x) lcd_setalertstatuspgm(PSTR(x)) #define LCD_MESSAGERPGM(x) lcd_setstatuspgm((x)) #define LCD_ALERTMESSAGERPGM(x) lcd_setalertstatuspgm((x)) #define LCD_UPDATE_INTERVAL 100 #define LCD_TIMEOUT_TO_STATUS 15000 #ifdef ULTIPANEL void lcd_buttons_update(); extern volatile uint8_t buttons; //the last checked buttons in a bit array. #ifdef REPRAPWORLD_KEYPAD extern volatile uint8_t buttons_reprapworld_keypad; // to store the keypad shift register values #endif #else FORCE_INLINE void lcd_buttons_update() {} #endif // To be used in lcd_commands_type. #define LCD_COMMAND_IDLE 0 #define LCD_COMMAND_LOAD_FILAMENT 1 #define LCD_COMMAND_STOP_PRINT 2 #define LCD_COMMAND_FARM_MODE_CONFIRM 4 extern unsigned long lcd_timeoutToStatus; extern int lcd_commands_type; extern bool farm_mode; extern int farm_no; extern int farm_timer; extern int farm_status; extern bool cancel_heatup; #ifdef FILAMENT_LCD_DISPLAY extern unsigned long message_millis; #endif void lcd_buzz(long duration,uint16_t freq); bool lcd_clicked(); void lcd_ignore_click(bool b=true); void lcd_commands(); #ifdef NEWPANEL #define EN_C (1<