Selaa lähdekoodia

Add REVERSE_ENCODER_DIRECTION option

Scott Lahteine 9 vuotta sitten
vanhempi
commit
4dc4e2063f

+ 7
- 0
Marlin/Configuration.h Näytä tiedosto

@@ -863,6 +863,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
863 863
 //#define ENCODER_STEPS_PER_MENU_ITEM 5
864 864
 
865 865
 //
866
+// This option reverses the encoder direction everywhere
867
+//
868
+//  Set this option if CLOCKWISE causes values to DECREASE
869
+//
870
+//#define REVERSE_ENCODER_DIRECTION
871
+
872
+//
866 873
 // This option reverses the encoder direction for navigating LCD menus.
867 874
 //
868 875
 //  If CLOCKWISE normally moves DOWN this makes it go UP.

+ 7
- 0
Marlin/example_configurations/Felix/Configuration.h Näytä tiedosto

@@ -846,6 +846,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
846 846
 //#define ENCODER_STEPS_PER_MENU_ITEM 5
847 847
 
848 848
 //
849
+// This option reverses the encoder direction everywhere
850
+//
851
+//  Set this option if CLOCKWISE causes values to DECREASE
852
+//
853
+//#define REVERSE_ENCODER_DIRECTION
854
+
855
+//
849 856
 // This option reverses the encoder direction for navigating LCD menus.
850 857
 //
851 858
 //  If CLOCKWISE normally moves DOWN this makes it go UP.

+ 7
- 0
Marlin/example_configurations/Felix/Configuration_DUAL.h Näytä tiedosto

@@ -844,6 +844,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
844 844
 //#define ENCODER_STEPS_PER_MENU_ITEM 5
845 845
 
846 846
 //
847
+// This option reverses the encoder direction everywhere
848
+//
849
+//  Set this option if CLOCKWISE causes values to DECREASE
850
+//
851
+//#define REVERSE_ENCODER_DIRECTION
852
+
853
+//
847 854
 // This option reverses the encoder direction for navigating LCD menus.
848 855
 //
849 856
 //  If CLOCKWISE normally moves DOWN this makes it go UP.

+ 7
- 0
Marlin/example_configurations/Hephestos/Configuration.h Näytä tiedosto

@@ -855,6 +855,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
855 855
 //#define ENCODER_STEPS_PER_MENU_ITEM 5
856 856
 
857 857
 //
858
+// This option reverses the encoder direction everywhere
859
+//
860
+//  Set this option if CLOCKWISE causes values to DECREASE
861
+//
862
+//#define REVERSE_ENCODER_DIRECTION
863
+
864
+//
858 865
 // This option reverses the encoder direction for navigating LCD menus.
859 866
 //
860 867
 //  If CLOCKWISE normally moves DOWN this makes it go UP.

+ 7
- 0
Marlin/example_configurations/Hephestos_2/Configuration.h Näytä tiedosto

@@ -857,6 +857,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
857 857
 //#define ENCODER_STEPS_PER_MENU_ITEM 5
858 858
 
859 859
 //
860
+// This option reverses the encoder direction everywhere
861
+//
862
+//  Set this option if CLOCKWISE causes values to DECREASE
863
+//
864
+//#define REVERSE_ENCODER_DIRECTION
865
+
866
+//
860 867
 // This option reverses the encoder direction for navigating LCD menus.
861 868
 //
862 869
 //  If CLOCKWISE normally moves DOWN this makes it go UP.

+ 7
- 0
Marlin/example_configurations/K8200/Configuration.h Näytä tiedosto

@@ -880,6 +880,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
880 880
 //#define ENCODER_STEPS_PER_MENU_ITEM 5
881 881
 
882 882
 //
883
+// This option reverses the encoder direction everywhere
884
+//
885
+//  Set this option if CLOCKWISE causes values to DECREASE
886
+//
887
+//#define REVERSE_ENCODER_DIRECTION
888
+
889
+//
883 890
 // This option reverses the encoder direction for navigating LCD menus.
884 891
 //
885 892
 //  If CLOCKWISE normally moves DOWN this makes it go UP.

+ 7
- 0
Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h Näytä tiedosto

@@ -863,6 +863,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
863 863
 //#define ENCODER_STEPS_PER_MENU_ITEM 5
864 864
 
865 865
 //
866
+// This option reverses the encoder direction everywhere
867
+//
868
+//  Set this option if CLOCKWISE causes values to DECREASE
869
+//
870
+//#define REVERSE_ENCODER_DIRECTION
871
+
872
+//
866 873
 // This option reverses the encoder direction for navigating LCD menus.
867 874
 //
868 875
 //  If CLOCKWISE normally moves DOWN this makes it go UP.

