-
-
Notifications
You must be signed in to change notification settings - Fork 19.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow wait-for-cooling, break at threshold or if cooling stalls #4169
Allow wait-for-cooling, break at threshold or if cooling stalls #4169
Conversation
next_cool_check_ms = now + 5000; | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if ((old_temp - temp) < 1.0) break;
we are cooling!
old_temp
must be set to temp somewhere. Courrently it's set to 9999 and stays there.
Make clear the temperatures are float. (xxx.0 or xxxf)
5 seconds seems to be a magnitude to small. At the beginning the temperature still could rise. I suggest 60000 - 1° per minute.
e1933ce
to
5e14a52
Compare
Let's see how 20 seconds works for the cooling. The whole low temperature threshold could be removed, as long as this can reliably detect that cooling has stalled. |
After this PR was merged, I got compilation warnings.
I think that it's better that |
@esenapaj That warning is overkill in this case. The compiler can't tell, but the logic is such that it will never permit float theTarget = -1.0; // theTarget is always initialized to -1
. . .
do {
// The actual target temperature can never be -1
if (theTarget != thermalManager.degTargetHotend(target_extruder)) {
// So this always happens the first time through the loop
wants_to_cool = thermalManager.isCoolingHotend(target_extruder);
. . .
}
. . .
} while (!cancel_heatup && TEMP_CONDITIONS); |
Just a false warning. |
I also just did a scrub-through of the temperature setters and accessors to make sure there's no place where an |
@Blue-Marlin @thinkyhead |
Made some tests today.
dropped out of the loop °C.
For longer times the constant must be long better unsigned long. |
Adjust wait_for_cooling slope and drop mintemp for cooling. See MarlinFirmware#4169 (comment)
Adjust wait_for_cooling slope and drop mintemp for cooling. See MarlinFirmware#4169 (comment)
Move nozzle to center during Thermal model cal.
Instead of breaking immediately when
M109 Rn
orM190 Rn
specifies a temperature belowEXTRUDE_MINTEMP/2
or30
, proceed to wait, but break out when the temperature reaches the low threshold. Also check the temperature every 20 seconds. If it doesn't drop by at least 1°C in 20 seconds, stop waiting.Reference: #4039 (comment)