Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add REVERSE_ENCODER_DIRECTION option #3739

Merged
merged 1 commit into from
May 12, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
//
//#define ENCODER_STEPS_PER_MENU_ITEM 5

//
// This option reverses the encoder direction everywhere
//
// Set this option if CLOCKWISE causes values to DECREASE
//
//#define REVERSE_ENCODER_DIRECTION

//
// This option reverses the encoder direction for navigating LCD menus.
//
Expand Down
7 changes: 7 additions & 0 deletions Marlin/example_configurations/Felix/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -845,6 +845,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
//
//#define ENCODER_STEPS_PER_MENU_ITEM 5

//
// This option reverses the encoder direction everywhere
//
// Set this option if CLOCKWISE causes values to DECREASE
//
//#define REVERSE_ENCODER_DIRECTION

//
// This option reverses the encoder direction for navigating LCD menus.
//
Expand Down
7 changes: 7 additions & 0 deletions Marlin/example_configurations/Felix/Configuration_DUAL.h
Original file line number Diff line number Diff line change
Expand Up @@ -843,6 +843,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
//
//#define ENCODER_STEPS_PER_MENU_ITEM 5

//
// This option reverses the encoder direction everywhere
//
// Set this option if CLOCKWISE causes values to DECREASE
//
//#define REVERSE_ENCODER_DIRECTION

//
// This option reverses the encoder direction for navigating LCD menus.
//
Expand Down
7 changes: 7 additions & 0 deletions Marlin/example_configurations/Hephestos/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -854,6 +854,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
//
//#define ENCODER_STEPS_PER_MENU_ITEM 5

//
// This option reverses the encoder direction everywhere
//
// Set this option if CLOCKWISE causes values to DECREASE
//
//#define REVERSE_ENCODER_DIRECTION

//
// This option reverses the encoder direction for navigating LCD menus.
//
Expand Down
7 changes: 7 additions & 0 deletions Marlin/example_configurations/Hephestos_2/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -856,6 +856,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
//
//#define ENCODER_STEPS_PER_MENU_ITEM 5

//
// This option reverses the encoder direction everywhere
//
// Set this option if CLOCKWISE causes values to DECREASE
//
//#define REVERSE_ENCODER_DIRECTION

//
// This option reverses the encoder direction for navigating LCD menus.
//
Expand Down
7 changes: 7 additions & 0 deletions Marlin/example_configurations/K8200/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -879,6 +879,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
//
//#define ENCODER_STEPS_PER_MENU_ITEM 5

//
// This option reverses the encoder direction everywhere
//
// Set this option if CLOCKWISE causes values to DECREASE
//
//#define REVERSE_ENCODER_DIRECTION

//
// This option reverses the encoder direction for navigating LCD menus.
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
//
//#define ENCODER_STEPS_PER_MENU_ITEM 5

//
// This option reverses the encoder direction everywhere
//
// Set this option if CLOCKWISE causes values to DECREASE
//
//#define REVERSE_ENCODER_DIRECTION

//
// This option reverses the encoder direction for navigating LCD menus.
//
Expand Down
7 changes: 7 additions & 0 deletions Marlin/example_configurations/RigidBot/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -857,6 +857,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
//
//#define ENCODER_STEPS_PER_MENU_ITEM 5

//
// This option reverses the encoder direction everywhere
//
// Set this option if CLOCKWISE causes values to DECREASE
//
//#define REVERSE_ENCODER_DIRECTION

//
// This option reverses the encoder direction for navigating LCD menus.
//
Expand Down
7 changes: 7 additions & 0 deletions Marlin/example_configurations/SCARA/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -870,6 +870,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
//
//#define ENCODER_STEPS_PER_MENU_ITEM 5

//
// This option reverses the encoder direction everywhere
//
// Set this option if CLOCKWISE causes values to DECREASE
//
//#define REVERSE_ENCODER_DIRECTION

//
// This option reverses the encoder direction for navigating LCD menus.
//
Expand Down
7 changes: 7 additions & 0 deletions Marlin/example_configurations/TAZ4/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -883,6 +883,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
//
#define ENCODER_STEPS_PER_MENU_ITEM 1

//
// This option reverses the encoder direction everywhere
//
// Set this option if CLOCKWISE causes values to DECREASE
//
//#define REVERSE_ENCODER_DIRECTION

//
// This option reverses the encoder direction for navigating LCD menus.
//
Expand Down
7 changes: 7 additions & 0 deletions Marlin/example_configurations/WITBOX/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -854,6 +854,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
//
//#define ENCODER_STEPS_PER_MENU_ITEM 5

//
// This option reverses the encoder direction everywhere
//
// Set this option if CLOCKWISE causes values to DECREASE
//
//#define REVERSE_ENCODER_DIRECTION

