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:
Scott Lahteine
2018-02-08 03:57:11 -06:00
committed by GitHub
parent 93af0365e8
commit b2f8b4ada5
48 changed files with 155 additions and 149 deletions

View File

@@ -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