Browse Source

runout.distance_mm LCD edit item (#14066)

pull/1/head
Robby Candra 6 years ago
committed by Scott Lahteine
parent
commit
f30b89953d
  1. 3
      Marlin/src/lcd/language/language_en.h
  2. 14
      Marlin/src/lcd/menu/menu_advanced.cpp

3
Marlin/src/lcd/language/language_en.h

@ -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

14
Marlin/src/lcd/menu/menu_advanced.cpp

@ -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);

Loading…
Cancel
Save