My Marlin configs for Fabrikator Mini and CTC i3 Pro B
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

menu.h 17KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
  4. *
  5. * Based on Sprinter and grbl.
  6. * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
  7. *
  8. * This program is free software: you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation, either version 3 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  20. *
  21. */
  22. #pragma once
  23. #include "../ultralcd.h"
  24. #include "../../inc/MarlinConfig.h"
  25. extern uint32_t encoderPosition;
  26. extern int8_t encoderLine, encoderTopLine, screen_items;
  27. extern millis_t lastEncoderMovementMillis;
  28. extern bool screen_changed;
  29. constexpr int16_t heater_maxtemp[HOTENDS] = ARRAY_BY_HOTENDS(HEATER_0_MAXTEMP, HEATER_1_MAXTEMP, HEATER_2_MAXTEMP, HEATER_3_MAXTEMP, HEATER_4_MAXTEMP);
  30. void scroll_screen(const uint8_t limit, const bool is_menu);
  31. bool use_click();
  32. bool printer_busy();
  33. void lcd_completion_feedback(const bool good=true);
  34. void lcd_goto_previous_menu();
  35. void lcd_goto_previous_menu_no_defer();
  36. ////////////////////////////////////////////
  37. ///////// Menu Item Draw Functions /////////
  38. ////////////////////////////////////////////
  39. #if ENABLED(SDSUPPORT)
  40. class CardReader;
  41. #endif
  42. void lcd_implementation_drawmenu_generic(const bool isSelected, const uint8_t row, const char* pstr, const char pre_char, const char post_char);
  43. void lcd_implementation_drawmenu_static(const uint8_t row, const char* pstr, const bool center=true, const bool invert=false, const char *valstr=NULL);
  44. void lcd_implementation_drawedit(const char* const pstr, const char* const value=NULL);
  45. #if ENABLED(ADVANCED_PAUSE_FEATURE)
  46. void lcd_implementation_hotend_status(const uint8_t row, const uint8_t extruder);
  47. #endif
  48. #if HAS_GRAPHICAL_LCD
  49. void _drawmenu_setting_edit_generic(const bool isSelected, const uint8_t row, const char* pstr, const char* const data, const bool pgm);
  50. #define lcd_implementation_drawmenu_back(sel, row, pstr, dummy) lcd_implementation_drawmenu_generic(sel, row, pstr, LCD_STR_UPLEVEL[0], LCD_STR_UPLEVEL[0])
  51. #define lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, data) _drawmenu_setting_edit_generic(sel, row, pstr, data, false)
  52. #define lcd_implementation_drawmenu_setting_edit_generic_P(sel, row, pstr, data) _drawmenu_setting_edit_generic(sel, row, pstr, data, true)
  53. #define DRAWMENU_SETTING_EDIT_GENERIC(SRC) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, SRC)
  54. #define DRAW_BOOL_SETTING(sel, row, pstr, data) lcd_implementation_drawmenu_setting_edit_generic_P(sel, row, pstr, (*(data))?PSTR(MSG_ON):PSTR(MSG_OFF))
  55. #if ENABLED(SDSUPPORT)
  56. void _drawmenu_sd(const bool isSelected, const uint8_t row, PGM_P const pstr, CardReader &theCard, const bool isDir);
  57. #define lcd_implementation_drawmenu_sdfile(sel, row, pstr, theCard) _drawmenu_sd(sel, row, pstr, theCard, false)
  58. #define lcd_implementation_drawmenu_sddirectory(sel, row, pstr, theCard) _drawmenu_sd(sel, row, pstr, theCard, true)
  59. #endif
  60. #if ENABLED(BABYSTEP_ZPROBE_GFX_OVERLAY) || ENABLED(MESH_EDIT_GFX_OVERLAY)
  61. void _lcd_zoffset_overlay_gfx(const float zvalue);
  62. #endif
  63. #else
  64. #define lcd_implementation_drawmenu_back(sel, row, pstr, dummy) lcd_implementation_drawmenu_generic(sel, row, pstr, LCD_UPLEVEL_CHAR, LCD_UPLEVEL_CHAR)
  65. void lcd_implementation_drawmenu_setting_edit_generic(const bool sel, const uint8_t row, const char* pstr, const char pre_char, const char* const data);
  66. void lcd_implementation_drawmenu_setting_edit_generic_P(const bool sel, const uint8_t row, const char* pstr, const char pre_char, const char* const data);
  67. #define DRAWMENU_SETTING_EDIT_GENERIC(SRC) lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, '>', SRC)
  68. #define DRAW_BOOL_SETTING(sel, row, pstr, data) lcd_implementation_drawmenu_setting_edit_generic_P(sel, row, pstr, '>', (*(data))?PSTR(MSG_ON):PSTR(MSG_OFF))
  69. #if ENABLED(SDSUPPORT)
  70. void lcd_implementation_drawmenu_sdfile(const bool sel, const uint8_t row, PGM_P pstr, CardReader &theCard);
  71. void lcd_implementation_drawmenu_sddirectory(const bool sel, const uint8_t row, PGM_P pstr, CardReader &theCard);
  72. #endif
  73. #endif
  74. #define lcd_implementation_drawmenu_submenu(sel, row, pstr, data) lcd_implementation_drawmenu_generic(sel, row, pstr, '>', LCD_STR_ARROW_RIGHT[0])
  75. #define lcd_implementation_drawmenu_gcode(sel, row, pstr, gcode) lcd_implementation_drawmenu_generic(sel, row, pstr, '>', ' ')
  76. #define lcd_implementation_drawmenu_function(sel, row, pstr, data) lcd_implementation_drawmenu_generic(sel, row, pstr, '>', ' ')
  77. #if ENABLED(AUTO_BED_LEVELING_UBL)
  78. void lcd_implementation_ubl_plot(const uint8_t x, const uint8_t inverted_y);
  79. #endif
  80. ////////////////////////////////////////////
  81. /////// Edit Setting Draw Functions ////////
  82. ////////////////////////////////////////////
  83. #define DEFINE_LCD_IMPLEMENTATION_DRAWMENU_SETTING_EDIT_TYPE(TYPE, NAME, STRFUNC) \
  84. FORCE_INLINE void lcd_implementation_drawmenu_setting_edit_ ## NAME (const bool sel, const uint8_t row, PGM_P pstr, PGM_P pstr2, TYPE * const data, ...) { \
  85. UNUSED(pstr2); \
  86. DRAWMENU_SETTING_EDIT_GENERIC(STRFUNC(*(data))); \
  87. } \
  88. FORCE_INLINE void lcd_implementation_drawmenu_setting_edit_callback_ ## NAME (const bool sel, const uint8_t row, PGM_P pstr, PGM_P pstr2, TYPE * const data, ...) { \
  89. UNUSED(pstr2); \
  90. DRAWMENU_SETTING_EDIT_GENERIC(STRFUNC(*(data))); \
  91. } \
  92. FORCE_INLINE void lcd_implementation_drawmenu_setting_edit_accessor_ ## NAME (const bool sel, const uint8_t row, PGM_P pstr, PGM_P pstr2, TYPE (*pget)(), void (*pset)(TYPE), ...) { \
  93. UNUSED(pstr2); UNUSED(pset); \
  94. DRAWMENU_SETTING_EDIT_GENERIC(STRFUNC(pget())); \
  95. } \
  96. typedef void NAME##_void
  97. DEFINE_LCD_IMPLEMENTATION_DRAWMENU_SETTING_EDIT_TYPE(int16_t, int3, itostr3);
  98. DEFINE_LCD_IMPLEMENTATION_DRAWMENU_SETTING_EDIT_TYPE(int16_t, int4, itostr4sign);
  99. DEFINE_LCD_IMPLEMENTATION_DRAWMENU_SETTING_EDIT_TYPE(uint8_t, int8, i8tostr3);
  100. DEFINE_LCD_IMPLEMENTATION_DRAWMENU_SETTING_EDIT_TYPE(float, float3, ftostr3);
  101. DEFINE_LCD_IMPLEMENTATION_DRAWMENU_SETTING_EDIT_TYPE(float, float52, ftostr52);
  102. DEFINE_LCD_IMPLEMENTATION_DRAWMENU_SETTING_EDIT_TYPE(float, float43, ftostr43sign);
  103. DEFINE_LCD_IMPLEMENTATION_DRAWMENU_SETTING_EDIT_TYPE(float, float5, ftostr5rj);
  104. DEFINE_LCD_IMPLEMENTATION_DRAWMENU_SETTING_EDIT_TYPE(float, float51, ftostr51sign);
  105. DEFINE_LCD_IMPLEMENTATION_DRAWMENU_SETTING_EDIT_TYPE(float, float52sign, ftostr52sign);
  106. DEFINE_LCD_IMPLEMENTATION_DRAWMENU_SETTING_EDIT_TYPE(float, float62, ftostr62rj);
  107. DEFINE_LCD_IMPLEMENTATION_DRAWMENU_SETTING_EDIT_TYPE(uint32_t, long5, ftostr5rj);
  108. #define lcd_implementation_drawmenu_setting_edit_bool(sel, row, pstr, pstr2, data) DRAW_BOOL_SETTING(sel, row, pstr, data)
  109. #define lcd_implementation_drawmenu_setting_edit_callback_bool(sel, row, pstr, pstr2, data, callback) DRAW_BOOL_SETTING(sel, row, pstr, data)
  110. #define lcd_implementation_drawmenu_setting_edit_accessor_bool(sel, row, pstr, pstr2, pget, pset) DRAW_BOOL_SETTING(sel, row, pstr, data)
  111. ////////////////////////////////////////////
  112. /////////////// Menu Actions ///////////////
  113. ////////////////////////////////////////////
  114. #define menu_action_back(dummy) _menu_action_back()
  115. void _menu_action_back();
  116. void menu_action_submenu(screenFunc_t data);
  117. void menu_action_function(menuAction_t data);
  118. void menu_action_gcode(const char* pgcode);
  119. #if ENABLED(SDSUPPORT)
  120. void menu_action_sdfile(CardReader &theCard);
  121. void menu_action_sddirectory(CardReader &theCard);
  122. #endif
  123. ////////////////////////////////////////////
  124. /////////// Menu Editing Actions ///////////
  125. ////////////////////////////////////////////
  126. #define DECLARE_MENU_EDIT_TYPE(TYPE, NAME) \
  127. bool _menu_edit_ ## NAME(); \
  128. void menu_edit_ ## NAME(); \
  129. void menu_edit_callback_ ## NAME(); \
  130. void _menu_action_setting_edit_ ## NAME(PGM_P const pstr, TYPE* const ptr, const TYPE minValue, const TYPE maxValue); \
  131. void menu_action_setting_edit_callback_ ## NAME(PGM_P const pstr, TYPE * const ptr, const TYPE minValue, const TYPE maxValue, const screenFunc_t callback=NULL, const bool live=false); \
  132. FORCE_INLINE void menu_action_setting_edit_ ## NAME(PGM_P const pstr, TYPE * const ptr, const TYPE minValue, const TYPE maxValue) { \
  133. menu_action_setting_edit_callback_ ## NAME(pstr, ptr, minValue, maxValue); \
  134. } \
  135. typedef void NAME##_void
  136. DECLARE_MENU_EDIT_TYPE(int16_t, int3);
  137. DECLARE_MENU_EDIT_TYPE(int16_t, int4);
  138. DECLARE_MENU_EDIT_TYPE(uint8_t, int8);
  139. DECLARE_MENU_EDIT_TYPE(float, float3);
  140. DECLARE_MENU_EDIT_TYPE(float, float52);
  141. DECLARE_MENU_EDIT_TYPE(float, float43);
  142. DECLARE_MENU_EDIT_TYPE(float, float5);
  143. DECLARE_MENU_EDIT_TYPE(float, float51);
  144. DECLARE_MENU_EDIT_TYPE(float, float52sign);
  145. DECLARE_MENU_EDIT_TYPE(float, float62);
  146. DECLARE_MENU_EDIT_TYPE(uint32_t, long5);
  147. void menu_action_setting_edit_bool(PGM_P pstr, bool* ptr);
  148. void menu_action_setting_edit_callback_bool(PGM_P pstr, bool* ptr, screenFunc_t callbackFunc);
  149. ////////////////////////////////////////////
  150. //////////// Menu System Macros ////////////
  151. ////////////////////////////////////////////
  152. /**
  153. * SCREEN_OR_MENU_LOOP generates init code for a screen or menu
  154. *
  155. * encoderTopLine is the top menu line to display
  156. * _lcdLineNr is the index of the LCD line (e.g., 0-3)
  157. * _menuLineNr is the menu item to draw and process
  158. * _thisItemNr is the index of each MENU_ITEM or STATIC_ITEM
  159. */
  160. #define SCREEN_OR_MENU_LOOP() \
  161. int8_t _menuLineNr = encoderTopLine, _thisItemNr; \
  162. for (int8_t _lcdLineNr = 0; _lcdLineNr < LCD_HEIGHT; _lcdLineNr++, _menuLineNr++) { \
  163. _thisItemNr = 0
  164. /**
  165. * START_SCREEN Opening code for a screen having only static items.
  166. * Do simplified scrolling of the entire screen.
  167. *
  168. * START_MENU Opening code for a screen with menu items.
  169. * Scroll as-needed to keep the selected line in view.
  170. */
  171. #define START_SCREEN() \
  172. scroll_screen(LCD_HEIGHT, false); \
  173. bool _skipStatic = false; \
  174. SCREEN_OR_MENU_LOOP()
  175. #define START_MENU() \
  176. scroll_screen(1, true); \
  177. bool _skipStatic = true; \
  178. SCREEN_OR_MENU_LOOP()
  179. #define END_SCREEN() \
  180. } \
  181. screen_items = _thisItemNr
  182. #define END_MENU() \
  183. } \
  184. screen_items = _thisItemNr; \
  185. UNUSED(_skipStatic)
  186. /**
  187. * REVERSE_MENU_DIRECTION
  188. *
  189. * To reverse the menu direction we need a general way to reverse
  190. * the direction of the encoder everywhere. So encoderDirection is
  191. * added to allow the encoder to go the other way.
  192. *
  193. * This behavior is limited to scrolling Menus and SD card listings,
  194. * and is disabled in other contexts.
  195. */
  196. #if ENABLED(REVERSE_MENU_DIRECTION)
  197. extern int8_t encoderDirection;
  198. #define ENCODER_DIRECTION_NORMAL() (encoderDirection = 1)
  199. #define ENCODER_DIRECTION_MENUS() (encoderDirection = -1)
  200. #else
  201. #define ENCODER_DIRECTION_NORMAL() NOOP
  202. #define ENCODER_DIRECTION_MENUS() NOOP
  203. #endif
  204. #if ENABLED(ENCODER_RATE_MULTIPLIER)
  205. extern bool encoderRateMultiplierEnabled;
  206. #define ENCODER_RATE_MULTIPLY(F) (encoderRateMultiplierEnabled = F)
  207. //#define ENCODER_RATE_MULTIPLIER_DEBUG // If defined, output the encoder steps per second value
  208. /**
  209. * MENU_MULTIPLIER_ITEM generates drawing and handling code for a multiplier menu item
  210. */
  211. #define MENU_MULTIPLIER_ITEM(TYPE, LABEL, ...) do { \
  212. _MENU_ITEM_PART_1(TYPE, ## __VA_ARGS__); \
  213. encoderRateMultiplierEnabled = true; \
  214. lastEncoderMovementMillis = 0; \
  215. _MENU_ITEM_PART_2(TYPE, PSTR(LABEL), ## __VA_ARGS__); \
  216. }while(0)
  217. #else // !ENCODER_RATE_MULTIPLIER
  218. #define ENCODER_RATE_MULTIPLY(F) NOOP
  219. #endif // !ENCODER_RATE_MULTIPLIER
  220. /**
  221. * MENU_ITEM generates draw & handler code for a menu item, potentially calling:
  222. *
  223. * lcd_implementation_drawmenu_[type](sel, row, label, arg3...)
  224. * menu_action_[type](arg3...)
  225. *
  226. * Examples:
  227. * MENU_ITEM(back, MSG_WATCH, 0 [dummy parameter] )
  228. * or
  229. * MENU_BACK(MSG_WATCH)
  230. * lcd_implementation_drawmenu_back(sel, row, PSTR(MSG_WATCH))
  231. * menu_action_back()
  232. *
  233. * MENU_ITEM(function, MSG_PAUSE_PRINT, lcd_sdcard_pause)
  234. * lcd_implementation_drawmenu_function(sel, row, PSTR(MSG_PAUSE_PRINT), lcd_sdcard_pause)
  235. * menu_action_function(lcd_sdcard_pause)
  236. *
  237. * MENU_ITEM_EDIT(int3, MSG_SPEED, &feedrate_percentage, 10, 999)
  238. * MENU_ITEM(setting_edit_int3, MSG_SPEED, PSTR(MSG_SPEED), &feedrate_percentage, 10, 999)
  239. * lcd_implementation_drawmenu_setting_edit_int3(sel, row, PSTR(MSG_SPEED), PSTR(MSG_SPEED), &feedrate_percentage, 10, 999)
  240. * menu_action_setting_edit_int3(PSTR(MSG_SPEED), &feedrate_percentage, 10, 999)
  241. *
  242. */
  243. #define _MENU_ITEM_PART_1(TYPE, ...) \
  244. if (_menuLineNr == _thisItemNr) { \
  245. if (encoderLine == _thisItemNr && lcd_clicked) { \
  246. lcd_clicked = false
  247. #define _MENU_ITEM_PART_2(TYPE, PLABEL, ...) \
  248. menu_action_ ## TYPE(__VA_ARGS__); \
  249. if (screen_changed) return; \
  250. } \
  251. if (lcdDrawUpdate) \
  252. lcd_implementation_drawmenu_ ## TYPE(encoderLine == _thisItemNr, _lcdLineNr, PLABEL, ## __VA_ARGS__); \
  253. } \
  254. ++_thisItemNr
  255. #define MENU_ITEM_P(TYPE, PLABEL, ...) do { \
  256. _skipStatic = false; \
  257. _MENU_ITEM_PART_1(TYPE, ## __VA_ARGS__); \
  258. _MENU_ITEM_PART_2(TYPE, PLABEL, ## __VA_ARGS__); \
  259. }while(0)
  260. #define MENU_ITEM(TYPE, LABEL, ...) MENU_ITEM_P(TYPE, PSTR(LABEL), ## __VA_ARGS__)
  261. #define MENU_ITEM_ADDON_START(X) \
  262. if (lcdDrawUpdate && _menuLineNr == _thisItemNr - 1) { \
  263. SETCURSOR(X, _lcdLineNr)
  264. #define MENU_ITEM_ADDON_END() } (0)
  265. #define MENU_BACK(LABEL) MENU_ITEM(back, LABEL, 0)
  266. // Used to print static text with no visible cursor.
  267. // Parameters: label [, bool center [, bool invert [, char *value] ] ]
  268. #define STATIC_ITEM_P(LABEL, ...) do{ \
  269. if (_menuLineNr == _thisItemNr) { \
  270. if (_skipStatic && encoderLine <= _thisItemNr) { \
  271. encoderPosition += ENCODER_STEPS_PER_MENU_ITEM; \
  272. ++encoderLine; \
  273. } \
  274. if (lcdDrawUpdate) \
  275. lcd_implementation_drawmenu_static(_lcdLineNr, LABEL, ## __VA_ARGS__); \
  276. } \
  277. ++_thisItemNr; } while(0)
  278. #define STATIC_ITEM(LABEL, ...) STATIC_ITEM_P(PSTR(LABEL), ## __VA_ARGS__)
  279. #define MENU_ITEM_DUMMY() do { _thisItemNr++; }while(0)
  280. #define MENU_ITEM_EDIT(TYPE, LABEL, ...) MENU_ITEM(_CAT(setting_edit_,TYPE), LABEL, PSTR(LABEL), ## __VA_ARGS__)
  281. #define MENU_ITEM_EDIT_CALLBACK(TYPE, LABEL, ...) MENU_ITEM(_CAT(setting_edit_callback_,TYPE), LABEL, PSTR(LABEL), ## __VA_ARGS__)
  282. #if ENABLED(ENCODER_RATE_MULTIPLIER)
  283. #define MENU_MULTIPLIER_ITEM_EDIT(TYPE, LABEL, ...) MENU_MULTIPLIER_ITEM(_CAT(setting_edit_,TYPE), LABEL, PSTR(LABEL), ## __VA_ARGS__)
  284. #define MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(TYPE, LABEL, ...) MENU_MULTIPLIER_ITEM(_CAT(setting_edit_callback_,TYPE), LABEL, PSTR(LABEL), ## __VA_ARGS__)
  285. #else // !ENCODER_RATE_MULTIPLIER
  286. #define MENU_MULTIPLIER_ITEM_EDIT(TYPE, LABEL, ...) MENU_ITEM(_CAT(setting_edit_,TYPE), LABEL, PSTR(LABEL), ## __VA_ARGS__)
  287. #define MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(TYPE, LABEL, ...) MENU_ITEM(_CAT(setting_edit_callback_,TYPE), LABEL, PSTR(LABEL), ## __VA_ARGS__)
  288. #endif // !ENCODER_RATE_MULTIPLIER
  289. ////////////////////////////////////////////
  290. /////////////// Menu Screens ///////////////
  291. ////////////////////////////////////////////
  292. void menu_main();
  293. void menu_move();
  294. #if ENABLED(SDSUPPORT)
  295. void menu_sdcard();
  296. #endif
  297. // First Fan Speed title in "Tune" and "Control>Temperature" menus
  298. #if FAN_COUNT > 0 && HAS_FAN0
  299. #if FAN_COUNT > 1
  300. #define FAN_SPEED_1_SUFFIX " 1"
  301. #else
  302. #define FAN_SPEED_1_SUFFIX ""
  303. #endif
  304. #endif
  305. ////////////////////////////////////////////
  306. //////// Menu Item Helper Functions ////////
  307. ////////////////////////////////////////////
  308. void lcd_move_z();
  309. void lcd_synchronize(PGM_P const msg=NULL);
  310. void line_to_z(const float &z);
  311. void _lcd_draw_homing();
  312. void watch_temp_callback_E0();
  313. void watch_temp_callback_E1();
  314. void watch_temp_callback_E2();
  315. void watch_temp_callback_E3();
  316. void watch_temp_callback_E4();
  317. void watch_temp_callback_E5();
  318. void watch_temp_callback_bed();
  319. #if ENABLED(AUTO_BED_LEVELING_UBL) || ENABLED(PID_AUTOTUNE_MENU) || ENABLED(ADVANCED_PAUSE_FEATURE)
  320. void lcd_enqueue_command(const char * const cmd);
  321. void lcd_enqueue_commands_P(PGM_P const cmd);
  322. #endif
  323. #if ENABLED(LEVEL_BED_CORNERS)
  324. void _lcd_level_bed_corners();
  325. #endif
  326. #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
  327. extern float lcd_z_fade_height;
  328. void _lcd_set_z_fade_height();
  329. #endif
  330. #if ENABLED(LCD_BED_LEVELING) || (HAS_LEVELING && DISABLED(SLIM_LCD_MENUS))
  331. void _lcd_toggle_bed_leveling();
  332. #endif
  333. #if ENABLED(BABYSTEPPING)
  334. #if ENABLED(BABYSTEP_ZPROBE_OFFSET)
  335. void lcd_babystep_zoffset();
  336. #else
  337. void lcd_babystep_z();
  338. #endif
  339. #endif
  340. #if ENABLED(EEPROM_SETTINGS)
  341. void lcd_store_settings();
  342. void lcd_load_settings();
  343. #endif