+ 7
- 0
Marlin/example_configurations/RigidBot/Configuration.h Näytä tiedosto

@@ -858,6 +858,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
858 858
 //#define ENCODER_STEPS_PER_MENU_ITEM 5
859 859
 
860 860
 //
861
+// This option reverses the encoder direction everywhere
862
+//
863
+//  Set this option if CLOCKWISE causes values to DECREASE
864
+//
865
+//#define REVERSE_ENCODER_DIRECTION
866
+
867
+//
861 868
 // This option reverses the encoder direction for navigating LCD menus.
862 869
 //
863 870
 //  If CLOCKWISE normally moves DOWN this makes it go UP.

+ 7
- 0
Marlin/example_configurations/SCARA/Configuration.h Näytä tiedosto

@@ -871,6 +871,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
871 871
 //#define ENCODER_STEPS_PER_MENU_ITEM 5
872 872
 
873 873
 //
874
+// This option reverses the encoder direction everywhere
875
+//
876
+//  Set this option if CLOCKWISE causes values to DECREASE
877
+//
878
+//#define REVERSE_ENCODER_DIRECTION
879
+
880
+//
874 881
 // This option reverses the encoder direction for navigating LCD menus.
875 882
 //
876 883
 //  If CLOCKWISE normally moves DOWN this makes it go UP.

+ 7
- 0
Marlin/example_configurations/TAZ4/Configuration.h Näytä tiedosto

@@ -884,6 +884,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
884 884
 #define ENCODER_STEPS_PER_MENU_ITEM 1
885 885
 
886 886
 //
887
+// This option reverses the encoder direction everywhere
888
+//
889
+//  Set this option if CLOCKWISE causes values to DECREASE
890
+//
891
+//#define REVERSE_ENCODER_DIRECTION
892
+
893
+//
887 894
 // This option reverses the encoder direction for navigating LCD menus.
888 895
 //
889 896
 //  If CLOCKWISE normally moves DOWN this makes it go UP.

+ 7
- 0
Marlin/example_configurations/WITBOX/Configuration.h Näytä tiedosto

@@ -855,6 +855,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
855 855
 //#define ENCODER_STEPS_PER_MENU_ITEM 5
856 856
 
857 857
 //
858
+// This option reverses the encoder direction everywhere
859
+//
860
+//  Set this option if CLOCKWISE causes values to DECREASE
861
+//
862
+//#define REVERSE_ENCODER_DIRECTION
863
+
864
+//
858 865
 // This option reverses the encoder direction for navigating LCD menus.
859 866
 //
860 867
 //  If CLOCKWISE normally moves DOWN this makes it go UP.

+ 7
- 0
Marlin/example_configurations/adafruit/ST7565/Configuration.h Näytä tiedosto

@@ -863,6 +863,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
863 863
 //#define ENCODER_STEPS_PER_MENU_ITEM 5
864 864
 
865 865
 //
866
+// This option reverses the encoder direction everywhere
867
+//
868
+//  Set this option if CLOCKWISE causes values to DECREASE
869
+//
870
+//#define REVERSE_ENCODER_DIRECTION
871
+
872
+//
866 873
 // This option reverses the encoder direction for navigating LCD menus.
867 874
 //
868 875
 //  If CLOCKWISE normally moves DOWN this makes it go UP.

+ 7
- 0
Marlin/example_configurations/delta/biv2.5/Configuration.h Näytä tiedosto

@@ -992,6 +992,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
992 992
 //#define ENCODER_STEPS_PER_MENU_ITEM 5
993 993
 
994 994
 //
995
+// This option reverses the encoder direction everywhere
996
+//
997
+//  Set this option if CLOCKWISE causes values to DECREASE
998
+//
999
+//#define REVERSE_ENCODER_DIRECTION
1000
+
1001
+//
995 1002
 // This option reverses the encoder direction for navigating LCD menus.
996 1003
 //
997 1004
 //  If CLOCKWISE normally moves DOWN this makes it go UP.

+ 7
- 0
Marlin/example_configurations/delta/generic/Configuration.h Näytä tiedosto

@@ -992,6 +992,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
992 992
 //#define ENCODER_STEPS_PER_MENU_ITEM 5
993 993
 
994 994
 //
995
+// This option reverses the encoder direction everywhere
996
+//
997
+//  Set this option if CLOCKWISE causes values to DECREASE
998
+//
999
+//#define REVERSE_ENCODER_DIRECTION
1000
+
1001
+//
995 1002
 // This option reverses the encoder direction for navigating LCD menus.
996 1003
 //
997 1004
 //  If CLOCKWISE normally moves DOWN this makes it go UP.

+ 7
- 0
Marlin/example_configurations/delta/kossel_mini/Configuration.h Näytä tiedosto

