Tweaky followup to I2CPEM update

This commit is contained in:
Scott Lahteine 2018-02-08 03:21:46 -06:00 committed by GitHub
parent bdbd15e6d9
commit c1a3ec1228
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -713,7 +713,6 @@ static bool send_ok[BUFSIZE];
#if ENABLED(I2C_POSITION_ENCODERS)
I2CPositionEncodersMgr I2CPEM;
millis_t i2cpem_next_update_ms;
#endif
#if ENABLED(CNC_WORKSPACE_PLANES)
@ -13563,6 +13562,7 @@ void idle(
#endif
#if ENABLED(I2C_POSITION_ENCODERS)
static millis_t i2cpem_next_update_ms;
if (planner.blocks_queued() && ELAPSED(millis(), i2cpem_next_update_ms)) {
I2CPEM.update();
i2cpem_next_update_ms = millis() + I2CPE_MIN_UPD_TIME_MS;