From 8e66526dafdc1a16c0fe0923e5c1bc8bcf6e789e Mon Sep 17 00:00:00 2001 From: Marcio Teixeira Date: Thu, 30 Nov 2017 14:47:59 -0700 Subject: [PATCH] T1375 Esteps display accuracy now integers. To allow for easier adjusting from the LCD. --- Marlin/Conditionals_LulzBot.h | 2 ++ Marlin/ultralcd.cpp | 11 +++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Marlin/Conditionals_LulzBot.h b/Marlin/Conditionals_LulzBot.h index 85ee04f12..e2bef0283 100644 --- a/Marlin/Conditionals_LulzBot.h +++ b/Marlin/Conditionals_LulzBot.h @@ -1737,8 +1737,10 @@ #define LULZBOT_HIDE_EXTRA_FAN_CONFIG_IN_LCD #define LULZBOT_SCROLL_LONG_FILE_NAMES #define LULZBOT_REORDERED_MENUS + #define LULZBOT_ESTEP_REDUCED_LCD_PRECISION #endif + /* Marlin requires static PSTRs to display on the LCD display, because of this */ /* we have to use a preprocessor trick to append the heater name on temp errors */ /* such that an appropriate PSTR is selected depending on the value of e */ diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp index ef7cb50a1..fdd3323a4 100644 --- a/Marlin/ultralcd.cpp +++ b/Marlin/ultralcd.cpp @@ -31,8 +31,6 @@ #include "configuration_store.h" #include "utility.h" -#include "Configuration_LulzBot.h" - #if HAS_BUZZER && DISABLED(LCD_USE_I2C_BUZZER) #include "buzzer.h" #endif @@ -3513,8 +3511,13 @@ void kill_screen(const char* lcd_msg) { #if not defined(LULZBOT_HIDE_ACTIVE_NOZZLE_IN_LCD) MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float62, MSG_ESTEPS, &planner.axis_steps_per_mm[E_AXIS + active_extruder], 5, 9999, _planner_refresh_positioning); #endif + #if defined(LULZBOT_ESTEP_REDUCED_LCD_PRECISION) + MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float3, MSG_E1STEPS, &planner.axis_steps_per_mm[E_AXIS], 5, 9999, _planner_refresh_e0_positioning); + MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float3, MSG_E2STEPS, &planner.axis_steps_per_mm[E_AXIS + 1], 5, 9999, _planner_refresh_e1_positioning); + #else MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float62, MSG_E1STEPS, &planner.axis_steps_per_mm[E_AXIS], 5, 9999, _planner_refresh_e0_positioning); MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float62, MSG_E2STEPS, &planner.axis_steps_per_mm[E_AXIS + 1], 5, 9999, _planner_refresh_e1_positioning); + #endif #if E_STEPPERS > 2 MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float62, MSG_E3STEPS, &planner.axis_steps_per_mm[E_AXIS + 2], 5, 9999, _planner_refresh_e2_positioning); #if E_STEPPERS > 3 @@ -3525,7 +3528,11 @@ void kill_screen(const char* lcd_msg) { #endif // E_STEPPERS > 3 #endif // E_STEPPERS > 2 #else + #if defined(LULZBOT_ESTEP_REDUCED_LCD_PRECISION) + MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float3, MSG_ESTEPS, &planner.axis_steps_per_mm[E_AXIS], 5, 9999, _planner_refresh_positioning); + #else MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(float62, MSG_ESTEPS, &planner.axis_steps_per_mm[E_AXIS], 5, 9999, _planner_refresh_positioning); + #endif #endif END_MENU();