🚸 Adapt runout distance for FILAMENT_MOTION_SENSOR (#27540)

This commit is contained in:
Vovodroid 2024-11-25 05:07:14 +02:00 committed by GitHub
parent 61649aa3c0
commit 8d864d797a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -154,9 +154,12 @@ void menu_backlash();
#if HAS_FILAMENT_RUNOUT_DISTANCE
editable.decimal = runout.runout_distance();
EDIT_ITEM_FAST(float3, MSG_RUNOUT_DISTANCE_MM, &editable.decimal, 1, 999,
[]{ runout.set_runout_distance(editable.decimal); }, true
);
auto set_runout_distance = []{ runout.set_runout_distance(editable.decimal); };
#if ENABLED(FILAMENT_MOTION_SENSOR)
EDIT_ITEM_FAST(float31, MSG_RUNOUT_DISTANCE_MM, &editable.decimal, 0.1, 10, set_runout_distance, true);
#else
EDIT_ITEM_FAST(float3, MSG_RUNOUT_DISTANCE_MM, &editable.decimal, 1, 999, set_runout_distance, true);
#endif
#endif
END_MENU();