2016-07-22 13:28:01 +00:00
|
|
|
#ifndef ULTRALCD_H
|
|
|
|
#define ULTRALCD_H
|
|
|
|
|
|
|
|
#include "Marlin.h"
|
|
|
|
#include "mesh_bed_calibration.h"
|
|
|
|
|
2018-06-10 20:06:00 +00:00
|
|
|
extern int lcd_puts_P(const char* str);
|
|
|
|
extern int lcd_printf_P(const char* format, ...);
|
|
|
|
|
2018-07-16 00:13:52 +00:00
|
|
|
extern void menu_lcd_longpress_func(void);
|
|
|
|
extern void menu_lcd_charsetup_func(void);
|
|
|
|
extern void menu_lcd_lcdupdate_func(void);
|
2016-07-22 13:28:01 +00:00
|
|
|
|
2018-06-10 14:04:32 +00:00
|
|
|
static void lcd_language_menu();
|
|
|
|
|
2016-07-22 13:28:01 +00:00
|
|
|
// Call with a false parameter to suppress the LCD update from various places like the planner or the temp control.
|
|
|
|
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();
|
2017-09-22 18:43:30 +00:00
|
|
|
uint8_t get_message_level();
|
2016-07-22 13:28:01 +00:00
|
|
|
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_sdcard_stop();
|
2017-09-22 16:22:21 +00:00
|
|
|
void lcd_sdcard_pause();
|
|
|
|
void lcd_print_stop();
|
2017-07-21 18:17:00 +00:00
|
|
|
void prusa_statistics(int _message, uint8_t _col_nr = 0);
|
2016-07-22 13:28:01 +00:00
|
|
|
void lcd_confirm_print();
|
2017-07-21 18:17:00 +00:00
|
|
|
unsigned char lcd_choose_color();
|
2018-06-07 22:20:28 +00:00
|
|
|
//void lcd_mylang();
|
2016-07-22 13:28:01 +00:00
|
|
|
|
2017-11-15 15:40:35 +00:00
|
|
|
static void lcd_selftest_v();
|
2018-02-27 16:52:13 +00:00
|
|
|
extern bool lcd_selftest();
|
2016-07-22 13:28:01 +00:00
|
|
|
static bool lcd_selfcheck_endstops();
|
2017-11-16 17:02:11 +00:00
|
|
|
|
|
|
|
#ifdef TMC2130
|
|
|
|
static void reset_crash_det(char axis);
|
2017-07-06 11:19:11 +00:00
|
|
|
static bool lcd_selfcheck_axis_sg(char axis);
|
2017-11-16 17:02:11 +00:00
|
|
|
static bool lcd_selfcheck_axis(int _axis, int _travel);
|
2018-02-06 16:01:09 +00:00
|
|
|
#else
|
|
|
|
static bool lcd_selfcheck_endstops();
|
2017-11-16 17:02:11 +00:00
|
|
|
static bool lcd_selfcheck_axis(int _axis, int _travel);
|
2018-02-06 16:01:09 +00:00
|
|
|
static bool lcd_selfcheck_pulleys(int axis);
|
|
|
|
#endif //TMC2130
|
|
|
|
|
2016-07-22 13:28:01 +00:00
|
|
|
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);
|
2018-02-06 16:01:09 +00:00
|
|
|
static bool lcd_selftest_manual_fan_check(int _fan, bool check_opposite);
|
2017-03-24 18:47:50 +00:00
|
|
|
static bool lcd_selftest_fan_dialog(int _fan);
|
2017-12-20 22:40:18 +00:00
|
|
|
static bool lcd_selftest_fsensor();
|
2016-07-22 13:28:01 +00:00
|
|
|
static void lcd_selftest_error(int _error_no, const char *_error_1, const char *_error_2);
|
2018-02-06 16:01:09 +00:00
|
|
|
void lcd_menu_statistics();
|
2016-07-22 13:28:01 +00:00
|
|
|
|
2016-09-01 08:44:24 +00:00
|
|
|
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); }
|
|
|
|
|
2016-07-22 13:28:01 +00:00
|
|
|
extern void lcd_wait_for_click();
|
|
|
|
extern void lcd_show_fullscreen_message_and_wait_P(const char *msg);
|
|
|
|
// 0: no, 1: yes, -1: timeouted
|
2017-03-24 18:47:50 +00:00
|
|
|
extern int8_t lcd_show_fullscreen_message_yes_no_and_wait_P(const char *msg, bool allow_timeouting = true, bool default_yes = false);
|
2017-11-07 15:49:04 +00:00
|
|
|
extern int8_t lcd_show_multiscreen_message_yes_no_and_wait_P(const char *msg, bool allow_timeouting = true, bool default_yes = false);
|
2016-07-22 13:28:01 +00:00
|
|
|
// Ask the user to move the Z axis up to the end stoppers and let
|
|
|
|
// the user confirm that it has been done.
|
2017-11-12 10:30:06 +00:00
|
|
|
#ifndef TMC2130
|
2016-08-11 08:42:53 +00:00
|
|
|
extern bool lcd_calibrate_z_end_stop_manual(bool only_z);
|
2017-11-12 10:30:06 +00:00
|
|
|
#endif
|
2016-07-22 13:28:01 +00:00
|
|
|
// 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();
|
|
|
|
|
|
|
|
|
|
|
|
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))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-08-11 08:42:53 +00:00
|
|
|
// 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
|
2017-06-29 16:35:43 +00:00
|
|
|
#define LCD_COMMAND_LONG_PAUSE 5
|
|
|
|
#define LCD_COMMAND_LONG_PAUSE_RESUME 6
|
|
|
|
#define LCD_COMMAND_PID_EXTRUDER 7
|
2017-11-07 15:49:04 +00:00
|
|
|
#define LCD_COMMAND_V2_CAL 8
|
2016-08-11 08:42:53 +00:00
|
|
|
|
2017-03-24 18:47:50 +00:00
|
|
|
extern unsigned long lcd_timeoutToStatus;
|
2016-08-11 08:42:53 +00:00
|
|
|
extern int lcd_commands_type;
|
2016-07-22 13:28:01 +00:00
|
|
|
|
2017-03-24 18:47:50 +00:00
|
|
|
extern uint8_t farm_mode;
|
2016-07-22 13:28:01 +00:00
|
|
|
extern int farm_no;
|
|
|
|
extern int farm_timer;
|
|
|
|
extern int farm_status;
|
2018-04-25 18:47:19 +00:00
|
|
|
#ifdef TMC2130
|
|
|
|
#define SILENT_MODE_NORMAL 0
|
|
|
|
#define SILENT_MODE_STEALTH 1
|
|
|
|
#define SILENT_MODE_OFF SILENT_MODE_NORMAL
|
|
|
|
#else
|
|
|
|
#define SILENT_MODE_POWER 0
|
|
|
|
#define SILENT_MODE_SILENT 1
|
|
|
|
#define SILENT_MODE_AUTO 2
|
|
|
|
#define SILENT_MODE_OFF SILENT_MODE_POWER
|
|
|
|
#endif
|
2018-03-06 14:11:50 +00:00
|
|
|
extern int8_t SilentModeMenu;
|
2016-07-22 13:28:01 +00:00
|
|
|
|
2017-06-29 16:35:43 +00:00
|
|
|
#ifdef SNMM
|
|
|
|
extern uint8_t snmm_extruder;
|
|
|
|
#endif // SNMM
|
|
|
|
|
2016-07-22 13:28:01 +00:00
|
|
|
extern bool cancel_heatup;
|
2017-06-29 16:35:43 +00:00
|
|
|
extern bool isPrintPaused;
|
2018-07-15 16:37:59 +00:00
|
|
|
|
2016-07-22 13:28:01 +00:00
|
|
|
|
|
|
|
void lcd_ignore_click(bool b=true);
|
|
|
|
void lcd_commands();
|
|
|
|
|
|
|
|
|
|
|
|
char *itostr2(const uint8_t &x);
|
|
|
|
char *itostr31(const int &xx);
|
|
|
|
char *itostr3(const int &xx);
|
|
|
|
char *itostr3left(const int &xx);
|
|
|
|
char *itostr4(const int &xx);
|
|
|
|
|
|
|
|
char *ftostr3(const float &x);
|
|
|
|
char *ftostr31ns(const float &x); // float to string without sign character
|
|
|
|
char *ftostr31(const float &x);
|
|
|
|
char *ftostr32(const float &x);
|
|
|
|
char *ftostr32ns(const float &x);
|
2018-03-28 16:53:37 +00:00
|
|
|
char *ftostr43(const float &x, uint8_t offset = 0);
|
2016-07-22 13:28:01 +00:00
|
|
|
char *ftostr12ns(const float &x);
|
|
|
|
char *ftostr13ns(const float &x);
|
|
|
|
char *ftostr32sp(const float &x); // remove zero-padding from ftostr32
|
|
|
|
char *ftostr5(const float &x);
|
|
|
|
char *ftostr51(const float &x);
|
|
|
|
char *ftostr52(const float &x);
|
|
|
|
|
|
|
|
|
|
|
|
extern void lcd_implementation_clear();
|
|
|
|
extern void lcd_printPGM(const char* str);
|
|
|
|
extern void lcd_print_at_PGM(uint8_t x, uint8_t y, const char* str);
|
2018-07-16 02:13:26 +00:00
|
|
|
extern void lcd_print(const char *str);
|
|
|
|
extern void lcd_print(int8_t i);
|
|
|
|
extern void lcd_print_at(uint8_t x, uint8_t y, int8_t i);
|
|
|
|
extern void lcd_print(int i);
|
|
|
|
extern void lcd_print_at(uint8_t x, uint8_t y, int i);
|
|
|
|
extern void lcd_print(float f);
|
|
|
|
extern void lcd_print_at(uint8_t x, uint8_t y, const char *str);
|
2016-07-22 13:28:01 +00:00
|
|
|
|
2017-03-24 18:47:50 +00:00
|
|
|
|
|
|
|
void change_extr(int extr);
|
2017-06-29 16:35:43 +00:00
|
|
|
static void lcd_colorprint_change();
|
2017-03-24 18:47:50 +00:00
|
|
|
static int get_ext_nr();
|
2018-04-25 18:47:19 +00:00
|
|
|
void extr_adj(int extruder);
|
2017-03-24 18:47:50 +00:00
|
|
|
static void extr_adj_0();
|
|
|
|
static void extr_adj_1();
|
|
|
|
static void extr_adj_2();
|
|
|
|
static void extr_adj_3();
|
|
|
|
static void fil_load_menu();
|
|
|
|
static void fil_unload_menu();
|
|
|
|
static void extr_unload_0();
|
|
|
|
static void extr_unload_1();
|
|
|
|
static void extr_unload_2();
|
|
|
|
static void extr_unload_3();
|
|
|
|
static void lcd_disable_farm_mode();
|
2017-09-21 13:20:02 +00:00
|
|
|
static void lcd_set_fan_check();
|
2017-06-29 16:35:43 +00:00
|
|
|
void extr_unload_all();
|
|
|
|
void extr_unload_used();
|
|
|
|
void extr_unload();
|
|
|
|
static char snmm_stop_print_menu();
|
2017-12-10 10:08:50 +00:00
|
|
|
#ifdef SDCARD_SORT_ALPHA
|
|
|
|
static void lcd_sort_type_set();
|
|
|
|
#endif
|
2017-11-07 15:49:04 +00:00
|
|
|
static float count_e(float layer_heigth, float extrusion_width, float extrusion_length);
|
|
|
|
static void lcd_babystep_z();
|
2017-03-24 18:47:50 +00:00
|
|
|
|
|
|
|
void stack_error();
|
|
|
|
void lcd_printer_connected();
|
|
|
|
void lcd_ping();
|
|
|
|
|
|
|
|
void lcd_calibrate_extruder();
|
|
|
|
void lcd_farm_sdcard_menu();
|
|
|
|
|
|
|
|
//void getFileDescription(char *name, char *description);
|
|
|
|
|
|
|
|
void lcd_farm_sdcard_menu_w();
|
|
|
|
//void get_description();
|
|
|
|
|
2018-01-15 10:30:28 +00:00
|
|
|
void lcd_wait_for_heater();
|
2017-12-14 18:36:32 +00:00
|
|
|
void lcd_wait_for_cool_down();
|
2017-03-24 18:47:50 +00:00
|
|
|
void adjust_bed_reset();
|
|
|
|
void lcd_extr_cal_reset();
|
|
|
|
|
2018-04-24 11:43:51 +00:00
|
|
|
void lcd_temp_cal_show_result(bool result);
|
|
|
|
bool lcd_wait_for_pinda(float temp);
|
|
|
|
|
|
|
|
|
2017-03-24 18:47:50 +00:00
|
|
|
union MenuData;
|
|
|
|
|
2017-06-29 16:35:43 +00:00
|
|
|
void bowden_menu();
|
2017-03-24 18:47:50 +00:00
|
|
|
char reset_menu();
|
2017-06-29 16:35:43 +00:00
|
|
|
char choose_extruder_menu();
|
|
|
|
|
|
|
|
void lcd_pinda_calibration_menu();
|
|
|
|
void lcd_calibrate_pinda();
|
|
|
|
void lcd_temp_calibration_set();
|
|
|
|
|
|
|
|
void display_loading();
|
|
|
|
|
2017-12-10 10:08:50 +00:00
|
|
|
#if !SDSORT_USES_RAM
|
2017-12-11 10:30:49 +00:00
|
|
|
void lcd_set_degree();
|
2017-12-10 10:08:50 +00:00
|
|
|
void lcd_set_progress();
|
|
|
|
#endif
|
|
|
|
|
2018-06-10 14:04:32 +00:00
|
|
|
void lcd_language();
|
|
|
|
|
2017-11-07 15:49:04 +00:00
|
|
|
void lcd_wizard();
|
|
|
|
void lcd_wizard(int state);
|
|
|
|
|
2017-08-29 13:52:53 +00:00
|
|
|
static void lcd_send_status();
|
|
|
|
static void lcd_connect_printer();
|
|
|
|
|
2018-03-28 16:53:37 +00:00
|
|
|
#endif //ULTRALCD_H
|