Browse Source

Additional cleanup of ultralcd.cpp

Scott Lahteine 9 years ago
parent
commit
055b11814a
1 changed files with 12 additions and 12 deletions
  1. 12
    12
      Marlin/ultralcd.cpp

+ 12
- 12
Marlin/ultralcd.cpp View File

304
 
304
 
305
     if (ignore_click) {
305
     if (ignore_click) {
306
       if (wait_for_unclick) {
306
       if (wait_for_unclick) {
307
-        if (!current_click) {
307
+        if (!current_click)
308
           ignore_click = wait_for_unclick = false;
308
           ignore_click = wait_for_unclick = false;
309
-        }
310
-        else {
309
+        else
311
           current_click = false;
310
           current_click = false;
312
-        }
313
       }
311
       }
314
       else if (current_click) {
312
       else if (current_click) {
315
         lcd_quick_feedback();
313
         lcd_quick_feedback();
337
         encoderPosition = 0;
335
         encoderPosition = 0;
338
         feedmultiply = 100;
336
         feedmultiply = 100;
339
       }
337
       }
340
-      if (feedmultiply == 100 && int(encoderPosition) > ENCODER_FEEDRATE_DEADZONE) {
341
-        feedmultiply += int(encoderPosition) - ENCODER_FEEDRATE_DEADZONE;
342
-        encoderPosition = 0;
343
-      }
344
-      else if (feedmultiply == 100 && int(encoderPosition) < -ENCODER_FEEDRATE_DEADZONE) {
345
-        feedmultiply += int(encoderPosition) + ENCODER_FEEDRATE_DEADZONE;
346
-        encoderPosition = 0;
338
+      if (feedmultiply == 100) {
339
+        if (int(encoderPosition) > ENCODER_FEEDRATE_DEADZONE) {
340
+          feedmultiply += int(encoderPosition) - ENCODER_FEEDRATE_DEADZONE;
341
+          encoderPosition = 0;
342
+        }
343
+        else if (int(encoderPosition) < -ENCODER_FEEDRATE_DEADZONE) {
344
+          feedmultiply += int(encoderPosition) + ENCODER_FEEDRATE_DEADZONE;
345
+          encoderPosition = 0;
346
+        }
347
       }
347
       }
348
-      else if (feedmultiply != 100) {
348
+      else {
349
         feedmultiply += int(encoderPosition);
349
         feedmultiply += int(encoderPosition);
350
         encoderPosition = 0;
350
         encoderPosition = 0;
351
       }
351
       }

Loading…
Cancel
Save