Replace double with float, optimize calculation
This commit is contained in:
@@ -133,16 +133,12 @@ class I2CPositionEncoder {
|
||||
nextErrorCountTime = 0,
|
||||
lastErrorTime;
|
||||
|
||||
//double positionMm; //calculate
|
||||
|
||||
#if ENABLED(I2CPE_ERR_ROLLING_AVERAGE)
|
||||
uint8_t errIdx = 0, errPrstIdx = 0;
|
||||
int err[I2CPE_ERR_ARRAY_SIZE] = { 0 },
|
||||
errPrst[I2CPE_ERR_PRST_ARRAY_SIZE] = { 0 };
|
||||
#endif
|
||||
|
||||
//float positionMm; //calculate
|
||||
|
||||
public:
|
||||
void init(const uint8_t address, const AxisEnum axis);
|
||||
void reset();
|
||||
|
||||
Reference in New Issue
Block a user