Add HAS_FILAMENT_RUNOUT_DISTANCE
This commit is contained in:
@ -35,7 +35,7 @@ void FilamentRunoutScreen::onRedraw(draw_mode_t what) {
|
||||
w.heading( GET_TEXT_F(MSG_FILAMENT));
|
||||
w.toggle( 2, GET_TEXT_F(MSG_RUNOUT_SENSOR), getFilamentRunoutEnabled());
|
||||
|
||||
#ifdef FILAMENT_RUNOUT_DISTANCE_MM
|
||||
#if HAS_FILAMENT_RUNOUT_DISTANCE
|
||||
extern const char NUL_STR[];
|
||||
w.heading(GET_TEXT_F(MSG_RUNOUT_DISTANCE_MM));
|
||||
w.units(GET_TEXT_F(MSG_UNITS_MM));
|
||||
@ -51,7 +51,7 @@ bool FilamentRunoutScreen::onTouchHeld(uint8_t tag) {
|
||||
const float increment = getIncrement();
|
||||
switch (tag) {
|
||||
case 2: setFilamentRunoutEnabled(!getFilamentRunoutEnabled()); break;
|
||||
#ifdef FILAMENT_RUNOUT_DISTANCE_MM
|
||||
#if HAS_FILAMENT_RUNOUT_DISTANCE
|
||||
case 10: UI_DECREMENT(FilamentRunoutDistance_mm); break;
|
||||
case 11: UI_INCREMENT(FilamentRunoutDistance_mm); break;
|
||||
#endif
|
||||
|
@ -591,7 +591,7 @@ namespace ExtUI {
|
||||
bool getFilamentRunoutEnabled() { return runout.enabled; }
|
||||
void setFilamentRunoutEnabled(const bool value) { runout.enabled = value; }
|
||||
|
||||
#ifdef FILAMENT_RUNOUT_DISTANCE_MM
|
||||
#if HAS_FILAMENT_RUNOUT_DISTANCE
|
||||
float getFilamentRunoutDistance_mm() { return runout.runout_distance(); }
|
||||
void setFilamentRunoutDistance_mm(const float value) { runout.set_runout_distance(constrain(value, 0, 999)); }
|
||||
#endif
|
||||
|
@ -237,7 +237,7 @@ namespace ExtUI {
|
||||
bool getFilamentRunoutEnabled();
|
||||
void setFilamentRunoutEnabled(const bool);
|
||||
|
||||
#ifdef FILAMENT_RUNOUT_DISTANCE_MM
|
||||
#if HAS_FILAMENT_RUNOUT_DISTANCE
|
||||
float getFilamentRunoutDistance_mm();
|
||||
void setFilamentRunoutDistance_mm(const float);
|
||||
#endif
|
||||
|
@ -43,7 +43,7 @@
|
||||
#include "../../module/temperature.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(FILAMENT_RUNOUT_SENSOR) && FILAMENT_RUNOUT_DISTANCE_MM
|
||||
#if HAS_FILAMENT_RUNOUT_DISTANCE
|
||||
#include "../../feature/runout.h"
|
||||
#endif
|
||||
|
||||
@ -142,7 +142,7 @@ void menu_cancelobject();
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if ENABLED(FILAMENT_RUNOUT_SENSOR) && FILAMENT_RUNOUT_DISTANCE_MM
|
||||
#if HAS_FILAMENT_RUNOUT_DISTANCE
|
||||
editable.decimal = runout.runout_distance();
|
||||
EDIT_ITEM(float3, MSG_RUNOUT_DISTANCE_MM, &editable.decimal, 1, 30,
|
||||
[]{ runout.set_runout_distance(editable.decimal); }, true
|
||||
|
Reference in New Issue
Block a user