From 4564ad292048e3aae530d693304b589dd2905e6e Mon Sep 17 00:00:00 2001 From: Frederik Kemner Date: Sun, 29 Sep 2019 11:32:24 +0200 Subject: [PATCH] Fix build if EXTRUDERS = 0 (#15417) --- Marlin/src/module/motion.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Marlin/src/module/motion.cpp b/Marlin/src/module/motion.cpp index e93f4f5281..95b99d8d3b 100644 --- a/Marlin/src/module/motion.cpp +++ b/Marlin/src/module/motion.cpp @@ -319,8 +319,10 @@ void _internal_move_to_destination(const feedRate_t &fr_mm_s/*=0.0f*/ const uint16_t old_pct = feedrate_percentage; feedrate_percentage = 100; - const float old_fac = planner.e_factor[active_extruder]; - planner.e_factor[active_extruder] = 1.0f; + #if EXTRUDERS + const float old_fac = planner.e_factor[active_extruder]; + planner.e_factor[active_extruder] = 1.0f; + #endif #if IS_KINEMATIC if (is_fast) @@ -331,7 +333,9 @@ void _internal_move_to_destination(const feedRate_t &fr_mm_s/*=0.0f*/ feedrate_mm_s = old_feedrate; feedrate_percentage = old_pct; - planner.e_factor[active_extruder] = old_fac; + #if EXTRUDERS + planner.e_factor[active_extruder] = old_fac; + #endif } /**