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.
This commit is contained in:
parent
93af0365e8
commit
b2f8b4ada5
48 changed files with 155 additions and 149 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
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(" diffSum: ", diffSum / (I2CPE_ERR_ARRAY_SIZE - 1));
|
||||
SERIAL_ECHOPAIR(" - err detected: ", error / planner.axis_steps_per_mm[encoderAxis]);
|
||||
SERIAL_ECHOPAIR(" - err detected: ", errorP * planner.steps_to_mm[encoderAxis]);
|
||||
SERIAL_ECHOLNPGM("mm; correcting!");
|
||||
thermalManager.babystepsTodo[encoderAxis] = -LROUND(error);
|
||||
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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Reference in a new issue