From c1a3ec1228e4661e0d960b3ac6a0bb087bffaf45 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 8 Feb 2018 03:21:46 -0600 Subject: [PATCH] Tweaky followup to I2CPEM update --- Marlin/Marlin_main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index ec5ed45ee1..1cce7192e1 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -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;