|
@@ -3833,6 +3833,19 @@ inline void gcode_M104() {
|
3833
|
3833
|
setTargetHotend1(temp == 0.0 ? 0.0 : temp + duplicate_extruder_temp_offset);
|
3834
|
3834
|
#endif
|
3835
|
3835
|
}
|
|
3836
|
+
|
|
3837
|
+ // Detect if a print job has finished.
|
|
3838
|
+ // When the target temperature for all extruders is zero then we must have
|
|
3839
|
+ // finished printing.
|
|
3840
|
+ if( print_job_start_ms != 0 ) {
|
|
3841
|
+ bool all_extruders_cooling = true;
|
|
3842
|
+ for (int i = 0; i < EXTRUDERS; i++) if( degTargetHotend(i) > 0 ) {
|
|
3843
|
+ all_extruders_cooling = false;
|
|
3844
|
+ break;
|
|
3845
|
+ }
|
|
3846
|
+
|
|
3847
|
+ if( all_extruders_cooling ) print_job_stop_ms = millis();
|
|
3848
|
+ }
|
3836
|
3849
|
}
|
3837
|
3850
|
|
3838
|
3851
|
#if HAS_TEMP_0 || HAS_TEMP_BED || ENABLED(HEATER_0_USES_MAX6675)
|
|
@@ -3944,16 +3957,15 @@ inline void gcode_M105() {
|
3944
|
3957
|
* Rxxx Wait for extruder(s) to reach temperature. Waits when heating and cooling.
|
3945
|
3958
|
*/
|
3946
|
3959
|
inline void gcode_M109() {
|
|
3960
|
+ float temp;
|
3947
|
3961
|
bool no_wait_for_cooling = true;
|
3948
|
3962
|
|
3949
|
3963
|
if (setTargetedHotend(109)) return;
|
3950
|
3964
|
if (marlin_debug_flags & DEBUG_DRYRUN) return;
|
3951
|
3965
|
|
3952
|
|
- LCD_MESSAGEPGM(MSG_HEATING);
|
3953
|
|
-
|
3954
|
3966
|
no_wait_for_cooling = code_seen('S');
|
3955
|
3967
|
if (no_wait_for_cooling || code_seen('R')) {
|
3956
|
|
- float temp = code_value();
|
|
3968
|
+ temp = code_value();
|
3957
|
3969
|
setTargetHotend(temp, target_extruder);
|
3958
|
3970
|
#if ENABLED(DUAL_X_CARRIAGE)
|
3959
|
3971
|
if (dual_x_carriage_mode == DXC_DUPLICATION_MODE && target_extruder == 0)
|
|
@@ -3961,6 +3973,9 @@ inline void gcode_M109() {
|
3961
|
3973
|
#endif
|
3962
|
3974
|
}
|
3963
|
3975
|
|
|
3976
|
+ // Only makes sense to show the heating message if we're in fact heating.
|
|
3977
|
+ if( temp > 0 ) LCD_MESSAGEPGM(MSG_HEATING);
|
|
3978
|
+
|
3964
|
3979
|
#if ENABLED(AUTOTEMP)
|
3965
|
3980
|
autotemp_enabled = code_seen('F');
|
3966
|
3981
|
if (autotemp_enabled) autotemp_factor = code_value();
|
|
@@ -3968,6 +3983,22 @@ inline void gcode_M109() {
|
3968
|
3983
|
if (code_seen('B')) autotemp_max = code_value();
|
3969
|
3984
|
#endif
|
3970
|
3985
|
|
|
3986
|
+ // Detect if a print job has finished.
|
|
3987
|
+ // When the target temperature for all extruders is zero then we must have
|
|
3988
|
+ // finished printing.
|
|
3989
|
+ if( print_job_start_ms != 0 ) {
|
|
3990
|
+ bool all_extruders_cooling = true;
|
|
3991
|
+ for (int i = 0; i < EXTRUDERS; i++) if( degTargetHotend(i) > 0 ) {
|
|
3992
|
+ all_extruders_cooling = false;
|
|
3993
|
+ break;
|
|
3994
|
+ }
|
|
3995
|
+
|
|
3996
|
+ if( all_extruders_cooling ) {
|
|
3997
|
+ print_job_stop_ms = millis();
|
|
3998
|
+ LCD_MESSAGEPGM(WELCOME_MSG);
|
|
3999
|
+ }
|
|
4000
|
+ }
|
|
4001
|
+
|
3971
|
4002
|
// Exit if the temperature is above target and not waiting for cooling
|
3972
|
4003
|
if (no_wait_for_cooling && !isHeatingHotend(target_extruder)) return;
|
3973
|
4004
|
|