From 07298ac992098d6fd9979c14d4bdffcd430ed562 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 21 Jun 2016 14:58:42 -0700 Subject: [PATCH] Initialize current_position to home_offset on boot --- Marlin/Marlin_main.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index ad83f42ea1..756ff7cc3a 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -861,13 +861,16 @@ void setup() { // loads data from EEPROM if available else uses defaults (and resets step acceleration rate) Config_RetrieveSettings(); - thermalManager.init(); // Initialize temperature loop + // Initialize current position based on home_offset + memcpy(current_position, home_offset, sizeof(home_offset)); #if ENABLED(DELTA) || ENABLED(SCARA) // Vital to init kinematic equivalent for X0 Y0 Z0 sync_plan_position_delta(); #endif + thermalManager.init(); // Initialize temperature loop + #if ENABLED(USE_WATCHDOG) watchdog_init(); #endif @@ -918,8 +921,6 @@ void setup() { lcd_init(); #endif #endif - - } /**