AUTOTEMP default proportions (#17560)

This commit is contained in:
studiodyne
2020-04-17 02:03:53 +02:00
committed by GitHub
parent fd4c025e98
commit 9110f756ad
2 changed files with 32 additions and 13 deletions

View File

@ -2973,9 +2973,18 @@ void Planner::set_max_jerk(const AxisEnum axis, float targetValue) {
#if ENABLED(AUTOTEMP)
void Planner::autotemp_M104_M109() {
if ((autotemp_enabled = parser.seen('F'))) autotemp_factor = parser.value_float();
if (parser.seen('S')) autotemp_min = parser.value_celsius();
if (parser.seen('B')) autotemp_max = parser.value_celsius();
#if ENABLED(AUTOTEMP_PROPORTIONAL)
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
}
#endif