Browse Source

✨ Encoder Noise Filter (#24538)

Keith Bennett 2 years ago
parent
commit
f4b6870ad1
No account linked to committer's email address
3 changed files with 12 additions and 6 deletions
  1. 10
    0
      Marlin/Configuration.h
  2. 1
    5
      Marlin/src/lcd/marlinui.h
  3. 1
    1
      buildroot/tests/mega2560

+ 10
- 0
Marlin/Configuration.h View File

2468
 //#define REVERSE_SELECT_DIRECTION
2468
 //#define REVERSE_SELECT_DIRECTION
2469
 
2469
 
2470
 //
2470
 //
2471
+// Encoder EMI Noise Filter
2472
+//
2473
+// This option increases encoder samples to filter out phantom encoder clicks caused by EMI noise.
2474
+//
2475
+//#define ENCODER_NOISE_FILTER
2476
+#if ENABLED(ENCODER_NOISE_FILTER)
2477
+  #define ENCODER_SAMPLES 10
2478
+#endif
2479
+
2480
+//
2471
 // Individual Axis Homing
2481
 // Individual Axis Homing
2472
 //
2482
 //
2473
 // Add individual axis homing items (Home X, Home Y, and Home Z) to the LCD menu.
2483
 // Add individual axis homing items (Home X, Home Y, and Home Z) to the LCD menu.

+ 1
- 5
Marlin/src/lcd/marlinui.h View File

694
 
694
 
695
     static void update_buttons();
695
     static void update_buttons();
696
 
696
 
697
-    #if HAS_ENCODER_NOISE
698
-      #ifndef ENCODER_SAMPLES
699
-        #define ENCODER_SAMPLES 10
700
-      #endif
701
-
697
+    #if ENABLED(ENCODER_NOISE_FILTER)
702
       /**
698
       /**
703
        * Some printers may have issues with EMI noise especially using a motherboard with 3.3V logic levels
699
        * Some printers may have issues with EMI noise especially using a motherboard with 3.3V logic levels
704
        * it may cause the logical LOW to float into the undefined region and register as a logical HIGH
700
        * it may cause the logical LOW to float into the undefined region and register as a logical HIGH

+ 1
- 1
buildroot/tests/mega2560 View File

32
            EEPROM_SETTINGS EEPROM_CHITCHAT GCODE_MACROS CUSTOM_MENU_MAIN FREEZE_FEATURE CANCEL_OBJECTS SOUND_MENU_ITEM \
32
            EEPROM_SETTINGS EEPROM_CHITCHAT GCODE_MACROS CUSTOM_MENU_MAIN FREEZE_FEATURE CANCEL_OBJECTS SOUND_MENU_ITEM \
33
            MULTI_NOZZLE_DUPLICATION CLASSIC_JERK LIN_ADVANCE EXTRA_LIN_ADVANCE_K QUICK_HOME \
33
            MULTI_NOZZLE_DUPLICATION CLASSIC_JERK LIN_ADVANCE EXTRA_LIN_ADVANCE_K QUICK_HOME \
34
            LCD_SET_PROGRESS_MANUALLY PRINT_PROGRESS_SHOW_DECIMALS SHOW_REMAINING_TIME \
34
            LCD_SET_PROGRESS_MANUALLY PRINT_PROGRESS_SHOW_DECIMALS SHOW_REMAINING_TIME \
35
-           BABYSTEPPING BABYSTEP_XY NANODLP_Z_SYNC I2C_POSITION_ENCODERS M114_DETAIL
35
+           ENCODER_NOISE_FILTER BABYSTEPPING BABYSTEP_XY NANODLP_Z_SYNC I2C_POSITION_ENCODERS M114_DETAIL
36
 exec_test $1 $2 "Azteeg X3 Pro | EXTRUDERS 5 | RRDFGSC | UBL | LIN_ADVANCE ..." "$3"
36
 exec_test $1 $2 "Azteeg X3 Pro | EXTRUDERS 5 | RRDFGSC | UBL | LIN_ADVANCE ..." "$3"
37
 
37
 
38
 #
38
 #

Loading…
Cancel
Save