From 417bdb0488391419b8579bf11e58293745067c28 Mon Sep 17 00:00:00 2001 From: Scott Lahteine <github@thinkyhead.com> Date: Tue, 26 Dec 2017 19:39:39 -0600 Subject: [PATCH] Fix bug in NO_VOLUMETRICS --- Marlin/configuration_store.cpp | 3 +++ Marlin/planner.cpp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Marlin/configuration_store.cpp b/Marlin/configuration_store.cpp index 2da7cbf62f..eb646bbbbe 100644 --- a/Marlin/configuration_store.cpp +++ b/Marlin/configuration_store.cpp @@ -240,6 +240,9 @@ void MarlinSettings::postprocess() { #if DISABLED(NO_VOLUMETRICS) planner.calculate_volumetric_multipliers(); + #else + for (uint8_t i = COUNT(planner.e_factor); i--;) + planner.refresh_e_factor(i); #endif #if HAS_HOME_OFFSET || ENABLED(DUAL_X_CARRIAGE) diff --git a/Marlin/planner.cpp b/Marlin/planner.cpp index f83cbd4b06..ff972c36b2 100644 --- a/Marlin/planner.cpp +++ b/Marlin/planner.cpp @@ -94,7 +94,7 @@ float Planner::max_feedrate_mm_s[XYZE_N], // Max speeds in mm per second int16_t Planner::flow_percentage[EXTRUDERS] = ARRAY_BY_EXTRUDERS1(100); // Extrusion factor for each extruder -float Planner::e_factor[EXTRUDERS]; // The flow percentage and volumetric multiplier combine to scale E movement +float Planner::e_factor[EXTRUDERS] = ARRAY_BY_EXTRUDERS1(1.0); // The flow percentage and volumetric multiplier combine to scale E movement #if DISABLED(NO_VOLUMETRICS) float Planner::filament_size[EXTRUDERS], // diameter of filament (in millimeters), typically around 1.75 or 2.85, 0 disables the volumetric calculations for the extruder