1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-27 13:56:24 +00:00

runout.distance_mm LCD edit item (#14066)

This commit is contained in:
Robby Candra 2019-06-11 08:18:06 +07:00 committed by Scott Lahteine
parent a3f034b95e
commit f30b89953d
2 changed files with 17 additions and 0 deletions

View File

@ -1197,6 +1197,9 @@
#ifndef MSG_RUNOUT_SENSOR
#define MSG_RUNOUT_SENSOR _UxGT("Runout Sensor")
#endif
#ifndef MSG_RUNOUT_DISTANCE_MM
#define MSG_RUNOUT_DISTANCE_MM _UxGT("Runout Dist mm")
#endif
#ifndef MSG_ERR_HOMING_FAILED
#define MSG_ERR_HOMING_FAILED _UxGT("Homing failed")
#endif

View File

@ -43,6 +43,11 @@
#include "../../module/temperature.h"
#endif
#ifdef FILAMENT_RUNOUT_DISTANCE_MM
#include "../../feature/runout.h"
float lcd_runout_distance_mm;
#endif
void menu_tmc();
void menu_backlash();
@ -214,6 +219,12 @@ void menu_backlash();
#endif // EXTRUDERS > 1
#endif
#ifdef FILAMENT_RUNOUT_DISTANCE_MM
MENU_ITEM_EDIT_CALLBACK(float3, MSG_RUNOUT_DISTANCE_MM, &lcd_runout_distance_mm, 1, 30, []{
runout.set_runout_distance(lcd_runout_distance_mm);
});
#endif
END_MENU();
}
@ -603,6 +614,9 @@ void menu_backlash();
#endif // !SLIM_LCD_MENUS
void menu_advanced_settings() {
#ifdef FILAMENT_RUNOUT_DISTANCE_MM
lcd_runout_distance_mm = runout.runout_distance();
#endif
START_MENU();
MENU_BACK(MSG_CONFIGURATION);