AUTOTEMP default proportions (#17560)
This commit is contained in:
parent
fd4c025e98
commit
9110f756ad
|
@ -206,7 +206,7 @@
|
||||||
// A well-chosen Kc value should add just enough power to melt the increased material volume.
|
// A well-chosen Kc value should add just enough power to melt the increased material volume.
|
||||||
//#define PID_EXTRUSION_SCALING
|
//#define PID_EXTRUSION_SCALING
|
||||||
#if ENABLED(PID_EXTRUSION_SCALING)
|
#if ENABLED(PID_EXTRUSION_SCALING)
|
||||||
#define DEFAULT_Kc (100) //heating power=Kc*(e_speed)
|
#define DEFAULT_Kc (100) // heating power = Kc * e_speed
|
||||||
#define LPQ_MAX_LEN 50
|
#define LPQ_MAX_LEN 50
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -262,18 +262,28 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Automatic Temperature:
|
* Automatic Temperature Mode
|
||||||
* The hotend target temperature is calculated by all the buffered lines of gcode.
|
*
|
||||||
* The maximum buffered steps/sec of the extruder motor is called "se".
|
* Dynamically adjust the hotend target temperature based on planned E moves.
|
||||||
* Start autotemp mode with M109 S<mintemp> B<maxtemp> F<factor>
|
*
|
||||||
* The target temperature is set to mintemp+factor*se[steps/sec] and is limited by
|
* (Contrast with PID_EXTRUSION_SCALING, which tracks E movement and adjusts PID
|
||||||
* mintemp and maxtemp. Turn this off by executing M109 without F*
|
* behavior using an additional kC value.)
|
||||||
* Also, if the temperature is set to a value below mintemp, it will not be changed by autotemp.
|
*
|
||||||
* On an Ultimaker, some initial testing worked with M109 S215 B260 F1 in the start.gcode
|
* Autotemp is calculated by (mintemp + factor * mm_per_sec), capped to maxtemp.
|
||||||
|
*
|
||||||
|
* Enable Autotemp Mode with M104/M109 F<factor> S<mintemp> B<maxtemp>.
|
||||||
|
* Disable by sending M104/M109 with no F parameter (or F0 with AUTOTEMP_PROPORTIONAL).
|
||||||
*/
|
*/
|
||||||
#define AUTOTEMP
|
#define AUTOTEMP
|
||||||
#if ENABLED(AUTOTEMP)
|
#if ENABLED(AUTOTEMP)
|
||||||
#define AUTOTEMP_OLDWEIGHT 0.98
|
#define AUTOTEMP_OLDWEIGHT 0.98
|
||||||
|
// Turn on AUTOTEMP on M104/M109 by default using proportions set here
|
||||||
|
//#define AUTOTEMP_PROPORTIONAL
|
||||||
|
#if ENABLED(AUTOTEMP_PROPORTIONAL)
|
||||||
|
#define AUTOTEMP_MIN_P 0 // (°C) Added to the target temperature
|
||||||
|
#define AUTOTEMP_MAX_P 5 // (°C) Added to the target temperature
|
||||||
|
#define AUTOTEMP_FACTOR_P 1 // Apply this F parameter by default (overridden by M104/M109 F)
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Extra options for the M114 "Current Position" report
|
// Extra options for the M114 "Current Position" report
|
||||||
|
|
|
@ -2973,9 +2973,18 @@ void Planner::set_max_jerk(const AxisEnum axis, float targetValue) {
|
||||||
#if ENABLED(AUTOTEMP)
|
#if ENABLED(AUTOTEMP)
|
||||||
|
|
||||||
void Planner::autotemp_M104_M109() {
|
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 ENABLED(AUTOTEMP_PROPORTIONAL)
|
||||||
if (parser.seen('B')) autotemp_max = parser.value_celsius();
|
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
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue