From b2f8b4ada52c26c70550a8162afe3c706ce4663c Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 8 Feb 2018 03:57:11 -0600 Subject: [PATCH] I2C position encoders update (#9533) Updating I2C position encoders to enable babystepping and Babystep XY when using the ecm microstep correction method. Also changed default method to ECM microstep. --- .travis.yml | 2 +- Marlin/Configuration_adv.h | 6 ++--- Marlin/src/Marlin.cpp | 10 +++----- Marlin/src/config/default/Configuration_adv.h | 6 ++--- .../AlephObjects/TAZ4/Configuration_adv.h | 6 ++--- .../examples/Anet/A6/Configuration_adv.h | 6 ++--- .../examples/Anet/A8/Configuration_adv.h | 6 ++--- .../examples/Azteeg/X5GT/Configuration_adv.h | 6 ++--- .../examples/BIBO/TouchX/Configuration_adv.h | 6 ++--- .../examples/BQ/Hephestos/Configuration_adv.h | 6 ++--- .../BQ/Hephestos_2/Configuration_adv.h | 6 ++--- .../examples/BQ/WITBOX/Configuration_adv.h | 6 ++--- .../examples/Cartesio/Configuration_adv.h | 6 ++--- .../Creality/CR-10/Configuration_adv.h | 6 ++--- .../Creality/CR-10S/Configuration_adv.h | 6 ++--- .../Creality/Ender/Configuration_adv.h | 6 ++--- .../config/examples/Felix/Configuration_adv.h | 6 ++--- .../FolgerTech/i3-2020/Configuration_adv.h | 6 ++--- .../Infitary/i3-M508/Configuration_adv.h | 6 ++--- .../examples/JGAurora/A5/Configuration_adv.h | 6 ++--- .../examples/MakerParts/Configuration_adv.h | 6 ++--- .../examples/Malyan/M150/Configuration_adv.h | 6 ++--- .../examples/Malyan/M200/Configuration_adv.h | 6 ++--- .../Micromake/C1/enhanced/Configuration_adv.h | 6 ++--- .../examples/Mks/Sbase/Configuration_adv.h | 6 ++--- .../examples/RigidBot/Configuration_adv.h | 6 ++--- .../config/examples/SCARA/Configuration_adv.h | 6 ++--- .../examples/Sanguinololu/Configuration_adv.h | 6 ++--- .../examples/TheBorg/Configuration_adv.h | 6 ++--- .../examples/TinyBoy2/Configuration_adv.h | 6 ++--- .../UltiMachine/Archim2/Configuration_adv.h | 6 ++--- .../Velleman/K8200/Configuration_adv.h | 6 ++--- .../Velleman/K8400/Configuration_adv.h | 6 ++--- .../Wanhao/Duplicator 6/Configuration_adv.h | 6 ++--- .../FLSUN/auto_calibrate/Configuration_adv.h | 6 ++--- .../delta/FLSUN/kossel/Configuration_adv.h | 6 ++--- .../FLSUN/kossel_mini/Configuration_adv.h | 6 ++--- .../delta/generic/Configuration_adv.h | 6 ++--- .../delta/kossel_mini/Configuration_adv.h | 6 ++--- .../delta/kossel_pro/Configuration_adv.h | 6 ++--- .../delta/kossel_xl/Configuration_adv.h | 6 ++--- .../gCreate/gMax1.5+/Configuration_adv.h | 6 ++--- .../examples/makibox/Configuration_adv.h | 6 ++--- .../tvrrug/Round2/Configuration_adv.h | 6 ++--- .../config/examples/wt150/Configuration_adv.h | 6 ++--- Marlin/src/feature/I2CPositionEncoder.cpp | 24 ++++++++++++------- Marlin/src/feature/I2CPositionEncoder.h | 6 +++-- Marlin/src/inc/SanityCheck.h | 4 ++-- 48 files changed, 155 insertions(+), 149 deletions(-) diff --git a/.travis.yml b/.travis.yml index ec77fa9a64..f400ca6ecb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -83,7 +83,7 @@ script: - opt_set TEMP_SENSOR_4 999 - opt_set TEMP_SENSOR_BED 1 - opt_enable AUTO_BED_LEVELING_UBL DEBUG_LEVELING_FEATURE G26_MESH_EDITING ENABLE_LEVELING_FADE_HEIGHT EEPROM_SETTINGS EEPROM_CHITCHAT G3D_PANEL SKEW_CORRECTION - - opt_enable_adv CUSTOM_USER_MENUS I2C_POSITION_ENCODERS BABYSTEPPING LIN_ADVANCE NANODLP_Z_SYNC + - opt_enable_adv CUSTOM_USER_MENUS I2C_POSITION_ENCODERS BABYSTEPPING BABYSTEP_XY LIN_ADVANCE NANODLP_Z_SYNC - build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM} # # Add a Sled Z Probe, do non-segmented moves diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index c4d2413779..66f2fbd947 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -1512,7 +1512,7 @@ //#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper // steps per full revolution (motor steps/rev * microstepping) //#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel. - #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_NONE // Type of error error correction. + #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction. #define I2CPE_ENC_1_EC_THRESH 0.10 // Threshold size for error (in mm) above which the // printer will attempt to correct the error; errors // smaller than this are ignored to minimize effects of @@ -1524,7 +1524,7 @@ #define I2CPE_ENC_2_TICKS_UNIT 2048 //#define I2CPE_ENC_2_TICKS_REV (16 * 200) //#define I2CPE_ENC_2_INVERT - #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_NONE + #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP #define I2CPE_ENC_2_EC_THRESH 0.10 #define I2CPE_ENC_3_ADDR I2CPE_PRESET_ADDR_Z // Encoder 3. Add additional configuration options @@ -1556,7 +1556,7 @@ * this setting determines the minimum update time between checks. A value of 100 works well with * error rolling average when attempting to correct only for skips and not for vibration. */ - #define I2CPE_MIN_UPD_TIME_MS 100 // Minimum time in miliseconds between encoder checks. + #define I2CPE_MIN_UPD_TIME_MS 4 // Minimum time in miliseconds between encoder checks. // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise. #define I2CPE_ERR_ROLLING_AVERAGE diff --git a/Marlin/src/Marlin.cpp b/Marlin/src/Marlin.cpp index c42ed29810..177e424f2d 100644 --- a/Marlin/src/Marlin.cpp +++ b/Marlin/src/Marlin.cpp @@ -202,8 +202,6 @@ millis_t max_inactive_time = 0, #if ENABLED(I2C_POSITION_ENCODERS) I2CPositionEncodersMgr I2CPEM; - uint8_t blockBufferIndexRef = 0; - millis_t lastUpdateMillis; #endif /** @@ -549,12 +547,10 @@ void idle( #endif #if ENABLED(I2C_POSITION_ENCODERS) - if (planner.blocks_queued() && - ( (blockBufferIndexRef != planner.block_buffer_head) || - ((lastUpdateMillis + I2CPE_MIN_UPD_TIME_MS) < millis())) ) { - blockBufferIndexRef = planner.block_buffer_head; + static millis_t i2cpem_next_update_ms; + if (planner.blocks_queued() && ELAPSED(millis(), i2cpem_next_update_ms)) { I2CPEM.update(); - lastUpdateMillis = millis(); + i2cpem_next_update_ms = millis() + I2CPE_MIN_UPD_TIME_MS; } #endif diff --git a/Marlin/src/config/default/Configuration_adv.h b/Marlin/src/config/default/Configuration_adv.h index c4d2413779..66f2fbd947 100644 --- a/Marlin/src/config/default/Configuration_adv.h +++ b/Marlin/src/config/default/Configuration_adv.h @@ -1512,7 +1512,7 @@ //#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper // steps per full revolution (motor steps/rev * microstepping) //#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel. - #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_NONE // Type of error error correction. + #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction. #define I2CPE_ENC_1_EC_THRESH 0.10 // Threshold size for error (in mm) above which the // printer will attempt to correct the error; errors // smaller than this are ignored to minimize effects of @@ -1524,7 +1524,7 @@ #define I2CPE_ENC_2_TICKS_UNIT 2048 //#define I2CPE_ENC_2_TICKS_REV (16 * 200) //#define I2CPE_ENC_2_INVERT - #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_NONE + #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP #define I2CPE_ENC_2_EC_THRESH 0.10 #define I2CPE_ENC_3_ADDR I2CPE_PRESET_ADDR_Z // Encoder 3. Add additional configuration options @@ -1556,7 +1556,7 @@ * this setting determines the minimum update time between checks. A value of 100 works well with * error rolling average when attempting to correct only for skips and not for vibration. */ - #define I2CPE_MIN_UPD_TIME_MS 100 // Minimum time in miliseconds between encoder checks. + #define I2CPE_MIN_UPD_TIME_MS 4 // Minimum time in miliseconds between encoder checks. // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise. #define I2CPE_ERR_ROLLING_AVERAGE diff --git a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h index 8dcf63c545..4699172fb3 100644 --- a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h +++ b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h @@ -1512,7 +1512,7 @@ //#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper // steps per full revolution (motor steps/rev * microstepping) //#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel. - #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_NONE // Type of error error correction. + #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction. #define I2CPE_ENC_1_EC_THRESH 0.10 // Threshold size for error (in mm) above which the // printer will attempt to correct the error; errors // smaller than this are ignored to minimize effects of @@ -1524,7 +1524,7 @@ #define I2CPE_ENC_2_TICKS_UNIT 2048 //#define I2CPE_ENC_2_TICKS_REV (16 * 200) //#define I2CPE_ENC_2_INVERT - #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_NONE + #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP #define I2CPE_ENC_2_EC_THRESH 0.10 #define I2CPE_ENC_3_ADDR I2CPE_PRESET_ADDR_Z // Encoder 3. Add additional configuration options @@ -1556,7 +1556,7 @@ * this setting determines the minimum update time between checks. A value of 100 works well with * error rolling average when attempting to correct only for skips and not for vibration. */ - #define I2CPE_MIN_UPD_TIME_MS 100 // Minimum time in miliseconds between encoder checks. + #define I2CPE_MIN_UPD_TIME_MS 4 // Minimum time in miliseconds between encoder checks. // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise. #define I2CPE_ERR_ROLLING_AVERAGE diff --git a/Marlin/src/config/examples/Anet/A6/Configuration_adv.h b/Marlin/src/config/examples/Anet/A6/Configuration_adv.h index 25464f9f3f..50ca29535b 100644 --- a/Marlin/src/config/examples/Anet/A6/Configuration_adv.h +++ b/Marlin/src/config/examples/Anet/A6/Configuration_adv.h @@ -1512,7 +1512,7 @@ //#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper // steps per full revolution (motor steps/rev * microstepping) //#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel. - #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_NONE // Type of error error correction. + #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction. #define I2CPE_ENC_1_EC_THRESH 0.10 // Threshold size for error (in mm) above which the // printer will attempt to correct the error; errors // smaller than this are ignored to minimize effects of @@ -1524,7 +1524,7 @@ #define I2CPE_ENC_2_TICKS_UNIT 2048 //#define I2CPE_ENC_2_TICKS_REV (16 * 200) //#define I2CPE_ENC_2_INVERT - #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_NONE + #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP #define I2CPE_ENC_2_EC_THRESH 0.10 #define I2CPE_ENC_3_ADDR I2CPE_PRESET_ADDR_Z // Encoder 3. Add additional configuration options @@ -1556,7 +1556,7 @@ * this setting determines the minimum update time between checks. A value of 100 works well with * error rolling average when attempting to correct only for skips and not for vibration. */ - #define I2CPE_MIN_UPD_TIME_MS 100 // Minimum time in miliseconds between encoder checks. + #define I2CPE_MIN_UPD_TIME_MS 4 // Minimum time in miliseconds between encoder checks. // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise. #define I2CPE_ERR_ROLLING_AVERAGE diff --git a/Marlin/src/config/examples/Anet/A8/Configuration_adv.h b/Marlin/src/config/examples/Anet/A8/Configuration_adv.h index dff8527806..ca583b21a9 100644 --- a/Marlin/src/config/examples/Anet/A8/Configuration_adv.h +++ b/Marlin/src/config/examples/Anet/A8/Configuration_adv.h @@ -1512,7 +1512,7 @@ //#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper // steps per full revolution (motor steps/rev * microstepping) //#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel. - #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_NONE // Type of error error correction. + #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction. #define I2CPE_ENC_1_EC_THRESH 0.10 // Threshold size for error (in mm) above which the // printer will attempt to correct the error; errors // smaller than this are ignored to minimize effects of @@ -1524,7 +1524,7 @@ #define I2CPE_ENC_2_TICKS_UNIT 2048 //#define I2CPE_ENC_2_TICKS_REV (16 * 200) //#define I2CPE_ENC_2_INVERT - #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_NONE + #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP #define I2CPE_ENC_2_EC_THRESH 0.10 #define I2CPE_ENC_3_ADDR I2CPE_PRESET_ADDR_Z // Encoder 3. Add additional configuration options @@ -1556,7 +1556,7 @@ * this setting determines the minimum update time between checks. A value of 100 works well with * error rolling average when attempting to correct only for skips and not for vibration. */ - #define I2CPE_MIN_UPD_TIME_MS 100 // Minimum time in miliseconds between encoder checks. + #define I2CPE_MIN_UPD_TIME_MS 4 // Minimum time in miliseconds between encoder checks. // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise. #define I2CPE_ERR_ROLLING_AVERAGE diff --git a/Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h b/Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h index d9c942ee16..bcf89cb223 100644 --- a/Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h +++ b/Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h @@ -1513,7 +1513,7 @@ //#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper // steps per full revolution (motor steps/rev * microstepping) //#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel. - #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_NONE // Type of error error correction. + #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction. #define I2CPE_ENC_1_EC_THRESH 0.10 // Threshold size for error (in mm) above which the // printer will attempt to correct the error; errors // smaller than this are ignored to minimize effects of @@ -1525,7 +1525,7 @@ #define I2CPE_ENC_2_TICKS_UNIT 2048 //#define I2CPE_ENC_2_TICKS_REV (16 * 200) //#define I2CPE_ENC_2_INVERT - #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_NONE + #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP #define I2CPE_ENC_2_EC_THRESH 0.10 #define I2CPE_ENC_3_ADDR I2CPE_PRESET_ADDR_Z // Encoder 3. Add additional configuration options @@ -1557,7 +1557,7 @@ * this setting determines the minimum update time between checks. A value of 100 works well with * error rolling average when attempting to correct only for skips and not for vibration. */ - #define I2CPE_MIN_UPD_TIME_MS 100 // Minimum time in miliseconds between encoder checks. + #define I2CPE_MIN_UPD_TIME_MS 4 // Minimum time in miliseconds between encoder checks. // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise. #define I2CPE_ERR_ROLLING_AVERAGE diff --git a/Marlin/src/config/examples/BIBO/TouchX/Configuration_adv.h b/Marlin/src/config/examples/BIBO/TouchX/Configuration_adv.h index cb8ff049bc..0b9669e8d1 100644 --- a/Marlin/src/config/examples/BIBO/TouchX/Configuration_adv.h +++ b/Marlin/src/config/examples/BIBO/TouchX/Configuration_adv.h @@ -1517,7 +1517,7 @@ //#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper // steps per full revolution (motor steps/rev * microstepping) //#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel. - #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_NONE // Type of error error correction. + #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction. #define I2CPE_ENC_1_EC_THRESH 0.10 // Threshold size for error (in mm) above which the // printer will attempt to correct the error; errors // smaller than this are ignored to minimize effects of @@ -1529,7 +1529,7 @@ #define I2CPE_ENC_2_TICKS_UNIT 2048 //#define I2CPE_ENC_2_TICKS_REV (16 * 200) //#define I2CPE_ENC_2_INVERT - #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_NONE + #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP #define I2CPE_ENC_2_EC_THRESH 0.10 #define I2CPE_ENC_3_ADDR I2CPE_PRESET_ADDR_Z // Encoder 3. Add additional configuration options @@ -1561,7 +1561,7 @@ * this setting determines the minimum update time between checks. A value of 100 works well with * error rolling average when attempting to correct only for skips and not for vibration. */ - #define I2CPE_MIN_UPD_TIME_MS 100 // Minimum time in miliseconds between encoder checks. + #define I2CPE_MIN_UPD_TIME_MS 4 // Minimum time in miliseconds between encoder checks. // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise. #define I2CPE_ERR_ROLLING_AVERAGE diff --git a/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h b/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h index f27da5eab1..36ee85d77a 100644 --- a/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h @@ -1512,7 +1512,7 @@ //#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper // steps per full revolution (motor steps/rev * microstepping) //#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel. - #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_NONE // Type of error error correction. + #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction. #define I2CPE_ENC_1_EC_THRESH 0.10 // Threshold size for error (in mm) above which the // printer will attempt to correct the error; errors // smaller than this are ignored to minimize effects of @@ -1524,7 +1524,7 @@ #define I2CPE_ENC_2_TICKS_UNIT 2048 //#define I2CPE_ENC_2_TICKS_REV (16 * 200) //#define I2CPE_ENC_2_INVERT - #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_NONE + #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP #define I2CPE_ENC_2_EC_THRESH 0.10 #define I2CPE_ENC_3_ADDR I2CPE_PRESET_ADDR_Z // Encoder 3. Add additional configuration options @@ -1556,7 +1556,7 @@ * this setting determines the minimum update time between checks. A value of 100 works well with * error rolling average when attempting to correct only for skips and not for vibration. */ - #define I2CPE_MIN_UPD_TIME_MS 100 // Minimum time in miliseconds between encoder checks. + #define I2CPE_MIN_UPD_TIME_MS 4 // Minimum time in miliseconds between encoder checks. // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise. #define I2CPE_ERR_ROLLING_AVERAGE diff --git a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h index 71ff696174..c369dbc748 100644 --- a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h @@ -1512,7 +1512,7 @@ //#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper // steps per full revolution (motor steps/rev * microstepping) //#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel. - #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_NONE // Type of error error correction. + #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction. #define I2CPE_ENC_1_EC_THRESH 0.10 // Threshold size for error (in mm) above which the // printer will attempt to correct the error; errors // smaller than this are ignored to minimize effects of @@ -1524,7 +1524,7 @@ #define I2CPE_ENC_2_TICKS_UNIT 2048 //#define I2CPE_ENC_2_TICKS_REV (16 * 200) //#define I2CPE_ENC_2_INVERT - #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_NONE + #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP #define I2CPE_ENC_2_EC_THRESH 0.10 #define I2CPE_ENC_3_ADDR I2CPE_PRESET_ADDR_Z // Encoder 3. Add additional configuration options @@ -1556,7 +1556,7 @@ * this setting determines the minimum update time between checks. A value of 100 works well with * error rolling average when attempting to correct only for skips and not for vibration. */ - #define I2CPE_MIN_UPD_TIME_MS 100 // Minimum time in miliseconds between encoder checks. + #define I2CPE_MIN_UPD_TIME_MS 4 // Minimum time in miliseconds between encoder checks. // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise. #define I2CPE_ERR_ROLLING_AVERAGE diff --git a/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h b/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h index f27da5eab1..36ee85d77a 100644 --- a/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h @@ -1512,7 +1512,7 @@ //#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper // steps per full revolution (motor steps/rev * microstepping) //#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel. - #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_NONE // Type of error error correction. + #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction. #define I2CPE_ENC_1_EC_THRESH 0.10 // Threshold size for error (in mm) above which the // printer will attempt to correct the error; errors // smaller than this are ignored to minimize effects of @@ -1524,7 +1524,7 @@ #define I2CPE_ENC_2_TICKS_UNIT 2048 //#define I2CPE_ENC_2_TICKS_REV (16 * 200) //#define I2CPE_ENC_2_INVERT - #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_NONE + #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP #define I2CPE_ENC_2_EC_THRESH 0.10 #define I2CPE_ENC_3_ADDR I2CPE_PRESET_ADDR_Z // Encoder 3. Add additional configuration options @@ -1556,7 +1556,7 @@ * this setting determines the minimum update time between checks. A value of 100 works well with * error rolling average when attempting to correct only for skips and not for vibration. */ - #define I2CPE_MIN_UPD_TIME_MS 100 // Minimum time in miliseconds between encoder checks. + #define I2CPE_MIN_UPD_TIME_MS 4 // Minimum time in miliseconds between encoder checks. // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise. #define I2CPE_ERR_ROLLING_AVERAGE diff --git a/Marlin/src/config/examples/Cartesio/Configuration_adv.h b/Marlin/src/config/examples/Cartesio/Configuration_adv.h index ac49be545b..e2eb498757 100644 --- a/Marlin/src/config/examples/Cartesio/Configuration_adv.h +++ b/Marlin/src/config/examples/Cartesio/Configuration_adv.h @@ -1512,7 +1512,7 @@ //#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper // steps per full revolution (motor steps/rev * microstepping) //#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel. - #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_NONE // Type of error error correction. + #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction. #define I2CPE_ENC_1_EC_THRESH 0.10 // Threshold size for error (in mm) above which the // printer will attempt to correct the error; errors // smaller than this are ignored to minimize effects of @@ -1524,7 +1524,7 @@ #define I2CPE_ENC_2_TICKS_UNIT 2048 //#define I2CPE_ENC_2_TICKS_REV (16 * 200) //#define I2CPE_ENC_2_INVERT - #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_NONE + #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP #define I2CPE_ENC_2_EC_THRESH 0.10 #define I2CPE_ENC_3_ADDR I2CPE_PRESET_ADDR_Z // Encoder 3. Add additional configuration options @@ -1556,7 +1556,7 @@ * this setting determines the minimum update time between checks. A value of 100 works well with * error rolling average when attempting to correct only for skips and not for vibration. */ - #define I2CPE_MIN_UPD_TIME_MS 100 // Minimum time in miliseconds between encoder checks. + #define I2CPE_MIN_UPD_TIME_MS 4 // Minimum time in miliseconds between encoder checks. // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise. #define I2CPE_ERR_ROLLING_AVERAGE diff --git a/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h b/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h index 29c5cbcb4a..b16be7213b 100755 --- a/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h @@ -1515,7 +1515,7 @@ //#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper // steps per full revolution (motor steps/rev * microstepping) //#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel. - #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_NONE // Type of error error correction. + #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction. #define I2CPE_ENC_1_EC_THRESH 0.10 // Threshold size for error (in mm) above which the // printer will attempt to correct the error; errors // smaller than this are ignored to minimize effects of @@ -1527,7 +1527,7 @@ #define I2CPE_ENC_2_TICKS_UNIT 2048 //#define I2CPE_ENC_2_TICKS_REV (16 * 200) //#define I2CPE_ENC_2_INVERT - #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_NONE + #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP #define I2CPE_ENC_2_EC_THRESH 0.10 #define I2CPE_ENC_3_ADDR I2CPE_PRESET_ADDR_Z // Encoder 3. Add additional configuration options @@ -1559,7 +1559,7 @@ * this setting determines the minimum update time between checks. A value of 100 works well with * error rolling average when attempting to correct only for skips and not for vibration. */ - #define I2CPE_MIN_UPD_TIME_MS 100 // Minimum time in miliseconds between encoder checks. + #define I2CPE_MIN_UPD_TIME_MS 4 // Minimum time in miliseconds between encoder checks. // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise. #define I2CPE_ERR_ROLLING_AVERAGE diff --git a/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h b/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h index a20bcd0bf1..4522cade6d 100644 --- a/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h @@ -1506,7 +1506,7 @@ //#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper // steps per full revolution (motor steps/rev * microstepping) //#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel. - #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_NONE // Type of error error correction. + #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction. #define I2CPE_ENC_1_EC_THRESH 0.10 // Threshold size for error (in mm) above which the // printer will attempt to correct the error; errors // smaller than this are ignored to minimize effects of @@ -1518,7 +1518,7 @@ #define I2CPE_ENC_2_TICKS_UNIT 2048 //#define I2CPE_ENC_2_TICKS_REV (16 * 200) //#define I2CPE_ENC_2_INVERT - #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_NONE + #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP #define I2CPE_ENC_2_EC_THRESH 0.10 #define I2CPE_ENC_3_ADDR I2CPE_PRESET_ADDR_Z // Encoder 3. Add additional configuration options @@ -1550,7 +1550,7 @@ * this setting determines the minimum update time between checks. A value of 100 works well with * error rolling average when attempting to correct only for skips and not for vibration. */ - #define I2CPE_MIN_UPD_TIME_MS 100 // Minimum time in miliseconds between encoder checks. + #define I2CPE_MIN_UPD_TIME_MS 4 // Minimum time in miliseconds between encoder checks. // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise. #define I2CPE_ERR_ROLLING_AVERAGE diff --git a/Marlin/src/config/examples/Creality/Ender/Configuration_adv.h b/Marlin/src/config/examples/Creality/Ender/Configuration_adv.h index 403fac4c5b..2708331b54 100644 --- a/Marlin/src/config/examples/Creality/Ender/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/Ender/Configuration_adv.h @@ -1506,7 +1506,7 @@ //#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper // steps per full revolution (motor steps/rev * microstepping) //#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel. - #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_NONE // Type of error error correction. + #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction. #define I2CPE_ENC_1_EC_THRESH 0.10 // Threshold size for error (in mm) above which the // printer will attempt to correct the error; errors // smaller than this are ignored to minimize effects of @@ -1518,7 +1518,7 @@ #define I2CPE_ENC_2_TICKS_UNIT 2048 //#define I2CPE_ENC_2_TICKS_REV (16 * 200) //#define I2CPE_ENC_2_INVERT - #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_NONE + #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP #define I2CPE_ENC_2_EC_THRESH 0.10 #define I2CPE_ENC_3_ADDR I2CPE_PRESET_ADDR_Z // Encoder 3. Add additional configuration options @@ -1550,7 +1550,7 @@ * this setting determines the minimum update time between checks. A value of 100 works well with * error rolling average when attempting to correct only for skips and not for vibration. */ - #define I2CPE_MIN_UPD_TIME_MS 100 // Minimum time in miliseconds between encoder checks. + #define I2CPE_MIN_UPD_TIME_MS 4 // Minimum time in miliseconds between encoder checks. // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise. #define I2CPE_ERR_ROLLING_AVERAGE diff --git a/Marlin/src/config/examples/Felix/Configuration_adv.h b/Marlin/src/config/examples/Felix/Configuration_adv.h index 73fd607651..c0115a0a6a 100644 --- a/Marlin/src/config/examples/Felix/Configuration_adv.h +++ b/Marlin/src/config/examples/Felix/Configuration_adv.h @@ -1512,7 +1512,7 @@ //#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper // steps per full revolution (motor steps/rev * microstepping) //#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel. - #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_NONE // Type of error error correction. + #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction. #define I2CPE_ENC_1_EC_THRESH 0.10 // Threshold size for error (in mm) above which the // printer will attempt to correct the error; errors // smaller than this are ignored to minimize effects of @@ -1524,7 +1524,7 @@ #define I2CPE_ENC_2_TICKS_UNIT 2048 //#define I2CPE_ENC_2_TICKS_REV (16 * 200) //#define I2CPE_ENC_2_INVERT - #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_NONE + #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP #define I2CPE_ENC_2_EC_THRESH 0.10 #define I2CPE_ENC_3_ADDR I2CPE_PRESET_ADDR_Z // Encoder 3. Add additional configuration options @@ -1556,7 +1556,7 @@ * this setting determines the minimum update time between checks. A value of 100 works well with * error rolling average when attempting to correct only for skips and not for vibration. */ - #define I2CPE_MIN_UPD_TIME_MS 100 // Minimum time in miliseconds between encoder checks. + #define I2CPE_MIN_UPD_TIME_MS 4 // Minimum time in miliseconds between encoder checks. // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise. #define I2CPE_ERR_ROLLING_AVERAGE diff --git a/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h index 0a50945657..4d7e1a7e22 100644 --- a/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h +++ b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h @@ -1512,7 +1512,7 @@ //#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper // steps per full revolution (motor steps/rev * microstepping) //#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel. - #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_NONE // Type of error error correction. + #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction. #define I2CPE_ENC_1_EC_THRESH 0.10 // Threshold size for error (in mm) above which the // printer will attempt to correct the error; errors // smaller than this are ignored to minimize effects of @@ -1524,7 +1524,7 @@ #define I2CPE_ENC_2_TICKS_UNIT 2048 //#define I2CPE_ENC_2_TICKS_REV (16 * 200) //#define I2CPE_ENC_2_INVERT - #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_NONE + #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP #define I2CPE_ENC_2_EC_THRESH 0.10 #define I2CPE_ENC_3_ADDR I2CPE_PRESET_ADDR_Z // Encoder 3. Add additional configuration options @@ -1556,7 +1556,7 @@ * this setting determines the minimum update time between checks. A value of 100 works well with * error rolling average when attempting to correct only for skips and not for vibration. */ - #define I2CPE_MIN_UPD_TIME_MS 100 // Minimum time in miliseconds between encoder checks. + #define I2CPE_MIN_UPD_TIME_MS 4 // Minimum time in miliseconds between encoder checks. // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise. #define I2CPE_ERR_ROLLING_AVERAGE diff --git a/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h b/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h index 6ccefaa5d2..174c87b497 100644 --- a/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h +++ b/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h @@ -1512,7 +1512,7 @@ //#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper // steps per full revolution (motor steps/rev * microstepping) //#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel. - #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_NONE // Type of error error correction. + #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction. #define I2CPE_ENC_1_EC_THRESH 0.10 // Threshold size for error (in mm) above which the // printer will attempt to correct the error; errors // smaller than this are ignored to minimize effects of @@ -1524,7 +1524,7 @@ #define I2CPE_ENC_2_TICKS_UNIT 2048 //#define I2CPE_ENC_2_TICKS_REV (16 * 200) //#define I2CPE_ENC_2_INVERT - #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_NONE + #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP #define I2CPE_ENC_2_EC_THRESH 0.10 #define I2CPE_ENC_3_ADDR I2CPE_PRESET_ADDR_Z // Encoder 3. Add additional configuration options @@ -1556,7 +1556,7 @@ * this setting determines the minimum update time between checks. A value of 100 works well with * error rolling average when attempting to correct only for skips and not for vibration. */ - #define I2CPE_MIN_UPD_TIME_MS 100 // Minimum time in miliseconds between encoder checks. + #define I2CPE_MIN_UPD_TIME_MS 4 // Minimum time in miliseconds between encoder checks. // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise. #define I2CPE_ERR_ROLLING_AVERAGE diff --git a/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h b/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h index faaf7d38dc..e7b3c9f8ee 100644 --- a/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h +++ b/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h @@ -1506,7 +1506,7 @@ //#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper // steps per full revolution (motor steps/rev * microstepping) //#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel. - #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_NONE // Type of error error correction. + #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction. #define I2CPE_ENC_1_EC_THRESH 0.10 // Threshold size for error (in mm) above which the // printer will attempt to correct the error; errors // smaller than this are ignored to minimize effects of @@ -1518,7 +1518,7 @@ #define I2CPE_ENC_2_TICKS_UNIT 2048 //#define I2CPE_ENC_2_TICKS_REV (16 * 200) //#define I2CPE_ENC_2_INVERT - #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_NONE + #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP #define I2CPE_ENC_2_EC_THRESH 0.10 #define I2CPE_ENC_3_ADDR I2CPE_PRESET_ADDR_Z // Encoder 3. Add additional configuration options @@ -1550,7 +1550,7 @@ * this setting determines the minimum update time between checks. A value of 100 works well with * error rolling average when attempting to correct only for skips and not for vibration. */ - #define I2CPE_MIN_UPD_TIME_MS 100 // Minimum time in miliseconds between encoder checks. + #define I2CPE_MIN_UPD_TIME_MS 4 // Minimum time in miliseconds between encoder checks. // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise. #define I2CPE_ERR_ROLLING_AVERAGE diff --git a/Marlin/src/config/examples/MakerParts/Configuration_adv.h b/Marlin/src/config/examples/MakerParts/Configuration_adv.h index 572ae83aeb..35c24f7318 100644 --- a/Marlin/src/config/examples/MakerParts/Configuration_adv.h +++ b/Marlin/src/config/examples/MakerParts/Configuration_adv.h @@ -1513,7 +1513,7 @@ //#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper // steps per full revolution (motor steps/rev * microstepping) //#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel. - #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_NONE // Type of error error correction. + #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction. #define I2CPE_ENC_1_EC_THRESH 0.10 // Threshold size for error (in mm) above which the // printer will attempt to correct the error; errors // smaller than this are ignored to minimize effects of @@ -1525,7 +1525,7 @@ #define I2CPE_ENC_2_TICKS_UNIT 2048 //#define I2CPE_ENC_2_TICKS_REV (16 * 200) //#define I2CPE_ENC_2_INVERT - #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_NONE + #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP #define I2CPE_ENC_2_EC_THRESH 0.10 #define I2CPE_ENC_3_ADDR I2CPE_PRESET_ADDR_Z // Encoder 3. Add additional configuration options @@ -1557,7 +1557,7 @@ * this setting determines the minimum update time between checks. A value of 100 works well with * error rolling average when attempting to correct only for skips and not for vibration. */ - #define I2CPE_MIN_UPD_TIME_MS 100 // Minimum time in miliseconds between encoder checks. + #define I2CPE_MIN_UPD_TIME_MS 4 // Minimum time in miliseconds between encoder checks. // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise. #define I2CPE_ERR_ROLLING_AVERAGE diff --git a/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h b/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h index 5235c76405..3b0b3943b0 100644 --- a/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h +++ b/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h @@ -1512,7 +1512,7 @@ //#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper // steps per full revolution (motor steps/rev * microstepping) //#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel. - #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_NONE // Type of error error correction. + #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction. #define I2CPE_ENC_1_EC_THRESH 0.10 // Threshold size for error (in mm) above which the // printer will attempt to correct the error; errors // smaller than this are ignored to minimize effects of @@ -1524,7 +1524,7 @@ #define I2CPE_ENC_2_TICKS_UNIT 2048 //#define I2CPE_ENC_2_TICKS_REV (16 * 200) //#define I2CPE_ENC_2_INVERT - #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_NONE + #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP #define I2CPE_ENC_2_EC_THRESH 0.10 #define I2CPE_ENC_3_ADDR I2CPE_PRESET_ADDR_Z // Encoder 3. Add additional configuration options @@ -1556,7 +1556,7 @@ * this setting determines the minimum update time between checks. A value of 100 works well with * error rolling average when attempting to correct only for skips and not for vibration. */ - #define I2CPE_MIN_UPD_TIME_MS 100 // Minimum time in miliseconds between encoder checks. + #define I2CPE_MIN_UPD_TIME_MS 4 // Minimum time in miliseconds between encoder checks. // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise. #define I2CPE_ERR_ROLLING_AVERAGE diff --git a/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h b/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h index 5c4bf303d0..b3ca003136 100644 --- a/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h +++ b/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h @@ -1512,7 +1512,7 @@ //#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper // steps per full revolution (motor steps/rev * microstepping) //#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel. - #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_NONE // Type of error error correction. + #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction. #define I2CPE_ENC_1_EC_THRESH 0.10 // Threshold size for error (in mm) above which the // printer will attempt to correct the error; errors // smaller than this are ignored to minimize effects of @@ -1524,7 +1524,7 @@ #define I2CPE_ENC_2_TICKS_UNIT 2048 //#define I2CPE_ENC_2_TICKS_REV (16 * 200) //#define I2CPE_ENC_2_INVERT - #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_NONE + #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP #define I2CPE_ENC_2_EC_THRESH 0.10 #define I2CPE_ENC_3_ADDR I2CPE_PRESET_ADDR_Z // Encoder 3. Add additional configuration options @@ -1556,7 +1556,7 @@ * this setting determines the minimum update time between checks. A value of 100 works well with * error rolling average when attempting to correct only for skips and not for vibration. */ - #define I2CPE_MIN_UPD_TIME_MS 100 // Minimum time in miliseconds between encoder checks. + #define I2CPE_MIN_UPD_TIME_MS 4 // Minimum time in miliseconds between encoder checks. // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise. #define I2CPE_ERR_ROLLING_AVERAGE diff --git a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h index 16988fea5a..2400feed4a 100644 --- a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h +++ b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h @@ -1512,7 +1512,7 @@ //#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper // steps per full revolution (motor steps/rev * microstepping) //#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel. - #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_NONE // Type of error error correction. + #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction. #define I2CPE_ENC_1_EC_THRESH 0.10 // Threshold size for error (in mm) above which the // printer will attempt to correct the error; errors // smaller than this are ignored to minimize effects of @@ -1524,7 +1524,7 @@ #define I2CPE_ENC_2_TICKS_UNIT 2048 //#define I2CPE_ENC_2_TICKS_REV (16 * 200) //#define I2CPE_ENC_2_INVERT - #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_NONE + #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP #define I2CPE_ENC_2_EC_THRESH 0.10 #define I2CPE_ENC_3_ADDR I2CPE_PRESET_ADDR_Z // Encoder 3. Add additional configuration options @@ -1556,7 +1556,7 @@ * this setting determines the minimum update time between checks. A value of 100 works well with * error rolling average when attempting to correct only for skips and not for vibration. */ - #define I2CPE_MIN_UPD_TIME_MS 100 // Minimum time in miliseconds between encoder checks. + #define I2CPE_MIN_UPD_TIME_MS 4 // Minimum time in miliseconds between encoder checks. // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise. #define I2CPE_ERR_ROLLING_AVERAGE diff --git a/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h b/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h index 107a4787d6..391db7b561 100644 --- a/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h +++ b/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h @@ -1520,7 +1520,7 @@ //#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper // steps per full revolution (motor steps/rev * microstepping) //#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel. - #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_NONE // Type of error error correction. + #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction. #define I2CPE_ENC_1_EC_THRESH 0.10 // Threshold size for error (in mm) above which the // printer will attempt to correct the error; errors // smaller than this are ignored to minimize effects of @@ -1532,7 +1532,7 @@ #define I2CPE_ENC_2_TICKS_UNIT 2048 //#define I2CPE_ENC_2_TICKS_REV (16 * 200) //#define I2CPE_ENC_2_INVERT - #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_NONE + #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP #define I2CPE_ENC_2_EC_THRESH 0.10 #define I2CPE_ENC_3_ADDR I2CPE_PRESET_ADDR_Z // Encoder 3. Add additional configuration options @@ -1564,7 +1564,7 @@ * this setting determines the minimum update time between checks. A value of 100 works well with * error rolling average when attempting to correct only for skips and not for vibration. */ - #define I2CPE_MIN_UPD_TIME_MS 100 // Minimum time in miliseconds between encoder checks. + #define I2CPE_MIN_UPD_TIME_MS 4 // Minimum time in miliseconds between encoder checks. // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise. #define I2CPE_ERR_ROLLING_AVERAGE diff --git a/Marlin/src/config/examples/RigidBot/Configuration_adv.h b/Marlin/src/config/examples/RigidBot/Configuration_adv.h index 10195bd61e..e1db535d2b 100644 --- a/Marlin/src/config/examples/RigidBot/Configuration_adv.h +++ b/Marlin/src/config/examples/RigidBot/Configuration_adv.h @@ -1512,7 +1512,7 @@ //#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper // steps per full revolution (motor steps/rev * microstepping) //#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel. - #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_NONE // Type of error error correction. + #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction. #define I2CPE_ENC_1_EC_THRESH 0.10 // Threshold size for error (in mm) above which the // printer will attempt to correct the error; errors // smaller than this are ignored to minimize effects of @@ -1524,7 +1524,7 @@ #define I2CPE_ENC_2_TICKS_UNIT 2048 //#define I2CPE_ENC_2_TICKS_REV (16 * 200) //#define I2CPE_ENC_2_INVERT - #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_NONE + #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP #define I2CPE_ENC_2_EC_THRESH 0.10 #define I2CPE_ENC_3_ADDR I2CPE_PRESET_ADDR_Z // Encoder 3. Add additional configuration options @@ -1556,7 +1556,7 @@ * this setting determines the minimum update time between checks. A value of 100 works well with * error rolling average when attempting to correct only for skips and not for vibration. */ - #define I2CPE_MIN_UPD_TIME_MS 100 // Minimum time in miliseconds between encoder checks. + #define I2CPE_MIN_UPD_TIME_MS 4 // Minimum time in miliseconds between encoder checks. // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise. #define I2CPE_ERR_ROLLING_AVERAGE diff --git a/Marlin/src/config/examples/SCARA/Configuration_adv.h b/Marlin/src/config/examples/SCARA/Configuration_adv.h index 1c4ea0d3b2..fd654d2803 100644 --- a/Marlin/src/config/examples/SCARA/Configuration_adv.h +++ b/Marlin/src/config/examples/SCARA/Configuration_adv.h @@ -1512,7 +1512,7 @@ //#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper // steps per full revolution (motor steps/rev * microstepping) //#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel. - #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_NONE // Type of error error correction. + #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction. #define I2CPE_ENC_1_EC_THRESH 0.10 // Threshold size for error (in mm) above which the // printer will attempt to correct the error; errors // smaller than this are ignored to minimize effects of @@ -1524,7 +1524,7 @@ #define I2CPE_ENC_2_TICKS_UNIT 2048 //#define I2CPE_ENC_2_TICKS_REV (16 * 200) //#define I2CPE_ENC_2_INVERT - #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_NONE + #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP #define I2CPE_ENC_2_EC_THRESH 0.10 #define I2CPE_ENC_3_ADDR I2CPE_PRESET_ADDR_Z // Encoder 3. Add additional configuration options @@ -1556,7 +1556,7 @@ * this setting determines the minimum update time between checks. A value of 100 works well with * error rolling average when attempting to correct only for skips and not for vibration. */ - #define I2CPE_MIN_UPD_TIME_MS 100 // Minimum time in miliseconds between encoder checks. + #define I2CPE_MIN_UPD_TIME_MS 4 // Minimum time in miliseconds between encoder checks. // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise. #define I2CPE_ERR_ROLLING_AVERAGE diff --git a/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h b/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h index ffb2d4db82..5a0839454a 100644 --- a/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h +++ b/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h @@ -1512,7 +1512,7 @@ //#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper // steps per full revolution (motor steps/rev * microstepping) //#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel. - #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_NONE // Type of error error correction. + #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction. #define I2CPE_ENC_1_EC_THRESH 0.10 // Threshold size for error (in mm) above which the // printer will attempt to correct the error; errors // smaller than this are ignored to minimize effects of @@ -1524,7 +1524,7 @@ #define I2CPE_ENC_2_TICKS_UNIT 2048 //#define I2CPE_ENC_2_TICKS_REV (16 * 200) //#define I2CPE_ENC_2_INVERT - #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_NONE + #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP #define I2CPE_ENC_2_EC_THRESH 0.10 #define I2CPE_ENC_3_ADDR I2CPE_PRESET_ADDR_Z // Encoder 3. Add additional configuration options @@ -1556,7 +1556,7 @@ * this setting determines the minimum update time between checks. A value of 100 works well with * error rolling average when attempting to correct only for skips and not for vibration. */ - #define I2CPE_MIN_UPD_TIME_MS 100 // Minimum time in miliseconds between encoder checks. + #define I2CPE_MIN_UPD_TIME_MS 4 // Minimum time in miliseconds between encoder checks. // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise. #define I2CPE_ERR_ROLLING_AVERAGE diff --git a/Marlin/src/config/examples/TheBorg/Configuration_adv.h b/Marlin/src/config/examples/TheBorg/Configuration_adv.h index 2ad30161b3..e3b72e491f 100644 --- a/Marlin/src/config/examples/TheBorg/Configuration_adv.h +++ b/Marlin/src/config/examples/TheBorg/Configuration_adv.h @@ -1503,7 +1503,7 @@ //#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper // steps per full revolution (motor steps/rev * microstepping) //#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel. - #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_NONE // Type of error error correction. + #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction. #define I2CPE_ENC_1_EC_THRESH 0.10 // Threshold size for error (in mm) above which the // printer will attempt to correct the error; errors // smaller than this are ignored to minimize effects of @@ -1515,7 +1515,7 @@ #define I2CPE_ENC_2_TICKS_UNIT 2048 //#define I2CPE_ENC_2_TICKS_REV (16 * 200) //#define I2CPE_ENC_2_INVERT - #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_NONE + #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP #define I2CPE_ENC_2_EC_THRESH 0.10 #define I2CPE_ENC_3_ADDR I2CPE_PRESET_ADDR_Z // Encoder 3. Add additional configuration options @@ -1547,7 +1547,7 @@ * this setting determines the minimum update time between checks. A value of 100 works well with * error rolling average when attempting to correct only for skips and not for vibration. */ - #define I2CPE_MIN_UPD_TIME_MS 100 // Minimum time in miliseconds between encoder checks. + #define I2CPE_MIN_UPD_TIME_MS 4 // Minimum time in miliseconds between encoder checks. // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise. #define I2CPE_ERR_ROLLING_AVERAGE diff --git a/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h b/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h index 8c6e4c5dba..a84e3864d4 100644 --- a/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h +++ b/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h @@ -1512,7 +1512,7 @@ //#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper // steps per full revolution (motor steps/rev * microstepping) //#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel. - #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_NONE // Type of error error correction. + #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction. #define I2CPE_ENC_1_EC_THRESH 0.10 // Threshold size for error (in mm) above which the // printer will attempt to correct the error; errors // smaller than this are ignored to minimize effects of @@ -1524,7 +1524,7 @@ #define I2CPE_ENC_2_TICKS_UNIT 2048 //#define I2CPE_ENC_2_TICKS_REV (16 * 200) //#define I2CPE_ENC_2_INVERT - #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_NONE + #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP #define I2CPE_ENC_2_EC_THRESH 0.10 #define I2CPE_ENC_3_ADDR I2CPE_PRESET_ADDR_Z // Encoder 3. Add additional configuration options @@ -1556,7 +1556,7 @@ * this setting determines the minimum update time between checks. A value of 100 works well with * error rolling average when attempting to correct only for skips and not for vibration. */ - #define I2CPE_MIN_UPD_TIME_MS 100 // Minimum time in miliseconds between encoder checks. + #define I2CPE_MIN_UPD_TIME_MS 4 // Minimum time in miliseconds between encoder checks. // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise. #define I2CPE_ERR_ROLLING_AVERAGE diff --git a/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h b/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h index b55c447931..dcb8d55086 100644 --- a/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h +++ b/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h @@ -1512,7 +1512,7 @@ //#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper // steps per full revolution (motor steps/rev * microstepping) //#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel. - #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_NONE // Type of error error correction. + #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction. #define I2CPE_ENC_1_EC_THRESH 0.10 // Threshold size for error (in mm) above which the // printer will attempt to correct the error; errors // smaller than this are ignored to minimize effects of @@ -1524,7 +1524,7 @@ #define I2CPE_ENC_2_TICKS_UNIT 2048 //#define I2CPE_ENC_2_TICKS_REV (16 * 200) //#define I2CPE_ENC_2_INVERT - #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_NONE + #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP #define I2CPE_ENC_2_EC_THRESH 0.10 #define I2CPE_ENC_3_ADDR I2CPE_PRESET_ADDR_Z // Encoder 3. Add additional configuration options @@ -1556,7 +1556,7 @@ * this setting determines the minimum update time between checks. A value of 100 works well with * error rolling average when attempting to correct only for skips and not for vibration. */ - #define I2CPE_MIN_UPD_TIME_MS 100 // Minimum time in miliseconds between encoder checks. + #define I2CPE_MIN_UPD_TIME_MS 4 // Minimum time in miliseconds between encoder checks. // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise. #define I2CPE_ERR_ROLLING_AVERAGE diff --git a/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h b/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h index 51c3ab11d8..5c51492456 100644 --- a/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h +++ b/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h @@ -1525,7 +1525,7 @@ //#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper // steps per full revolution (motor steps/rev * microstepping) //#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel. - #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_NONE // Type of error error correction. + #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction. #define I2CPE_ENC_1_EC_THRESH 0.10 // Threshold size for error (in mm) above which the // printer will attempt to correct the error; errors // smaller than this are ignored to minimize effects of @@ -1537,7 +1537,7 @@ #define I2CPE_ENC_2_TICKS_UNIT 2048 //#define I2CPE_ENC_2_TICKS_REV (16 * 200) //#define I2CPE_ENC_2_INVERT - #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_NONE + #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP #define I2CPE_ENC_2_EC_THRESH 0.10 #define I2CPE_ENC_3_ADDR I2CPE_PRESET_ADDR_Z // Encoder 3. Add additional configuration options @@ -1569,7 +1569,7 @@ * this setting determines the minimum update time between checks. A value of 100 works well with * error rolling average when attempting to correct only for skips and not for vibration. */ - #define I2CPE_MIN_UPD_TIME_MS 100 // Minimum time in miliseconds between encoder checks. + #define I2CPE_MIN_UPD_TIME_MS 4 // Minimum time in miliseconds between encoder checks. // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise. #define I2CPE_ERR_ROLLING_AVERAGE diff --git a/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h b/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h index 685b37676b..654167f818 100644 --- a/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h +++ b/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h @@ -1512,7 +1512,7 @@ //#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper // steps per full revolution (motor steps/rev * microstepping) //#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel. - #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_NONE // Type of error error correction. + #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction. #define I2CPE_ENC_1_EC_THRESH 0.10 // Threshold size for error (in mm) above which the // printer will attempt to correct the error; errors // smaller than this are ignored to minimize effects of @@ -1524,7 +1524,7 @@ #define I2CPE_ENC_2_TICKS_UNIT 2048 //#define I2CPE_ENC_2_TICKS_REV (16 * 200) //#define I2CPE_ENC_2_INVERT - #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_NONE + #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP #define I2CPE_ENC_2_EC_THRESH 0.10 #define I2CPE_ENC_3_ADDR I2CPE_PRESET_ADDR_Z // Encoder 3. Add additional configuration options @@ -1556,7 +1556,7 @@ * this setting determines the minimum update time between checks. A value of 100 works well with * error rolling average when attempting to correct only for skips and not for vibration. */ - #define I2CPE_MIN_UPD_TIME_MS 100 // Minimum time in miliseconds between encoder checks. + #define I2CPE_MIN_UPD_TIME_MS 4 // Minimum time in miliseconds between encoder checks. // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise. #define I2CPE_ERR_ROLLING_AVERAGE diff --git a/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h b/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h index e73fb18dc2..ffe9192f71 100644 --- a/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h +++ b/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h @@ -1514,7 +1514,7 @@ //#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper // steps per full revolution (motor steps/rev * microstepping) //#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel. - #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_NONE // Type of error error correction. + #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction. #define I2CPE_ENC_1_EC_THRESH 0.10 // Threshold size for error (in mm) above which the // printer will attempt to correct the error; errors // smaller than this are ignored to minimize effects of @@ -1526,7 +1526,7 @@ #define I2CPE_ENC_2_TICKS_UNIT 2048 //#define I2CPE_ENC_2_TICKS_REV (16 * 200) //#define I2CPE_ENC_2_INVERT - #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_NONE + #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP #define I2CPE_ENC_2_EC_THRESH 0.10 #define I2CPE_ENC_3_ADDR I2CPE_PRESET_ADDR_Z // Encoder 3. Add additional configuration options @@ -1558,7 +1558,7 @@ * this setting determines the minimum update time between checks. A value of 100 works well with * error rolling average when attempting to correct only for skips and not for vibration. */ - #define I2CPE_MIN_UPD_TIME_MS 100 // Minimum time in miliseconds between encoder checks. + #define I2CPE_MIN_UPD_TIME_MS 4 // Minimum time in miliseconds between encoder checks. // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise. #define I2CPE_ERR_ROLLING_AVERAGE diff --git a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h index 506d55ff90..2d8bc0592e 100644 --- a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h @@ -1514,7 +1514,7 @@ //#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper // steps per full revolution (motor steps/rev * microstepping) //#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel. - #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_NONE // Type of error error correction. + #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction. #define I2CPE_ENC_1_EC_THRESH 0.10 // Threshold size for error (in mm) above which the // printer will attempt to correct the error; errors // smaller than this are ignored to minimize effects of @@ -1526,7 +1526,7 @@ #define I2CPE_ENC_2_TICKS_UNIT 2048 //#define I2CPE_ENC_2_TICKS_REV (16 * 200) //#define I2CPE_ENC_2_INVERT - #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_NONE + #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP #define I2CPE_ENC_2_EC_THRESH 0.10 #define I2CPE_ENC_3_ADDR I2CPE_PRESET_ADDR_Z // Encoder 3. Add additional configuration options @@ -1558,7 +1558,7 @@ * this setting determines the minimum update time between checks. A value of 100 works well with * error rolling average when attempting to correct only for skips and not for vibration. */ - #define I2CPE_MIN_UPD_TIME_MS 100 // Minimum time in miliseconds between encoder checks. + #define I2CPE_MIN_UPD_TIME_MS 4 // Minimum time in miliseconds between encoder checks. // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise. #define I2CPE_ERR_ROLLING_AVERAGE diff --git a/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h b/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h index 3243c7d1ba..fcf0e267e4 100644 --- a/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h @@ -1508,7 +1508,7 @@ //#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper // steps per full revolution (motor steps/rev * microstepping) //#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel. - #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_NONE // Type of error error correction. + #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction. #define I2CPE_ENC_1_EC_THRESH 0.10 // Threshold size for error (in mm) above which the // printer will attempt to correct the error; errors // smaller than this are ignored to minimize effects of @@ -1520,7 +1520,7 @@ #define I2CPE_ENC_2_TICKS_UNIT 2048 //#define I2CPE_ENC_2_TICKS_REV (16 * 200) //#define I2CPE_ENC_2_INVERT - #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_NONE + #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP #define I2CPE_ENC_2_EC_THRESH 0.10 #define I2CPE_ENC_3_ADDR I2CPE_PRESET_ADDR_Z // Encoder 3. Add additional configuration options @@ -1552,7 +1552,7 @@ * this setting determines the minimum update time between checks. A value of 100 works well with * error rolling average when attempting to correct only for skips and not for vibration. */ - #define I2CPE_MIN_UPD_TIME_MS 100 // Minimum time in miliseconds between encoder checks. + #define I2CPE_MIN_UPD_TIME_MS 4 // Minimum time in miliseconds between encoder checks. // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise. #define I2CPE_ERR_ROLLING_AVERAGE diff --git a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h index 5ab045749a..734432e907 100644 --- a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h @@ -1514,7 +1514,7 @@ //#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper // steps per full revolution (motor steps/rev * microstepping) //#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel. - #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_NONE // Type of error error correction. + #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction. #define I2CPE_ENC_1_EC_THRESH 0.10 // Threshold size for error (in mm) above which the // printer will attempt to correct the error; errors // smaller than this are ignored to minimize effects of @@ -1526,7 +1526,7 @@ #define I2CPE_ENC_2_TICKS_UNIT 2048 //#define I2CPE_ENC_2_TICKS_REV (16 * 200) //#define I2CPE_ENC_2_INVERT - #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_NONE + #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP #define I2CPE_ENC_2_EC_THRESH 0.10 #define I2CPE_ENC_3_ADDR I2CPE_PRESET_ADDR_Z // Encoder 3. Add additional configuration options @@ -1558,7 +1558,7 @@ * this setting determines the minimum update time between checks. A value of 100 works well with * error rolling average when attempting to correct only for skips and not for vibration. */ - #define I2CPE_MIN_UPD_TIME_MS 100 // Minimum time in miliseconds between encoder checks. + #define I2CPE_MIN_UPD_TIME_MS 4 // Minimum time in miliseconds between encoder checks. // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise. #define I2CPE_ERR_ROLLING_AVERAGE diff --git a/Marlin/src/config/examples/delta/generic/Configuration_adv.h b/Marlin/src/config/examples/delta/generic/Configuration_adv.h index 5ab045749a..734432e907 100644 --- a/Marlin/src/config/examples/delta/generic/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/generic/Configuration_adv.h @@ -1514,7 +1514,7 @@ //#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper // steps per full revolution (motor steps/rev * microstepping) //#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel. - #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_NONE // Type of error error correction. + #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction. #define I2CPE_ENC_1_EC_THRESH 0.10 // Threshold size for error (in mm) above which the // printer will attempt to correct the error; errors // smaller than this are ignored to minimize effects of @@ -1526,7 +1526,7 @@ #define I2CPE_ENC_2_TICKS_UNIT 2048 //#define I2CPE_ENC_2_TICKS_REV (16 * 200) //#define I2CPE_ENC_2_INVERT - #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_NONE + #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP #define I2CPE_ENC_2_EC_THRESH 0.10 #define I2CPE_ENC_3_ADDR I2CPE_PRESET_ADDR_Z // Encoder 3. Add additional configuration options @@ -1558,7 +1558,7 @@ * this setting determines the minimum update time between checks. A value of 100 works well with * error rolling average when attempting to correct only for skips and not for vibration. */ - #define I2CPE_MIN_UPD_TIME_MS 100 // Minimum time in miliseconds between encoder checks. + #define I2CPE_MIN_UPD_TIME_MS 4 // Minimum time in miliseconds between encoder checks. // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise. #define I2CPE_ERR_ROLLING_AVERAGE diff --git a/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h b/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h index 5ab045749a..734432e907 100644 --- a/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h @@ -1514,7 +1514,7 @@ //#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper // steps per full revolution (motor steps/rev * microstepping) //#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel. - #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_NONE // Type of error error correction. + #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction. #define I2CPE_ENC_1_EC_THRESH 0.10 // Threshold size for error (in mm) above which the // printer will attempt to correct the error; errors // smaller than this are ignored to minimize effects of @@ -1526,7 +1526,7 @@ #define I2CPE_ENC_2_TICKS_UNIT 2048 //#define I2CPE_ENC_2_TICKS_REV (16 * 200) //#define I2CPE_ENC_2_INVERT - #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_NONE + #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP #define I2CPE_ENC_2_EC_THRESH 0.10 #define I2CPE_ENC_3_ADDR I2CPE_PRESET_ADDR_Z // Encoder 3. Add additional configuration options @@ -1558,7 +1558,7 @@ * this setting determines the minimum update time between checks. A value of 100 works well with * error rolling average when attempting to correct only for skips and not for vibration. */ - #define I2CPE_MIN_UPD_TIME_MS 100 // Minimum time in miliseconds between encoder checks. + #define I2CPE_MIN_UPD_TIME_MS 4 // Minimum time in miliseconds between encoder checks. // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise. #define I2CPE_ERR_ROLLING_AVERAGE diff --git a/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h b/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h index 1454beb949..a1482367e1 100644 --- a/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h @@ -1519,7 +1519,7 @@ //#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper // steps per full revolution (motor steps/rev * microstepping) //#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel. - #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_NONE // Type of error error correction. + #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction. #define I2CPE_ENC_1_EC_THRESH 0.10 // Threshold size for error (in mm) above which the // printer will attempt to correct the error; errors // smaller than this are ignored to minimize effects of @@ -1531,7 +1531,7 @@ #define I2CPE_ENC_2_TICKS_UNIT 2048 //#define I2CPE_ENC_2_TICKS_REV (16 * 200) //#define I2CPE_ENC_2_INVERT - #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_NONE + #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP #define I2CPE_ENC_2_EC_THRESH 0.10 #define I2CPE_ENC_3_ADDR I2CPE_PRESET_ADDR_Z // Encoder 3. Add additional configuration options @@ -1563,7 +1563,7 @@ * this setting determines the minimum update time between checks. A value of 100 works well with * error rolling average when attempting to correct only for skips and not for vibration. */ - #define I2CPE_MIN_UPD_TIME_MS 100 // Minimum time in miliseconds between encoder checks. + #define I2CPE_MIN_UPD_TIME_MS 4 // Minimum time in miliseconds between encoder checks. // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise. #define I2CPE_ERR_ROLLING_AVERAGE diff --git a/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h b/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h index 6140077c74..4048950be9 100644 --- a/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h @@ -1514,7 +1514,7 @@ //#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper // steps per full revolution (motor steps/rev * microstepping) //#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel. - #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_NONE // Type of error error correction. + #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction. #define I2CPE_ENC_1_EC_THRESH 0.10 // Threshold size for error (in mm) above which the // printer will attempt to correct the error; errors // smaller than this are ignored to minimize effects of @@ -1526,7 +1526,7 @@ #define I2CPE_ENC_2_TICKS_UNIT 2048 //#define I2CPE_ENC_2_TICKS_REV (16 * 200) //#define I2CPE_ENC_2_INVERT - #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_NONE + #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP #define I2CPE_ENC_2_EC_THRESH 0.10 #define I2CPE_ENC_3_ADDR I2CPE_PRESET_ADDR_Z // Encoder 3. Add additional configuration options @@ -1558,7 +1558,7 @@ * this setting determines the minimum update time between checks. A value of 100 works well with * error rolling average when attempting to correct only for skips and not for vibration. */ - #define I2CPE_MIN_UPD_TIME_MS 100 // Minimum time in miliseconds between encoder checks. + #define I2CPE_MIN_UPD_TIME_MS 4 // Minimum time in miliseconds between encoder checks. // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise. #define I2CPE_ERR_ROLLING_AVERAGE diff --git a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h index 32a40a8a0f..085efd064f 100644 --- a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h +++ b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h @@ -1512,7 +1512,7 @@ //#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper // steps per full revolution (motor steps/rev * microstepping) //#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel. - #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_NONE // Type of error error correction. + #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction. #define I2CPE_ENC_1_EC_THRESH 0.10 // Threshold size for error (in mm) above which the // printer will attempt to correct the error; errors // smaller than this are ignored to minimize effects of @@ -1524,7 +1524,7 @@ #define I2CPE_ENC_2_TICKS_UNIT 2048 //#define I2CPE_ENC_2_TICKS_REV (16 * 200) //#define I2CPE_ENC_2_INVERT - #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_NONE + #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP #define I2CPE_ENC_2_EC_THRESH 0.10 #define I2CPE_ENC_3_ADDR I2CPE_PRESET_ADDR_Z // Encoder 3. Add additional configuration options @@ -1556,7 +1556,7 @@ * this setting determines the minimum update time between checks. A value of 100 works well with * error rolling average when attempting to correct only for skips and not for vibration. */ - #define I2CPE_MIN_UPD_TIME_MS 100 // Minimum time in miliseconds between encoder checks. + #define I2CPE_MIN_UPD_TIME_MS 4 // Minimum time in miliseconds between encoder checks. // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise. #define I2CPE_ERR_ROLLING_AVERAGE diff --git a/Marlin/src/config/examples/makibox/Configuration_adv.h b/Marlin/src/config/examples/makibox/Configuration_adv.h index 1af6c0a1cd..f4c86ad618 100644 --- a/Marlin/src/config/examples/makibox/Configuration_adv.h +++ b/Marlin/src/config/examples/makibox/Configuration_adv.h @@ -1512,7 +1512,7 @@ //#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper // steps per full revolution (motor steps/rev * microstepping) //#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel. - #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_NONE // Type of error error correction. + #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction. #define I2CPE_ENC_1_EC_THRESH 0.10 // Threshold size for error (in mm) above which the // printer will attempt to correct the error; errors // smaller than this are ignored to minimize effects of @@ -1524,7 +1524,7 @@ #define I2CPE_ENC_2_TICKS_UNIT 2048 //#define I2CPE_ENC_2_TICKS_REV (16 * 200) //#define I2CPE_ENC_2_INVERT - #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_NONE + #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP #define I2CPE_ENC_2_EC_THRESH 0.10 #define I2CPE_ENC_3_ADDR I2CPE_PRESET_ADDR_Z // Encoder 3. Add additional configuration options @@ -1556,7 +1556,7 @@ * this setting determines the minimum update time between checks. A value of 100 works well with * error rolling average when attempting to correct only for skips and not for vibration. */ - #define I2CPE_MIN_UPD_TIME_MS 100 // Minimum time in miliseconds between encoder checks. + #define I2CPE_MIN_UPD_TIME_MS 4 // Minimum time in miliseconds between encoder checks. // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise. #define I2CPE_ERR_ROLLING_AVERAGE diff --git a/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h b/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h index 4c3a61b0cd..6065e60e07 100644 --- a/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h +++ b/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h @@ -1512,7 +1512,7 @@ //#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper // steps per full revolution (motor steps/rev * microstepping) //#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel. - #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_NONE // Type of error error correction. + #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction. #define I2CPE_ENC_1_EC_THRESH 0.10 // Threshold size for error (in mm) above which the // printer will attempt to correct the error; errors // smaller than this are ignored to minimize effects of @@ -1524,7 +1524,7 @@ #define I2CPE_ENC_2_TICKS_UNIT 2048 //#define I2CPE_ENC_2_TICKS_REV (16 * 200) //#define I2CPE_ENC_2_INVERT - #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_NONE + #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP #define I2CPE_ENC_2_EC_THRESH 0.10 #define I2CPE_ENC_3_ADDR I2CPE_PRESET_ADDR_Z // Encoder 3. Add additional configuration options @@ -1556,7 +1556,7 @@ * this setting determines the minimum update time between checks. A value of 100 works well with * error rolling average when attempting to correct only for skips and not for vibration. */ - #define I2CPE_MIN_UPD_TIME_MS 100 // Minimum time in miliseconds between encoder checks. + #define I2CPE_MIN_UPD_TIME_MS 4 // Minimum time in miliseconds between encoder checks. // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise. #define I2CPE_ERR_ROLLING_AVERAGE diff --git a/Marlin/src/config/examples/wt150/Configuration_adv.h b/Marlin/src/config/examples/wt150/Configuration_adv.h index cf007a40c8..5589ce8018 100644 --- a/Marlin/src/config/examples/wt150/Configuration_adv.h +++ b/Marlin/src/config/examples/wt150/Configuration_adv.h @@ -1513,7 +1513,7 @@ //#define I2CPE_ENC_1_TICKS_REV (16 * 200) // Only needed for rotary encoders; number of stepper // steps per full revolution (motor steps/rev * microstepping) //#define I2CPE_ENC_1_INVERT // Invert the direction of axis travel. - #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_NONE // Type of error error correction. + #define I2CPE_ENC_1_EC_METHOD I2CPE_ECM_MICROSTEP // Type of error error correction. #define I2CPE_ENC_1_EC_THRESH 0.10 // Threshold size for error (in mm) above which the // printer will attempt to correct the error; errors // smaller than this are ignored to minimize effects of @@ -1525,7 +1525,7 @@ #define I2CPE_ENC_2_TICKS_UNIT 2048 //#define I2CPE_ENC_2_TICKS_REV (16 * 200) //#define I2CPE_ENC_2_INVERT - #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_NONE + #define I2CPE_ENC_2_EC_METHOD I2CPE_ECM_MICROSTEP #define I2CPE_ENC_2_EC_THRESH 0.10 #define I2CPE_ENC_3_ADDR I2CPE_PRESET_ADDR_Z // Encoder 3. Add additional configuration options @@ -1557,7 +1557,7 @@ * this setting determines the minimum update time between checks. A value of 100 works well with * error rolling average when attempting to correct only for skips and not for vibration. */ - #define I2CPE_MIN_UPD_TIME_MS 100 // Minimum time in miliseconds between encoder checks. + #define I2CPE_MIN_UPD_TIME_MS 4 // Minimum time in miliseconds between encoder checks. // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise. #define I2CPE_ERR_ROLLING_AVERAGE diff --git a/Marlin/src/feature/I2CPositionEncoder.cpp b/Marlin/src/feature/I2CPositionEncoder.cpp index 1876e587ce..86ce1f1abe 100644 --- a/Marlin/src/feature/I2CPositionEncoder.cpp +++ b/Marlin/src/feature/I2CPositionEncoder.cpp @@ -173,22 +173,30 @@ void I2CPositionEncoder::update() { #if ENABLED(I2CPE_ERR_ROLLING_AVERAGE) if (errIdx == 0) { - // in order to correct for "error" but avoid correcting for noise and non skips + // In order to correct for "error" but avoid correcting for noise and non-skips // it must be > threshold and have a difference average of < 10 and be < 2000 steps if (labs(error) > threshold * planner.axis_steps_per_mm[encoderAxis] && - diffSum < 10 * (I2CPE_ERR_ARRAY_SIZE - 1) && labs(error) < 2000) { //Check for persistent error (skip) - SERIAL_ECHO(axis_codes[encoderAxis]); - SERIAL_ECHOPAIR(" diffSum: ", diffSum / (I2CPE_ERR_ARRAY_SIZE - 1)); - SERIAL_ECHOPAIR(" - err detected: ", error / planner.axis_steps_per_mm[encoderAxis]); - SERIAL_ECHOLNPGM("mm; correcting!"); - thermalManager.babystepsTodo[encoderAxis] = -LROUND(error); + diffSum < 10 * (I2CPE_ERR_ARRAY_SIZE - 1) && labs(error) < 2000) { // Check for persistent error (skip) + errPrst[errPrstIdx++] = error; // Error must persist for I2CPE_ERR_PRST_ARRAY_SIZE error cycles. This also serves to improve the average accuracy + if (errPrstIdx >= I2CPE_ERR_PRST_ARRAY_SIZE) { + float sumP = 0; + LOOP_L_N(i, I2CPE_ERR_PRST_ARRAY_SIZE) sumP += errPrst[i]; + const int32_t errorP = int32_t(sumP * (1.0 / (I2CPE_ERR_PRST_ARRAY_SIZE))); + SERIAL_ECHO(axis_codes[encoderAxis]); + SERIAL_ECHOPAIR(" - err detected: ", errorP * planner.steps_to_mm[encoderAxis]); + SERIAL_ECHOLNPGM("mm; correcting!"); + thermalManager.babystepsTodo[encoderAxis] = -LROUND(errorP); + errPrstIdx = 0; + } } + else + errPrstIdx = 0; } #else if (labs(error) > threshold * planner.axis_steps_per_mm[encoderAxis]) { //SERIAL_ECHOLN(error); //SERIAL_ECHOLN(position); - thermalManager.babystepsTodo[encoderAxis] = -LROUND(error/2); + thermalManager.babystepsTodo[encoderAxis] = -LROUND(error / 2); } #endif diff --git a/Marlin/src/feature/I2CPositionEncoder.h b/Marlin/src/feature/I2CPositionEncoder.h index 745486a1f1..4ed5c78836 100644 --- a/Marlin/src/feature/I2CPositionEncoder.h +++ b/Marlin/src/feature/I2CPositionEncoder.h @@ -75,6 +75,7 @@ #if ENABLED(I2CPE_ERR_ROLLING_AVERAGE) #define I2CPE_ERR_ARRAY_SIZE 32 + #define I2CPE_ERR_PRST_ARRAY_SIZE 10 #endif // Error Correction Methods @@ -135,8 +136,9 @@ class I2CPositionEncoder { //double positionMm; //calculate #if ENABLED(I2CPE_ERR_ROLLING_AVERAGE) - uint8_t errIdx = 0; - int err[I2CPE_ERR_ARRAY_SIZE] = { 0 }; + uint8_t errIdx = 0, errPrstIdx = 0; + int err[I2CPE_ERR_ARRAY_SIZE] = { 0 }, + errPrst[I2CPE_ERR_PRST_ARRAY_SIZE] = { 0 }; #endif //float positionMm; //calculate diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index a669b40c3f..e4cb5b7c7f 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -367,8 +367,8 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE && Y_MAX_LENGTH >= Y_BED_SIZE, * I2C Position Encoders */ #if ENABLED(I2C_POSITION_ENCODERS) - #if DISABLED(BABYSTEPPING) - #error "I2C_POSITION_ENCODERS requires BABYSTEPPING." + #if DISABLED(BABYSTEPPING) || DISABLED(BABYSTEP_XY) + #error "I2C_POSITION_ENCODERS requires BABYSTEPPING and BABYSTEP_XY." #elif !WITHIN(I2CPE_ENCODER_CNT, 1, 5) #error "I2CPE_ENCODER_CNT must be between 1 and 5." #endif