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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user