Show UBL Activate/Deactivate menu for current state (#13744)

This commit is contained in:
Jimmy Wennlund 2019-04-18 11:13:05 -07:00 committed by Scott Lahteine
parent 08f21335a6
commit e6f6ed76c8

View file

@ -615,8 +615,10 @@ void _lcd_ubl_step_by_step() {
void _lcd_ubl_level_bed() {
START_MENU();
MENU_BACK(MSG_MOTION);
MENU_ITEM(gcode, MSG_UBL_ACTIVATE_MESH, PSTR("G29 A"));
MENU_ITEM(gcode, MSG_UBL_DEACTIVATE_MESH, PSTR("G29 D"));
if (planner.leveling_active)
MENU_ITEM(gcode, MSG_UBL_DEACTIVATE_MESH, PSTR("G29 D"));
else
MENU_ITEM(gcode, MSG_UBL_ACTIVATE_MESH, PSTR("G29 A"));
MENU_ITEM(submenu, MSG_UBL_STEP_BY_STEP_MENU, _lcd_ubl_step_by_step);
MENU_ITEM(function, MSG_UBL_MESH_EDIT, _lcd_ubl_output_map_lcd_cmd);
MENU_ITEM(submenu, MSG_UBL_STORAGE_MESH_MENU, _lcd_ubl_storage_mesh);