From ef51bd16dc8e4b28ea048b333e6de65d506cc273 Mon Sep 17 00:00:00 2001 From: Philippe Cayrol <58492957+phcay@users.noreply.github.com> Date: Wed, 18 Nov 2020 06:56:51 +0100 Subject: [PATCH] Better edit range for Linear Advance K (#20155) --- Marlin/src/lcd/extui/ui_api.cpp | 2 +- Marlin/src/lcd/menu/menu_advanced.cpp | 8 ++++---- Marlin/src/lcd/menu/menu_tune.cpp | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Marlin/src/lcd/extui/ui_api.cpp b/Marlin/src/lcd/extui/ui_api.cpp index ac8e6ebf88..1583db41e9 100644 --- a/Marlin/src/lcd/extui/ui_api.cpp +++ b/Marlin/src/lcd/extui/ui_api.cpp @@ -626,7 +626,7 @@ namespace ExtUI { void setLinearAdvance_mm_mm_s(const float value, const extruder_t extruder) { if (extruder < EXTRUDERS) - planner.extruder_advance_K[extruder - E0] = constrain(value, 0, 999); + planner.extruder_advance_K[extruder - E0] = constrain(value, 0, 10); } #endif diff --git a/Marlin/src/lcd/menu/menu_advanced.cpp b/Marlin/src/lcd/menu/menu_advanced.cpp index 12f9d57b46..268573beb0 100644 --- a/Marlin/src/lcd/menu/menu_advanced.cpp +++ b/Marlin/src/lcd/menu/menu_advanced.cpp @@ -110,10 +110,10 @@ void menu_backlash(); #if ENABLED(LIN_ADVANCE) #if EXTRUDERS == 1 - EDIT_ITEM(float42_52, MSG_ADVANCE_K, &planner.extruder_advance_K[0], 0, 999); + EDIT_ITEM(float42_52, MSG_ADVANCE_K, &planner.extruder_advance_K[0], 0, 10); #elif HAS_MULTI_EXTRUDER LOOP_L_N(n, EXTRUDERS) - EDIT_ITEM_N(float42_52, n, MSG_ADVANCE_K_E, &planner.extruder_advance_K[n], 0, 999); + EDIT_ITEM_N(float42_52, n, MSG_ADVANCE_K_E, &planner.extruder_advance_K[n], 0, 10); #endif #endif @@ -587,10 +587,10 @@ void menu_advanced_settings() { SUBMENU(MSG_FILAMENT, menu_advanced_filament); #elif ENABLED(LIN_ADVANCE) #if EXTRUDERS == 1 - EDIT_ITEM(float42_52, MSG_ADVANCE_K, &planner.extruder_advance_K[0], 0, 999); + EDIT_ITEM(float42_52, MSG_ADVANCE_K, &planner.extruder_advance_K[0], 0, 10); #elif HAS_MULTI_EXTRUDER LOOP_L_N(n, E_STEPPERS) - EDIT_ITEM_N(float42_52, n, MSG_ADVANCE_K_E, &planner.extruder_advance_K[n], 0, 999); + EDIT_ITEM_N(float42_52, n, MSG_ADVANCE_K_E, &planner.extruder_advance_K[n], 0, 10); #endif #endif diff --git a/Marlin/src/lcd/menu/menu_tune.cpp b/Marlin/src/lcd/menu/menu_tune.cpp index 041786794e..87168ba1e7 100644 --- a/Marlin/src/lcd/menu/menu_tune.cpp +++ b/Marlin/src/lcd/menu/menu_tune.cpp @@ -202,10 +202,10 @@ void menu_tune() { // #if ENABLED(LIN_ADVANCE) && DISABLED(SLIM_LCD_MENUS) #if EXTRUDERS == 1 - EDIT_ITEM(float42_52, MSG_ADVANCE_K, &planner.extruder_advance_K[0], 0, 999); + EDIT_ITEM(float42_52, MSG_ADVANCE_K, &planner.extruder_advance_K[0], 0, 10); #elif HAS_MULTI_EXTRUDER LOOP_L_N(n, EXTRUDERS) - EDIT_ITEM_N(float42_52, n, MSG_ADVANCE_K_E, &planner.extruder_advance_K[n], 0, 999); + EDIT_ITEM_N(float42_52, n, MSG_ADVANCE_K_E, &planner.extruder_advance_K[n], 0, 10); #endif #endif