//
// This option reverses the encoder direction for navigating LCD menus.
//
Expand Down
7 changes: 7 additions & 0 deletions Marlin/example_configurations/adafruit/ST7565/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
//
//#define ENCODER_STEPS_PER_MENU_ITEM 5

//
// This option reverses the encoder direction everywhere
//
// Set this option if CLOCKWISE causes values to DECREASE
//
//#define REVERSE_ENCODER_DIRECTION

//
// This option reverses the encoder direction for navigating LCD menus.
//
Expand Down
7 changes: 7 additions & 0 deletions Marlin/example_configurations/delta/biv2.5/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -991,6 +991,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
//
//#define ENCODER_STEPS_PER_MENU_ITEM 5

//
// This option reverses the encoder direction everywhere
//
// Set this option if CLOCKWISE causes values to DECREASE
//
//#define REVERSE_ENCODER_DIRECTION

//
// This option reverses the encoder direction for navigating LCD menus.
//
Expand Down
7 changes: 7 additions & 0 deletions Marlin/example_configurations/delta/generic/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -991,6 +991,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
//
//#define ENCODER_STEPS_PER_MENU_ITEM 5

//
// This option reverses the encoder direction everywhere
//
// Set this option if CLOCKWISE causes values to DECREASE
//
//#define REVERSE_ENCODER_DIRECTION

//
// This option reverses the encoder direction for navigating LCD menus.
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -995,6 +995,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
//
//#define ENCODER_STEPS_PER_MENU_ITEM 5

//
// This option reverses the encoder direction everywhere
//
// Set this option if CLOCKWISE causes values to DECREASE
//
//#define REVERSE_ENCODER_DIRECTION

//
// This option reverses the encoder direction for navigating LCD menus.
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -988,6 +988,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
//
//#define ENCODER_STEPS_PER_MENU_ITEM 5

//
// This option reverses the encoder direction everywhere
//
// Set this option if CLOCKWISE causes values to DECREASE
//
//#define REVERSE_ENCODER_DIRECTION

//
// This option reverses the encoder direction for navigating LCD menus.
//
Expand Down
7 changes: 7 additions & 0 deletions Marlin/example_configurations/delta/kossel_xl/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -996,6 +996,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
//
//#define ENCODER_STEPS_PER_MENU_ITEM 5

//
// This option reverses the encoder direction everywhere
//
// Set this option if CLOCKWISE causes values to DECREASE
//
//#define REVERSE_ENCODER_DIRECTION

//
// This option reverses the encoder direction for navigating LCD menus.
//
Expand Down
7 changes: 7 additions & 0 deletions Marlin/example_configurations/makibox/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -865,6 +865,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
//
//#define ENCODER_STEPS_PER_MENU_ITEM 5

//
// This option reverses the encoder direction everywhere
//
// Set this option if CLOCKWISE causes values to DECREASE
//
//#define REVERSE_ENCODER_DIRECTION

//
// This option reverses the encoder direction for navigating LCD menus.
//
Expand Down
7 changes: 7 additions & 0 deletions Marlin/example_configurations/tvrrug/Round2/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -856,6 +856,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
//
//#define ENCODER_STEPS_PER_MENU_ITEM 5

//
// This option reverses the encoder direction everywhere
//
// Set this option if CLOCKWISE causes values to DECREASE
//
//#define REVERSE_ENCODER_DIRECTION

//
// This option reverses the encoder direction for navigating LCD menus.
//
Expand Down
8 changes: 7 additions & 1 deletion Marlin/ultralcd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2466,9 +2466,15 @@ void lcd_reset_alert_level() { lcd_status_message_level = 0; }
GET_BUTTON_STATES(buttons);
#endif //!NEWPANEL

#if ENABLED(REVERSE_MENU_DIRECTION)
#if ENABLED(REVERSE_MENU_DIRECTION) && ENABLED(REVERSE_ENCODER_DIRECTION)
#define ENCODER_DIFF_CW (encoderDiff -= encoderDirection)
#define ENCODER_DIFF_CCW (encoderDiff += encoderDirection)
#elif ENABLED(REVERSE_MENU_DIRECTION)
#define ENCODER_DIFF_CW (encoderDiff += encoderDirection)
#define ENCODER_DIFF_CCW (encoderDiff -= encoderDirection)
#elif ENABLED(REVERSE_ENCODER_DIRECTION)
#define ENCODER_DIFF_CW (encoderDiff--)
#define ENCODER_DIFF_CCW (encoderDiff++)
#else
#define ENCODER_DIFF_CW (encoderDiff++)
#define ENCODER_DIFF_CCW (encoderDiff--)
Expand Down