Browse Source

Remove ADKey steps acceleration

Scott Lahteine 7 years ago
parent
commit
34aeaec553
1 changed files with 2 additions and 7 deletions
  1. 2
    7
      Marlin/ultralcd.cpp

+ 2
- 7
Marlin/ultralcd.cpp View File

@@ -4338,9 +4338,7 @@ void kill_screen(const char* lcd_msg) {
4338 4338
 
4339 4339
     inline bool handle_adc_keypad() {
4340 4340
       #define ADC_MIN_KEY_DELAY 100
4341
-      static uint8_t adc_steps = 0;
4342 4341
       if (buttons_reprapworld_keypad) {
4343
-        if (adc_steps < 20) ++adc_steps;
4344 4342
         lcdDrawUpdate = LCDVIEW_REDRAW_NOW;
4345 4343
         if (encoderDirection == -1) { // side effect which signals we are inside a menu
4346 4344
           if      (buttons_reprapworld_keypad & EN_REPRAPWORLD_KEYPAD_DOWN)  encoderPosition -= ENCODER_STEPS_PER_MENU_ITEM;
@@ -4350,9 +4348,8 @@ void kill_screen(const char* lcd_msg) {
4350 4348
         }
4351 4349
         else {
4352 4350
           if (buttons_reprapworld_keypad & (EN_REPRAPWORLD_KEYPAD_DOWN|EN_REPRAPWORLD_KEYPAD_UP|EN_REPRAPWORLD_KEYPAD_RIGHT)) {
4353
-            const int8_t step = adc_steps > 19 ? 100 : adc_steps > 10 ? 10 : 1;
4354
-                 if (buttons_reprapworld_keypad & EN_REPRAPWORLD_KEYPAD_DOWN)  encoderPosition += ENCODER_PULSES_PER_STEP * step;
4355
-            else if (buttons_reprapworld_keypad & EN_REPRAPWORLD_KEYPAD_UP)    encoderPosition -= ENCODER_PULSES_PER_STEP * step;
4351
+                 if (buttons_reprapworld_keypad & EN_REPRAPWORLD_KEYPAD_DOWN)  encoderPosition += ENCODER_PULSES_PER_STEP;
4352
+            else if (buttons_reprapworld_keypad & EN_REPRAPWORLD_KEYPAD_UP)    encoderPosition -= ENCODER_PULSES_PER_STEP;
4356 4353
             else if (buttons_reprapworld_keypad & EN_REPRAPWORLD_KEYPAD_RIGHT) encoderPosition = 0;
4357 4354
           }
4358 4355
         }
@@ -4363,8 +4360,6 @@ void kill_screen(const char* lcd_msg) {
4363 4360
         next_button_update_ms = millis() + ADC_MIN_KEY_DELAY;
4364 4361
         return true;
4365 4362
       }
4366
-      else if (!thermalManager.current_ADCKey_raw)
4367
-        adc_steps = 0; // reset stepping acceleration
4368 4363
 
4369 4364
       return false;
4370 4365
     }

Loading…
Cancel
Save