Merge pull request #3739 from thinkyhead/rc_reverse_encoder
Add REVERSE_ENCODER_DIRECTION option
This commit is contained in:
commit
a42655b9ac
|
@ -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.
|
||||
//
|
||||
|
|
|
@ -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.
|
||||
//
|
||||
|
|
|
@ -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.
|
||||
//
|
||||
|
|
|
@ -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.
|
||||
//
|
||||
|
|
|
@ -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.
|
||||
//
|
||||
|
|
|
@ -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.
|
||||
//
|
||||
|
|
|
@ -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.
|
||||
//
|
||||
|
|
|
@ -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.
|
||||
//
|
||||
|
|
|
@ -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.
|
||||
//
|
||||
|
|
|
@ -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.
|
||||
//
|
||||
|
|
|
@ -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.
|
||||
//
|
||||
|
|
|
@ -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.
|
||||
//
|
||||
|
|
|
@ -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.
|
||||
//
|
||||
|
|
|
@ -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.
|
||||
//
|
||||
|
|
|
@ -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.
|
||||
//
|
||||
|
|
|
@ -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.
|
||||
//
|
||||
|
|
|
@ -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.
|
||||
//
|
||||
|
|
|
@ -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.
|
||||
//
|
||||
|
|
|
@ -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.
|
||||
//
|
||||
|
|
|
@ -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--)
|
||||
|
|
Loading…
Reference in a new issue