Browse Source

Remove ADCKey steps acceleration

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

+ 2
- 7
Marlin/src/lcd/ultralcd.cpp View File

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

Loading…
Cancel
Save