Sfoglia il codice sorgente

M104 was not starting the print timer

João Brázio 9 anni fa
parent
commit
187c183c20
1 ha cambiato i file con 20 aggiunte e 15 eliminazioni
  1. 20
    15
      Marlin/Marlin_main.cpp

+ 20
- 15
Marlin/Marlin_main.cpp Vedi File

4073
   if (setTargetedHotend(104)) return;
4073
   if (setTargetedHotend(104)) return;
4074
   if (marlin_debug_flags & DEBUG_DRYRUN) return;
4074
   if (marlin_debug_flags & DEBUG_DRYRUN) return;
4075
 
4075
 
4076
+  // Start hook must happen before setTargetHotend()
4077
+  print_job_start();
4078
+
4076
   if (code_seen('S')) {
4079
   if (code_seen('S')) {
4077
     float temp = code_value();
4080
     float temp = code_value();
4078
     setTargetHotend(temp, target_extruder);
4081
     setTargetHotend(temp, target_extruder);
4080
       if (dual_x_carriage_mode == DXC_DUPLICATION_MODE && target_extruder == 0)
4083
       if (dual_x_carriage_mode == DXC_DUPLICATION_MODE && target_extruder == 0)
4081
         setTargetHotend1(temp == 0.0 ? 0.0 : temp + duplicate_extruder_temp_offset);
4084
         setTargetHotend1(temp == 0.0 ? 0.0 : temp + duplicate_extruder_temp_offset);
4082
     #endif
4085
     #endif
4086
+
4087
+    if (temp > degHotend(target_extruder)) LCD_MESSAGEPGM(MSG_HEATING);
4083
   }
4088
   }
4084
 
4089
 
4085
-  print_job_stop();
4090
+  if (print_job_stop()) LCD_MESSAGEPGM(WELCOME_MSG);
4086
 }
4091
 }
4087
 
4092
 
4088
 #if HAS_TEMP_0 || HAS_TEMP_BED || ENABLED(HEATER_0_USES_MAX6675)
4093
 #if HAS_TEMP_0 || HAS_TEMP_BED || ENABLED(HEATER_0_USES_MAX6675)
4207
 inline void gcode_M109() {
4212
 inline void gcode_M109() {
4208
   bool no_wait_for_cooling = true;
4213
   bool no_wait_for_cooling = true;
4209
 
4214
 
4210
-  // Start hook must happen before setTargetHotend()
4211
-  print_job_start();
4212
-
4213
   if (setTargetedHotend(109)) return;
4215
   if (setTargetedHotend(109)) return;
4214
   if (marlin_debug_flags & DEBUG_DRYRUN) return;
4216
   if (marlin_debug_flags & DEBUG_DRYRUN) return;
4215
 
4217
 
4218
+  // Start hook must happen before setTargetHotend()
4219
+  print_job_start();
4220
+
4216
   no_wait_for_cooling = code_seen('S');
4221
   no_wait_for_cooling = code_seen('S');
4217
   if (no_wait_for_cooling || code_seen('R')) {
4222
   if (no_wait_for_cooling || code_seen('R')) {
4218
     float temp = code_value();
4223
     float temp = code_value();
7677
 }
7682
 }
7678
 
7683
 
7679
 /**
7684
 /**
7680
- * Output the print job timer in seconds
7681
- *
7682
- * @return the number of seconds
7683
- */
7684
-millis_t print_job_timer() {
7685
-  if (!print_job_start_ms) return 0;
7686
-  return (((print_job_stop_ms > print_job_start_ms)
7687
-    ? print_job_stop_ms : millis()) - print_job_start_ms) / 1000;
7688
-}
7689
-
7690
-/**
7691
  * Check if the running print job has finished and stop the timer
7685
  * Check if the running print job has finished and stop the timer
7692
  *
7686
  *
7693
  * When the target temperature for all extruders is zero then we assume that the
7687
  * When the target temperature for all extruders is zero then we assume that the
7705
   print_job_stop_ms = millis();
7699
   print_job_stop_ms = millis();
7706
   return true;
7700
   return true;
7707
 }
7701
 }
7702
+
7703
+/**
7704
+ * Output the print job timer in seconds
7705
+ *
7706
+ * @return the number of seconds
7707
+ */
7708
+millis_t print_job_timer() {
7709
+  if (!print_job_start_ms) return 0;
7710
+  return (((print_job_stop_ms > print_job_start_ms)
7711
+    ? print_job_stop_ms : millis()) - print_job_start_ms) / 1000;
7712
+}

Loading…
Annulla
Salva