From 055b11814acc887ca7bfc9430c850695131c74ee Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 11 Apr 2015 04:56:08 -0700 Subject: [PATCH] Additional cleanup of ultralcd.cpp --- Marlin/ultralcd.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp index daf4a30b8..9fef9c12d 100644 --- a/Marlin/ultralcd.cpp +++ b/Marlin/ultralcd.cpp @@ -304,12 +304,10 @@ static void lcd_status_screen() { if (ignore_click) { if (wait_for_unclick) { - if (!current_click) { + if (!current_click) ignore_click = wait_for_unclick = false; - } - else { + else current_click = false; - } } else if (current_click) { lcd_quick_feedback(); @@ -337,15 +335,17 @@ static void lcd_status_screen() { encoderPosition = 0; feedmultiply = 100; } - if (feedmultiply == 100 && int(encoderPosition) > ENCODER_FEEDRATE_DEADZONE) { - feedmultiply += int(encoderPosition) - ENCODER_FEEDRATE_DEADZONE; - encoderPosition = 0; - } - else if (feedmultiply == 100 && int(encoderPosition) < -ENCODER_FEEDRATE_DEADZONE) { - feedmultiply += int(encoderPosition) + ENCODER_FEEDRATE_DEADZONE; - encoderPosition = 0; + if (feedmultiply == 100) { + if (int(encoderPosition) > ENCODER_FEEDRATE_DEADZONE) { + feedmultiply += int(encoderPosition) - ENCODER_FEEDRATE_DEADZONE; + encoderPosition = 0; + } + else if (int(encoderPosition) < -ENCODER_FEEDRATE_DEADZONE) { + feedmultiply += int(encoderPosition) + ENCODER_FEEDRATE_DEADZONE; + encoderPosition = 0; + } } - else if (feedmultiply != 100) { + else { feedmultiply += int(encoderPosition); encoderPosition = 0; }