Add REVERSE_ENCODER_DIRECTION option

This commit is contained in:
Scott Lahteine 2016-05-11 15:39:28 -07:00
parent a454a88f9c
commit 4dc4e2063f
20 changed files with 140 additions and 1 deletions

View file

@ -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 //#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. // This option reverses the encoder direction for navigating LCD menus.
// //

View file

@ -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 //#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. // This option reverses the encoder direction for navigating LCD menus.
// //

View file

@ -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 //#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. // This option reverses the encoder direction for navigating LCD menus.
// //

View file

@ -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 //#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. // This option reverses the encoder direction for navigating LCD menus.
// //

View file

@ -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 //#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. // This option reverses the encoder direction for navigating LCD menus.
// //

View file

@ -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 //#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. // This option reverses the encoder direction for navigating LCD menus.
// //

View file

@ -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 //#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. // This option reverses the encoder direction for navigating LCD menus.
// //

View file

@ -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 //#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. // This option reverses the encoder direction for navigating LCD menus.
// //

View file

@ -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 //#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. // This option reverses the encoder direction for navigating LCD menus.
// //

View file

@ -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 #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. // This option reverses the encoder direction for navigating LCD menus.
// //

View file

@ -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 //#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. // This option reverses the encoder direction for navigating LCD menus.
// //

View file

@ -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 //#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. // This option reverses the encoder direction for navigating LCD menus.
// //

View file

@ -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 //#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. // This option reverses the encoder direction for navigating LCD menus.
// //

View file

@ -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 //#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. // This option reverses the encoder direction for navigating LCD menus.
// //

View file

@ -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 //#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. // This option reverses the encoder direction for navigating LCD menus.
// //

View file

@ -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 //#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. // This option reverses the encoder direction for navigating LCD menus.
// //

View file

@ -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 //#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. // This option reverses the encoder direction for navigating LCD menus.
// //

View file

@ -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 //#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. // This option reverses the encoder direction for navigating LCD menus.
// //

View file

@ -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 //#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. // This option reverses the encoder direction for navigating LCD menus.
// //

View file

@ -2466,9 +2466,15 @@ void lcd_reset_alert_level() { lcd_status_message_level = 0; }
GET_BUTTON_STATES(buttons); GET_BUTTON_STATES(buttons);
#endif //!NEWPANEL #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_CW (encoderDiff += encoderDirection)
#define ENCODER_DIFF_CCW (encoderDiff -= encoderDirection) #define ENCODER_DIFF_CCW (encoderDiff -= encoderDirection)
#elif ENABLED(REVERSE_ENCODER_DIRECTION)
#define ENCODER_DIFF_CW (encoderDiff--)
#define ENCODER_DIFF_CCW (encoderDiff++)
#else #else
#define ENCODER_DIFF_CW (encoderDiff++) #define ENCODER_DIFF_CW (encoderDiff++)
#define ENCODER_DIFF_CCW (encoderDiff--) #define ENCODER_DIFF_CCW (encoderDiff--)