Bläddra i källkod

Adds an option to disable print job timer auto start

João Brázio 9 år sedan
förälder
incheckning
8a18c52002
2 ändrade filer med 50 tillägg och 39 borttagningar
  1. 13
    0
      Marlin/Configuration.h
  2. 37
    39
      Marlin/Marlin_main.cpp

+ 13
- 0
Marlin/Configuration.h Visa fil

755
 #define ABS_PREHEAT_HPB_TEMP 110
755
 #define ABS_PREHEAT_HPB_TEMP 110
756
 #define ABS_PREHEAT_FAN_SPEED 0   // Insert Value between 0 and 255
756
 #define ABS_PREHEAT_FAN_SPEED 0   // Insert Value between 0 and 255
757
 
757
 
758
+//
759
+// Print job timer
760
+//
761
+// This options allows you configure if the print job timer should automatically
762
+// start and stop counting when a M104 or M109 is received.
763
+//
764
+// If disabled you can control the print timer start and stop using the
765
+// following G-Code list:
766
+//
767
+// - M75  - Start the print job timer
768
+// - M76  - Pause the print job timer
769
+// - M77  - Stop the print job timer
770
+#defined PRINTJOB_TIMER_AUTOSTART
758
 
771
 
759
 //
772
 //
760
 // Print Counter
773
 // Print Counter

+ 37
- 39
Marlin/Marlin_main.cpp Visa fil

4248
 /**
4248
 /**
4249
  * M75: Start print timer
4249
  * M75: Start print timer
4250
  */
4250
  */
4251
-inline void gcode_M75() {
4252
-  print_job_timer.start();
4253
-}
4251
+inline void gcode_M75() { print_job_timer.start(); }
4254
 
4252
 
4255
 /**
4253
 /**
4256
  * M76: Pause print timer
4254
  * M76: Pause print timer
4257
  */
4255
  */
4258
-inline void gcode_M76() {
4259
-  print_job_timer.pause();
4260
-}
4256
+inline void gcode_M76() { print_job_timer.pause(); }
4261
 
4257
 
4262
 /**
4258
 /**
4263
  * M77: Stop print timer
4259
  * M77: Stop print timer
4264
  */
4260
  */
4265
-inline void gcode_M77() {
4266
-  print_job_timer.stop();
4267
-}
4261
+inline void gcode_M77() { print_job_timer.stop(); }
4268
 
4262
 
4269
 #if ENABLED(PRINTCOUNTER)
4263
 #if ENABLED(PRINTCOUNTER)
4270
   /*+
4264
   /*+
4293
         thermalManager.setTargetHotend(temp == 0.0 ? 0.0 : temp + duplicate_extruder_temp_offset, 1);
4287
         thermalManager.setTargetHotend(temp == 0.0 ? 0.0 : temp + duplicate_extruder_temp_offset, 1);
4294
     #endif
4288
     #endif
4295
 
4289
 
4296
-    /**
4297
-     * We use half EXTRUDE_MINTEMP here to allow nozzles to be put into hot
4298
-     * stand by mode, for instance in a dual extruder setup, without affecting
4299
-     * the running print timer.
4300
-     */
4301
-    if (temp <= (EXTRUDE_MINTEMP)/2) {
4302
-      print_job_timer.stop();
4303
-      LCD_MESSAGEPGM(WELCOME_MSG);
4304
-    }
4305
-    /**
4306
-     * We do not check if the timer is already running because this check will
4307
-     * be done for us inside the Stopwatch::start() method thus a running timer
4308
-     * will not restart.
4309
-     */
4310
-    else print_job_timer.start();
4290
+    #if ENABLED(PRINTJOB_TIMER_AUTOSTART)
4291
+      /**
4292
+       * We use half EXTRUDE_MINTEMP here to allow nozzles to be put into hot
4293
+       * stand by mode, for instance in a dual extruder setup, without affecting
4294
+       * the running print timer.
4295
+       */
4296
+      if (temp <= (EXTRUDE_MINTEMP)/2) {
4297
+        print_job_timer.stop();
4298
+        LCD_MESSAGEPGM(WELCOME_MSG);
4299
+      }
4300
+      /**
4301
+       * We do not check if the timer is already running because this check will
4302
+       * be done for us inside the Stopwatch::start() method thus a running timer
4303
+       * will not restart.
4304
+       */
4305
+      else print_job_timer.start();
4306
+    #endif
4311
 
4307
 
4312
     if (temp > thermalManager.degHotend(target_extruder)) LCD_MESSAGEPGM(MSG_HEATING);
4308
     if (temp > thermalManager.degHotend(target_extruder)) LCD_MESSAGEPGM(MSG_HEATING);
4313
   }
4309
   }
4446
         thermalManager.setTargetHotend(temp == 0.0 ? 0.0 : temp + duplicate_extruder_temp_offset, 1);
4442
         thermalManager.setTargetHotend(temp == 0.0 ? 0.0 : temp + duplicate_extruder_temp_offset, 1);
4447
     #endif
4443
     #endif
4448
 
4444
 
4449
-    /**
4450
-     * We use half EXTRUDE_MINTEMP here to allow nozzles to be put into hot
4451
-     * stand by mode, for instance in a dual extruder setup, without affecting
4452
-     * the running print timer.
4453
-     */
4454
-    if (temp <= (EXTRUDE_MINTEMP)/2) {
4455
-      print_job_timer.stop();
4456
-      LCD_MESSAGEPGM(WELCOME_MSG);
4457
-    }
4458
-    /**
4459
-     * We do not check if the timer is already running because this check will
4460
-     * be done for us inside the Stopwatch::start() method thus a running timer
4461
-     * will not restart.
4462
-     */
4463
-    else print_job_timer.start();
4445
+    #if ENABLED(PRINTJOB_TIMER_AUTOSTART)
4446
+      /**
4447
+       * We use half EXTRUDE_MINTEMP here to allow nozzles to be put into hot
4448
+       * stand by mode, for instance in a dual extruder setup, without affecting
4449
+       * the running print timer.
4450
+       */
4451
+      if (temp <= (EXTRUDE_MINTEMP)/2) {
4452
+        print_job_timer.stop();
4453
+        LCD_MESSAGEPGM(WELCOME_MSG);
4454
+      }
4455
+      /**
4456
+       * We do not check if the timer is already running because this check will
4457
+       * be done for us inside the Stopwatch::start() method thus a running timer
4458
+       * will not restart.
4459
+       */
4460
+      else print_job_timer.start();
4461
+    #endif
4464
 
4462
 
4465
     if (temp > thermalManager.degHotend(target_extruder)) LCD_MESSAGEPGM(MSG_HEATING);
4463
     if (temp > thermalManager.degHotend(target_extruder)) LCD_MESSAGEPGM(MSG_HEATING);
4466
   }
4464
   }

Laddar…
Avbryt
Spara