Initialize current_position to home_offset on boot

This commit is contained in:
Scott Lahteine 2016-06-21 14:58:42 -07:00
parent f30df89ee1
commit 07298ac992

View File

@ -861,13 +861,16 @@ void setup() {
// loads data from EEPROM if available else uses defaults (and resets step acceleration rate) // loads data from EEPROM if available else uses defaults (and resets step acceleration rate)
Config_RetrieveSettings(); 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) #if ENABLED(DELTA) || ENABLED(SCARA)
// Vital to init kinematic equivalent for X0 Y0 Z0 // Vital to init kinematic equivalent for X0 Y0 Z0
sync_plan_position_delta(); sync_plan_position_delta();
#endif #endif
thermalManager.init(); // Initialize temperature loop
#if ENABLED(USE_WATCHDOG) #if ENABLED(USE_WATCHDOG)
watchdog_init(); watchdog_init();
#endif #endif
@ -918,8 +921,6 @@ void setup() {
lcd_init(); lcd_init();
#endif #endif
#endif #endif
} }
/** /**