@@ -996,6 +996,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
996 996
 //#define ENCODER_STEPS_PER_MENU_ITEM 5
997 997
 
998 998
 //
999
+// This option reverses the encoder direction everywhere
1000
+//
1001
+//  Set this option if CLOCKWISE causes values to DECREASE
1002
+//
1003
+//#define REVERSE_ENCODER_DIRECTION
1004
+
1005
+//
999 1006
 // This option reverses the encoder direction for navigating LCD menus.
1000 1007
 //
1001 1008
 //  If CLOCKWISE normally moves DOWN this makes it go UP.

+ 7
- 0
Marlin/example_configurations/delta/kossel_pro/Configuration.h Näytä tiedosto

@@ -989,6 +989,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
989 989
 //#define ENCODER_STEPS_PER_MENU_ITEM 5
990 990
 
991 991
 //
992
+// This option reverses the encoder direction everywhere
993
+//
994
+//  Set this option if CLOCKWISE causes values to DECREASE
995
+//
996
+//#define REVERSE_ENCODER_DIRECTION
997
+
998
+//
992 999
 // This option reverses the encoder direction for navigating LCD menus.
993 1000
 //
994 1001
 //  If CLOCKWISE normally moves DOWN this makes it go UP.

+ 7
- 0
Marlin/example_configurations/delta/kossel_xl/Configuration.h Näytä tiedosto

@@ -997,6 +997,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
997 997
 //#define ENCODER_STEPS_PER_MENU_ITEM 5
998 998
 
999 999
 //
1000
+// This option reverses the encoder direction everywhere
1001
+//
1002
+//  Set this option if CLOCKWISE causes values to DECREASE
1003
+//
1004
+//#define REVERSE_ENCODER_DIRECTION
1005
+
1006
+//
1000 1007
 // This option reverses the encoder direction for navigating LCD menus.
1001 1008
 //
1002 1009
 //  If CLOCKWISE normally moves DOWN this makes it go UP.

+ 7
- 0
Marlin/example_configurations/makibox/Configuration.h Näytä tiedosto

@@ -866,6 +866,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
866 866
 //#define ENCODER_STEPS_PER_MENU_ITEM 5
867 867
 
868 868
 //
869
+// This option reverses the encoder direction everywhere
870
+//
871
+//  Set this option if CLOCKWISE causes values to DECREASE
872
+//
873
+//#define REVERSE_ENCODER_DIRECTION
874
+
875
+//
869 876
 // This option reverses the encoder direction for navigating LCD menus.
870 877
 //
871 878
 //  If CLOCKWISE normally moves DOWN this makes it go UP.

+ 7
- 0
Marlin/example_configurations/tvrrug/Round2/Configuration.h Näytä tiedosto

@@ -857,6 +857,13 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the lo
857 857
 //#define ENCODER_STEPS_PER_MENU_ITEM 5
858 858
 
859 859
 //
860
+// This option reverses the encoder direction everywhere
861
+//
862
+//  Set this option if CLOCKWISE causes values to DECREASE
863
+//
864
+//#define REVERSE_ENCODER_DIRECTION
865
+
866
+//
860 867
 // This option reverses the encoder direction for navigating LCD menus.
861 868
 //
862 869
 //  If CLOCKWISE normally moves DOWN this makes it go UP.

+ 7
- 1
Marlin/ultralcd.cpp Näytä tiedosto

@@ -2466,9 +2466,15 @@ void lcd_reset_alert_level() { lcd_status_message_level = 0; }
2466 2466
       GET_BUTTON_STATES(buttons);
2467 2467
     #endif //!NEWPANEL
2468 2468
 
2469
-    #if ENABLED(REVERSE_MENU_DIRECTION)
2469
+    #if ENABLED(REVERSE_MENU_DIRECTION) && ENABLED(REVERSE_ENCODER_DIRECTION)
2470
+      #define ENCODER_DIFF_CW  (encoderDiff -= encoderDirection)
2471
+      #define ENCODER_DIFF_CCW (encoderDiff += encoderDirection)
2472
+    #elif ENABLED(REVERSE_MENU_DIRECTION)
2470 2473
       #define ENCODER_DIFF_CW  (encoderDiff += encoderDirection)
2471 2474
       #define ENCODER_DIFF_CCW (encoderDiff -= encoderDirection)
2475
+    #elif ENABLED(REVERSE_ENCODER_DIRECTION)
2476
+      #define ENCODER_DIFF_CW  (encoderDiff--)
2477
+      #define ENCODER_DIFF_CCW (encoderDiff++)
2472 2478
     #else
2473 2479
       #define ENCODER_DIFF_CW  (encoderDiff++)
2474 2480
       #define ENCODER_DIFF_CCW (encoderDiff--)

Loading…
Peruuta
Tallenna