Преглед на файлове

Add REVERSE_ENCODER_DIRECTION option

Scott Lahteine преди 9 години
родител
ревизия
4dc4e2063f

+ 7
- 0
Marlin/Configuration.h Целия файл

863
 //#define ENCODER_STEPS_PER_MENU_ITEM 5
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
 // This option reverses the encoder direction for navigating LCD menus.
873
 // This option reverses the encoder direction for navigating LCD menus.
867
 //
874
 //
868
 //  If CLOCKWISE normally moves DOWN this makes it go UP.
875
 //  If CLOCKWISE normally moves DOWN this makes it go UP.

+ 7
- 0
Marlin/example_configurations/Felix/Configuration.h Целия файл

846
 //#define ENCODER_STEPS_PER_MENU_ITEM 5
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
 // This option reverses the encoder direction for navigating LCD menus.
856
 // This option reverses the encoder direction for navigating LCD menus.
850
 //
857
 //
851
 //  If CLOCKWISE normally moves DOWN this makes it go UP.
858
 //  If CLOCKWISE normally moves DOWN this makes it go UP.

+ 7
- 0
Marlin/example_configurations/Felix/Configuration_DUAL.h Целия файл

844
 //#define ENCODER_STEPS_PER_MENU_ITEM 5
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
 // This option reverses the encoder direction for navigating LCD menus.
854
 // This option reverses the encoder direction for navigating LCD menus.
848
 //
855
 //
849
 //  If CLOCKWISE normally moves DOWN this makes it go UP.
856
 //  If CLOCKWISE normally moves DOWN this makes it go UP.

+ 7
- 0
Marlin/example_configurations/Hephestos/Configuration.h Целия файл

855
 //#define ENCODER_STEPS_PER_MENU_ITEM 5
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
 // This option reverses the encoder direction for navigating LCD menus.
865
 // This option reverses the encoder direction for navigating LCD menus.
859
 //
866
 //
860
 //  If CLOCKWISE normally moves DOWN this makes it go UP.
867
 //  If CLOCKWISE normally moves DOWN this makes it go UP.

+ 7
- 0
Marlin/example_configurations/Hephestos_2/Configuration.h Целия файл

857
 //#define ENCODER_STEPS_PER_MENU_ITEM 5
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
 // This option reverses the encoder direction for navigating LCD menus.
867
 // This option reverses the encoder direction for navigating LCD menus.
861
 //
868
 //
862
 //  If CLOCKWISE normally moves DOWN this makes it go UP.
869
 //  If CLOCKWISE normally moves DOWN this makes it go UP.

+ 7
- 0
Marlin/example_configurations/K8200/Configuration.h Целия файл

880
 //#define ENCODER_STEPS_PER_MENU_ITEM 5
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
 // This option reverses the encoder direction for navigating LCD menus.
890
 // This option reverses the encoder direction for navigating LCD menus.
884
 //
891
 //
885
 //  If CLOCKWISE normally moves DOWN this makes it go UP.
892
 //  If CLOCKWISE normally moves DOWN this makes it go UP.

+ 7
- 0
Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h Целия файл

863
 //#define ENCODER_STEPS_PER_MENU_ITEM 5
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
 // This option reverses the encoder direction for navigating LCD menus.
873
 // This option reverses the encoder direction for navigating LCD menus.
867
 //
874
 //
868
 //  If CLOCKWISE normally moves DOWN this makes it go UP.
875
 //  If CLOCKWISE normally moves DOWN this makes it go UP.

+ 7
- 0
Marlin/example_configurations/RigidBot/Configuration.h Целия файл

858
 //#define ENCODER_STEPS_PER_MENU_ITEM 5
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
 // This option reverses the encoder direction for navigating LCD menus.
868
 // This option reverses the encoder direction for navigating LCD menus.
862
 //
869
 //
863
 //  If CLOCKWISE normally moves DOWN this makes it go UP.
870
 //  If CLOCKWISE normally moves DOWN this makes it go UP.

+ 7
- 0
Marlin/example_configurations/SCARA/Configuration.h Целия файл

871
 //#define ENCODER_STEPS_PER_MENU_ITEM 5
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
 // This option reverses the encoder direction for navigating LCD menus.
881
 // This option reverses the encoder direction for navigating LCD menus.
875
 //
882
 //
876
 //  If CLOCKWISE normally moves DOWN this makes it go UP.
883
 //  If CLOCKWISE normally moves DOWN this makes it go UP.

+ 7
- 0
Marlin/example_configurations/TAZ4/Configuration.h Целия файл

884
 #define ENCODER_STEPS_PER_MENU_ITEM 1
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
 // This option reverses the encoder direction for navigating LCD menus.
894
 // This option reverses the encoder direction for navigating LCD menus.
888
 //
895
 //
889
 //  If CLOCKWISE normally moves DOWN this makes it go UP.
896
 //  If CLOCKWISE normally moves DOWN this makes it go UP.

+ 7
- 0
Marlin/example_configurations/WITBOX/Configuration.h Целия файл

855
 //#define ENCODER_STEPS_PER_MENU_ITEM 5
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
 // This option reverses the encoder direction for navigating LCD menus.
