From 9bc88f8bab9cd0c444c8a6248e2ad486125f4713 Mon Sep 17 00:00:00 2001 From: Erik van der Zalm Date: Mon, 23 Sep 2013 23:25:11 +0200 Subject: [PATCH] Placed optional ENCODER_PULSES_PER_STEP in the configuration.h file --- Marlin/Configuration.h | 2 +- Marlin/ultralcd.cpp | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index ef7a359e47..3927b16424 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -359,7 +359,7 @@ const bool Z_MAX_ENDSTOP_INVERTING = true; // set to true to invert the logic of //#define DOGLCD // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family) //#define SDSUPPORT // Enable SD Card Support in Hardware Console //#define SDSLOW // Use slower SD transfer mode (not normally needed - uncomment if you're getting volume init error) - +//#define ENCODER_PULSES_PER_STEP 1 // Increase if you have a high resolution encoder //#define ULTIMAKERCONTROLLER //as available from the ultimaker online store. //#define ULTIPANEL //the ultipanel as on thingiverse diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp index 5c9cbf7752..da4e064fc5 100644 --- a/Marlin/ultralcd.cpp +++ b/Marlin/ultralcd.cpp @@ -88,10 +88,14 @@ static void menu_action_setting_edit_callback_long5(const char* pstr, unsigned l #if !defined(LCD_I2C_VIKI) #define ENCODER_STEPS_PER_MENU_ITEM 5 - #define ENCODER_PULSES_PER_STEP 1 + #ifndef ENCODER_PULSES_PER_STEP + #define ENCODER_PULSES_PER_STEP 1 + #endif #else #define ENCODER_STEPS_PER_MENU_ITEM 2 // VIKI LCD rotary encoder uses a different number of steps per rotation - #define ENCODER_PULSES_PER_STEP 1 + #ifndef ENCODER_PULSES_PER_STEP + #define ENCODER_PULSES_PER_STEP 1 + #endif #endif