ultralcd.h 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. #ifndef ULTRALCD_H
  2. #define ULTRALCD_H
  3. #include "Marlin.h"
  4. #include "lcd.h"
  5. #include "conv2str.h"
  6. extern int lcd_puts_P(const char* str);
  7. extern int lcd_printf_P(const char* format, ...);
  8. extern void menu_lcd_longpress_func(void);
  9. extern void menu_lcd_charsetup_func(void);
  10. extern void menu_lcd_lcdupdate_func(void);
  11. // Call with a false parameter to suppress the LCD update from various places like the planner or the temp control.
  12. void ultralcd_init();
  13. void lcd_setstatus(const char* message);
  14. void lcd_setstatuspgm(const char* message);
  15. void lcd_setalertstatuspgm(const char* message);
  16. void lcd_reset_alert_level();
  17. uint8_t get_message_level();
  18. void lcd_adjust_z();
  19. void lcd_pick_babystep();
  20. void lcd_alright();
  21. void EEPROM_save_B(int pos, int* value);
  22. void EEPROM_read_B(int pos, int* value);
  23. void lcd_wait_interact();
  24. void lcd_change_filament();
  25. void lcd_loading_filament();
  26. void lcd_change_success();
  27. void lcd_loading_color();
  28. void lcd_sdcard_stop();
  29. void lcd_sdcard_pause();
  30. void lcd_print_stop();
  31. void prusa_statistics(int _message, uint8_t _col_nr = 0);
  32. void lcd_confirm_print();
  33. unsigned char lcd_choose_color();
  34. //void lcd_mylang();
  35. extern bool lcd_selftest();
  36. void lcd_menu_statistics();
  37. extern const char* lcd_display_message_fullscreen_P(const char *msg, uint8_t &nlines);
  38. inline const char* lcd_display_message_fullscreen_P(const char *msg)
  39. { uint8_t nlines; return lcd_display_message_fullscreen_P(msg, nlines); }
  40. extern void lcd_wait_for_click();
  41. extern void lcd_show_fullscreen_message_and_wait_P(const char *msg);
  42. // 0: no, 1: yes, -1: timeouted
  43. extern int8_t lcd_show_fullscreen_message_yes_no_and_wait_P(const char *msg, bool allow_timeouting = true, bool default_yes = false);
  44. extern int8_t lcd_show_multiscreen_message_yes_no_and_wait_P(const char *msg, bool allow_timeouting = true, bool default_yes = false);
  45. // Ask the user to move the Z axis up to the end stoppers and let
  46. // the user confirm that it has been done.
  47. #ifndef TMC2130
  48. extern bool lcd_calibrate_z_end_stop_manual(bool only_z);
  49. #endif
  50. // Show the result of the calibration process on the LCD screen.
  51. extern void lcd_bed_calibration_show_result(uint8_t result, uint8_t point_too_far_mask);
  52. extern void lcd_diag_show_end_stops();
  53. #define LCD_MESSAGEPGM(x) lcd_setstatuspgm(PSTR(x))
  54. #define LCD_ALERTMESSAGEPGM(x) lcd_setalertstatuspgm(PSTR(x))
  55. #define LCD_MESSAGERPGM(x) lcd_setstatuspgm((x))
  56. #define LCD_ALERTMESSAGERPGM(x) lcd_setalertstatuspgm((x))
  57. // To be used in lcd_commands_type.
  58. #define LCD_COMMAND_IDLE 0
  59. #define LCD_COMMAND_LOAD_FILAMENT 1
  60. #define LCD_COMMAND_STOP_PRINT 2
  61. #define LCD_COMMAND_FARM_MODE_CONFIRM 4
  62. #define LCD_COMMAND_LONG_PAUSE 5
  63. #define LCD_COMMAND_LONG_PAUSE_RESUME 6
  64. #define LCD_COMMAND_PID_EXTRUDER 7
  65. #define LCD_COMMAND_V2_CAL 8
  66. extern int lcd_commands_type;
  67. extern uint8_t farm_mode;
  68. extern int farm_no;
  69. extern int farm_timer;
  70. extern int farm_status;
  71. #ifdef TMC2130
  72. #define SILENT_MODE_NORMAL 0
  73. #define SILENT_MODE_STEALTH 1
  74. #define SILENT_MODE_OFF SILENT_MODE_NORMAL
  75. #else
  76. #define SILENT_MODE_POWER 0
  77. #define SILENT_MODE_SILENT 1
  78. #define SILENT_MODE_AUTO 2
  79. #define SILENT_MODE_OFF SILENT_MODE_POWER
  80. #endif
  81. extern int8_t SilentModeMenu;
  82. #if defined (SNMM) || defined (SNMM_V2)
  83. extern uint8_t snmm_extruder;
  84. #endif // defined (SNMM) || defined (SNMM_V2)
  85. extern bool cancel_heatup;
  86. extern bool isPrintPaused;
  87. void lcd_ignore_click(bool b=true);
  88. void lcd_commands();
  89. void change_extr(int extr);
  90. void extr_adj(int extruder);
  91. void extr_unload_all();
  92. void extr_unload_used();
  93. void extr_unload();
  94. void unload_filament();
  95. void stack_error();
  96. void lcd_printer_connected();
  97. void lcd_ping();
  98. void lcd_calibrate_extruder();
  99. void lcd_farm_sdcard_menu();
  100. //void getFileDescription(char *name, char *description);
  101. void lcd_farm_sdcard_menu_w();
  102. //void get_description();
  103. void lcd_wait_for_heater();
  104. void lcd_wait_for_cool_down();
  105. void adjust_bed_reset();
  106. void lcd_extr_cal_reset();
  107. void lcd_temp_cal_show_result(bool result);
  108. bool lcd_wait_for_pinda(float temp);
  109. union MenuData;
  110. void bowden_menu();
  111. char reset_menu();
  112. char choose_extruder_menu();
  113. void lcd_pinda_calibration_menu();
  114. void lcd_calibrate_pinda();
  115. void lcd_temp_calibration_set();
  116. void display_loading();
  117. #if !SDSORT_USES_RAM
  118. void lcd_set_degree();
  119. void lcd_set_progress();
  120. #endif
  121. void lcd_language();
  122. void lcd_wizard();
  123. void lcd_wizard(int state);
  124. #endif //ULTRALCD_H