Browse Source

Fix ENCODER_PULSES_PER_STEP for G3D_PANEL

pull/1/head
Scott Lahteine 7 years ago
parent
commit
7a29f802d0
  1. 35
      Marlin/src/inc/Conditionals_LCD.h
  2. 10
      Marlin/src/lcd/ultralcd.cpp
  3. 8
      Marlin/src/pins/pins_ANET_10.h

35
Marlin/src/inc/Conditionals_LCD.h

@ -195,23 +195,38 @@
#define ENCODER_FEEDRATE_DEADZONE 4 #define ENCODER_FEEDRATE_DEADZONE 4
#ifndef ENCODER_PULSES_PER_STEP #define STD_ENCODER_PULSES_PER_STEP 1
#define ENCODER_PULSES_PER_STEP 1 #define STD_ENCODER_STEPS_PER_MENU_ITEM 2
#elif ENABLED(G3D_PANEL)
#define STD_ENCODER_PULSES_PER_STEP 2
#define STD_ENCODER_STEPS_PER_MENU_ITEM 1
#elif ENABLED(miniVIKI) || ENABLED(VIKI2) \
|| ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) \
|| ENABLED(OLED_PANEL_TINYBOY2) \
|| ENABLED(BQ_LCD_SMART_CONTROLLER) \
|| ENABLED(LCD_I2C_PANELOLU2) \
|| ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
#define STD_ENCODER_PULSES_PER_STEP 4
#define STD_ENCODER_STEPS_PER_MENU_ITEM 1
#endif #endif
#ifndef ENCODER_STEPS_PER_MENU_ITEM
#define ENCODER_STEPS_PER_MENU_ITEM 2 #ifndef STD_ENCODER_PULSES_PER_STEP
#define STD_ENCODER_PULSES_PER_STEP 5
#endif #endif
#ifndef STD_ENCODER_STEPS_PER_MENU_ITEM
#define STD_ENCODER_STEPS_PER_MENU_ITEM 1
#endif #endif
// Set encoder detents for well-known controllers
#if ENABLED(miniVIKI) || ENABLED(VIKI2) || ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) || ENABLED(OLED_PANEL_TINYBOY2) \
|| ENABLED(BQ_LCD_SMART_CONTROLLER) || ENABLED(LCD_I2C_PANELOLU2) || ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
#ifndef ENCODER_PULSES_PER_STEP #ifndef ENCODER_PULSES_PER_STEP
#define ENCODER_PULSES_PER_STEP 4 #define ENCODER_PULSES_PER_STEP STD_ENCODER_PULSES_PER_STEP
#endif #endif
#ifndef ENCODER_STEPS_PER_MENU_ITEM #ifndef ENCODER_STEPS_PER_MENU_ITEM
#define ENCODER_STEPS_PER_MENU_ITEM 1 #define ENCODER_STEPS_PER_MENU_ITEM STD_ENCODER_STEPS_PER_MENU_ITEM
#endif #endif
#ifndef ENCODER_FEEDRATE_DEADZONE
#define ENCODER_FEEDRATE_DEADZONE 6
#endif #endif
// Shift register panels // Shift register panels

10
Marlin/src/lcd/ultralcd.cpp

@ -247,16 +247,6 @@ uint16_t max_display_update_time = 0;
//////////// Menu System Macros //////////// //////////// Menu System Macros ////////////
//////////////////////////////////////////// ////////////////////////////////////////////
#ifndef ENCODER_FEEDRATE_DEADZONE
#define ENCODER_FEEDRATE_DEADZONE 10
#endif
#ifndef ENCODER_STEPS_PER_MENU_ITEM
#define ENCODER_STEPS_PER_MENU_ITEM 5
#endif
#ifndef ENCODER_PULSES_PER_STEP
#define ENCODER_PULSES_PER_STEP 1
#endif
/** /**
* MENU_ITEM generates draw & handler code for a menu item, potentially calling: * MENU_ITEM generates draw & handler code for a menu item, potentially calling:
* *

8
Marlin/src/pins/pins_ANET_10.h

@ -182,12 +182,8 @@
#define ST7920_DELAY_1 DELAY_0_NOP #define ST7920_DELAY_1 DELAY_0_NOP
#define ST7920_DELAY_2 DELAY_1_NOP #define ST7920_DELAY_2 DELAY_1_NOP
#define ST7920_DELAY_3 DELAY_2_NOP #define ST7920_DELAY_3 DELAY_2_NOP
#ifndef ENCODER_STEPS_PER_MENU_ITEM #define STD_ENCODER_PULSES_PER_STEP 4
#define ENCODER_STEPS_PER_MENU_ITEM 1 #define STD_ENCODER_STEPS_PER_MENU_ITEM 1
#endif
#ifndef ENCODER_PULSES_PER_STEP
#define ENCODER_PULSES_PER_STEP 4
#endif
#endif #endif
#endif // ULTRA_LCD && NEWPANEL #endif // ULTRA_LCD && NEWPANEL

Loading…
Cancel
Save