Skip to content

Commit

Permalink
Proportional Autotemp followup (#17585)
Browse files Browse the repository at this point in the history
Co-authored-by: Scott Lahteine <[email protected]>
  • Loading branch information
studiodyne and thinkyhead authored Apr 17, 2020
1 parent d78ce58 commit 50fa87f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Marlin/src/module/planner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2991,13 +2991,14 @@ void Planner::set_max_jerk(const AxisEnum axis, float targetValue) {
const int16_t target = thermalManager.degTargetHotend(active_extruder);
autotemp_min = target + AUTOTEMP_MIN_P;
autotemp_max = target + AUTOTEMP_MAX_P;
autotemp_factor = AUTOTEMP_FACTOR_P;
#endif

if (parser.seenval('S')) autotemp_min = parser.value_celsius();
if (parser.seenval('B')) autotemp_max = parser.value_celsius();
if (parser.seenval('F')) autotemp_factor = parser.value_float();
if (!autotemp_factor) autotemp_enabled = false; // F0 will disable autotemp
}

// When AUTOTEMP_PROPORTIONAL is enabled, F0 disables autotemp.
// Normally, leaving off F also disables autotemp.
autotemp_factor = parser.seen('F') ? parser.value_float() : TERN(AUTOTEMP_PROPORTIONAL, AUTOTEMP_FACTOR_P, 0);
autotemp_enabled = autotemp_factor != 0;
}
#endif

0 comments on commit 50fa87f

Please sign in to comment.