From c083728e4cf426b9d1c5da8881ea562afa7de5a3 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 2 Mar 2020 17:43:37 -0600 Subject: [PATCH] General code cleanup --- Marlin/src/gcode/feature/advance/M900.cpp | 10 +++------- Marlin/src/lcd/ultralcd.cpp | 2 +- buildroot/share/tests/mega2560-tests | 2 +- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/Marlin/src/gcode/feature/advance/M900.cpp b/Marlin/src/gcode/feature/advance/M900.cpp index bbba4f246..5a029cbf0 100644 --- a/Marlin/src/gcode/feature/advance/M900.cpp +++ b/Marlin/src/gcode/feature/advance/M900.cpp @@ -59,16 +59,12 @@ void GcodeSuite::M900() { } #endif - float &kref = planner.extruder_advance_K[tool_index]; + float &kref = planner.extruder_advance_K[tool_index], newK = kref; + const float oldK = newK; #if ENABLED(EXTRA_LIN_ADVANCE_K) - float &lref = other_extruder_advance_K[tool_index]; - #endif - - const float oldK = kref; - float newK = oldK; - #if ENABLED(EXTRA_LIN_ADVANCE_K) + float &lref = other_extruder_advance_K[tool_index]; const bool old_slot = TEST(lin_adv_slot, tool_index), // The tool's current slot (0 or 1) new_slot = parser.boolval('S', old_slot); // The passed slot (default = current) diff --git a/Marlin/src/lcd/ultralcd.cpp b/Marlin/src/lcd/ultralcd.cpp index 47cd8df80..b67ec0ab4 100644 --- a/Marlin/src/lcd/ultralcd.cpp +++ b/Marlin/src/lcd/ultralcd.cpp @@ -1245,7 +1245,7 @@ void MarlinUI::update() { } #endif - #if HAS_SHIFT_ENCODER + #if HAS_SHIFT_ENCODER /** * Set up Rotary Encoder bit values (for two pin encoders to indicate movement). * These values are independent of which pins are used for EN_A / EN_B indications. diff --git a/buildroot/share/tests/mega2560-tests b/buildroot/share/tests/mega2560-tests index b0b9b4224..f120cdd6e 100755 --- a/buildroot/share/tests/mega2560-tests +++ b/buildroot/share/tests/mega2560-tests @@ -45,7 +45,7 @@ opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER LCD_PROGRESS_BAR LCD_PROGRESS_BAR_TE BACKLASH_COMPENSATION BACKLASH_GCODE BAUD_RATE_GCODE BEZIER_CURVE_SUPPORT \ FWRETRACT ARC_P_CIRCLES CNC_WORKSPACE_PLANES CNC_COORDINATE_SYSTEMS \ PSU_CONTROL AUTO_POWER_CONTROL POWER_LOSS_RECOVERY POWER_LOSS_PIN POWER_LOSS_STATE \ - SLOW_PWM_HEATERS THERMAL_PROTECTION_CHAMBER LIN_ADVANCE EXTRA_LIN_ADVANCE_K \ + SLOW_PWM_HEATERS THERMAL_PROTECTION_CHAMBER LIN_ADVANCE EXTRA_LIN_ADVANCE_K \ HOST_ACTION_COMMANDS HOST_PROMPT_SUPPORT PINS_DEBUGGING MAX7219_DEBUG M114_DETAIL exec_test $1 $2 "RAMPS | EXTRUDERS 2 | CHAR LCD + SD | FIX Probe | ABL-Linear | Advanced Pause | PLR | LEDs ..."