865
 // This option reverses the encoder direction for navigating LCD menus.
859
 //
866
 //
860
 //  If CLOCKWISE normally moves DOWN this makes it go UP.
867
 //  If CLOCKWISE normally moves DOWN this makes it go UP.

+ 7
- 0
Marlin/example_configurations/adafruit/ST7565/Configuration.h Целия файл

863
 //#define ENCODER_STEPS_PER_MENU_ITEM 5
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
 // This option reverses the encoder direction for navigating LCD menus.
873
 // This option reverses the encoder direction for navigating LCD menus.
867
 //
874
 //
868
 //  If CLOCKWISE normally moves DOWN this makes it go UP.
875
 //  If CLOCKWISE normally moves DOWN this makes it go UP.

+ 7
- 0
Marlin/example_configurations/delta/biv2.5/Configuration.h Целия файл

992
 //#define ENCODER_STEPS_PER_MENU_ITEM 5
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
 // This option reverses the encoder direction for navigating LCD menus.
1002
 // This option reverses the encoder direction for navigating LCD menus.
996
 //
1003
 //
997
 //  If CLOCKWISE normally moves DOWN this makes it go UP.
1004
 //  If CLOCKWISE normally moves DOWN this makes it go UP.

+ 7
- 0
Marlin/example_configurations/delta/generic/Configuration.h Целия файл

992
 //#define ENCODER_STEPS_PER_MENU_ITEM 5
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
 // This option reverses the encoder direction for navigating LCD menus.
1002
 // This option reverses the encoder direction for navigating LCD menus.
996
 //
1003
 //
997
 //  If CLOCKWISE normally moves DOWN this makes it go UP.
1004
 //  If CLOCKWISE normally moves DOWN this makes it go UP.

+ 7
- 0
Marlin/example_configurations/delta/kossel_mini/Configuration.h Целия файл

996
 //#define ENCODER_STEPS_PER_MENU_ITEM 5
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
 // This option reverses the encoder direction for navigating LCD menus.
1006
 // This option reverses the encoder direction for navigating LCD menus.
1000
 //
1007
 //
1001
 //  If CLOCKWISE normally moves DOWN this makes it go UP.
1008
 //  If CLOCKWISE normally moves DOWN this makes it go UP.

+ 7
- 0
Marlin/example_configurations/delta/kossel_pro/Configuration.h Целия файл

989
 //#define ENCODER_STEPS_PER_MENU_ITEM 5
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
 // This option reverses the encoder direction for navigating LCD menus.
999
 // This option reverses the encoder direction for navigating LCD menus.
993
 //
1000
 //
994
 //  If CLOCKWISE normally moves DOWN this makes it go UP.
1001
 //  If CLOCKWISE normally moves DOWN this makes it go UP.

+ 7
- 0
Marlin/example_configurations/delta/kossel_xl/Configuration.h Целия файл

997
 //#define ENCODER_STEPS_PER_MENU_ITEM 5
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
 // This option reverses the encoder direction for navigating LCD menus.
1007
 // This option reverses the encoder direction for navigating LCD menus.
1001
 //
1008
 //
1002
 //  If CLOCKWISE normally moves DOWN this makes it go UP.
1009
 //  If CLOCKWISE normally moves DOWN this makes it go UP.

+ 7
- 0
Marlin/example_configurations/makibox/Configuration.h Целия файл

866
 //#define ENCODER_STEPS_PER_MENU_ITEM 5
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
 // This option reverses the encoder direction for navigating LCD menus.
876
 // This option reverses the encoder direction for navigating LCD menus.
870
 //
877
 //
871
 //  If CLOCKWISE normally moves DOWN this makes it go UP.
878
 //  If CLOCKWISE normally moves DOWN this makes it go UP.

+ 7
- 0
Marlin/example_configurations/tvrrug/Round2/Configuration.h Целия файл

857
 //#define ENCODER_STEPS_PER_MENU_ITEM 5
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
 // This option reverses the encoder direction for navigating LCD menus.
867
 // This option reverses the encoder direction for navigating LCD menus.
861
 //
868
 //
862
 //  If CLOCKWISE normally moves DOWN this makes it go UP.
869
 //  If CLOCKWISE normally moves DOWN this makes it go UP.

+ 7
- 1
Marlin/ultralcd.cpp Целия файл

2466
       GET_BUTTON_STATES(buttons);
2466
       GET_BUTTON_STATES(buttons);
2467
     #endif //!NEWPANEL
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
       #define ENCODER_DIFF_CW  (encoderDiff += encoderDirection)
2473
       #define ENCODER_DIFF_CW  (encoderDiff += encoderDirection)
2471
       #define ENCODER_DIFF_CCW (encoderDiff -= encoderDirection)
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
     #else
2478
     #else
2473
       #define ENCODER_DIFF_CW  (encoderDiff++)
2479
       #define ENCODER_DIFF_CW  (encoderDiff++)
2474
       #define ENCODER_DIFF_CCW (encoderDiff--)
2480
       #define ENCODER_DIFF_CCW (encoderDiff--)

Loading…
Отказ
Запис