Browse Source

Adds an option to disable print job timer auto start

pull/1/head
João Brázio 9 years ago
committed by Scott Lahteine
parent
commit
8a18c52002
  1. 13
      Marlin/Configuration.h
  2. 16
      Marlin/Marlin_main.cpp

13
Marlin/Configuration.h

@ -755,6 +755,19 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
#define ABS_PREHEAT_HPB_TEMP 110 #define ABS_PREHEAT_HPB_TEMP 110
#define ABS_PREHEAT_FAN_SPEED 0 // Insert Value between 0 and 255 #define ABS_PREHEAT_FAN_SPEED 0 // Insert Value between 0 and 255
//
// Print job timer
//
// This options allows you configure if the print job timer should automatically
// start and stop counting when a M104 or M109 is received.
//
// If disabled you can control the print timer start and stop using the
// following G-Code list:
//
// - M75 - Start the print job timer
// - M76 - Pause the print job timer
// - M77 - Stop the print job timer
#defined PRINTJOB_TIMER_AUTOSTART
// //
// Print Counter // Print Counter

16
Marlin/Marlin_main.cpp

@ -4248,23 +4248,17 @@ inline void gcode_M42() {
/** /**
* M75: Start print timer * M75: Start print timer
*/ */
inline void gcode_M75() { inline void gcode_M75() { print_job_timer.start(); }
print_job_timer.start();
}
/** /**
* M76: Pause print timer * M76: Pause print timer
*/ */
inline void gcode_M76() { inline void gcode_M76() { print_job_timer.pause(); }
print_job_timer.pause();
}
/** /**
* M77: Stop print timer * M77: Stop print timer
*/ */
inline void gcode_M77() { inline void gcode_M77() { print_job_timer.stop(); }
print_job_timer.stop();
}
#if ENABLED(PRINTCOUNTER) #if ENABLED(PRINTCOUNTER)
/*+ /*+
@ -4293,6 +4287,7 @@ inline void gcode_M104() {
thermalManager.setTargetHotend(temp == 0.0 ? 0.0 : temp + duplicate_extruder_temp_offset, 1); thermalManager.setTargetHotend(temp == 0.0 ? 0.0 : temp + duplicate_extruder_temp_offset, 1);
#endif #endif
#if ENABLED(PRINTJOB_TIMER_AUTOSTART)
/** /**
* We use half EXTRUDE_MINTEMP here to allow nozzles to be put into hot * We use half EXTRUDE_MINTEMP here to allow nozzles to be put into hot
* stand by mode, for instance in a dual extruder setup, without affecting * stand by mode, for instance in a dual extruder setup, without affecting
@ -4308,6 +4303,7 @@ inline void gcode_M104() {
* will not restart. * will not restart.
*/ */
else print_job_timer.start(); else print_job_timer.start();
#endif
if (temp > thermalManager.degHotend(target_extruder)) LCD_MESSAGEPGM(MSG_HEATING); if (temp > thermalManager.degHotend(target_extruder)) LCD_MESSAGEPGM(MSG_HEATING);
} }
@ -4446,6 +4442,7 @@ inline void gcode_M109() {
thermalManager.setTargetHotend(temp == 0.0 ? 0.0 : temp + duplicate_extruder_temp_offset, 1); thermalManager.setTargetHotend(temp == 0.0 ? 0.0 : temp + duplicate_extruder_temp_offset, 1);
#endif #endif
#if ENABLED(PRINTJOB_TIMER_AUTOSTART)
/** /**
* We use half EXTRUDE_MINTEMP here to allow nozzles to be put into hot * We use half EXTRUDE_MINTEMP here to allow nozzles to be put into hot
* stand by mode, for instance in a dual extruder setup, without affecting * stand by mode, for instance in a dual extruder setup, without affecting
@ -4461,6 +4458,7 @@ inline void gcode_M109() {
* will not restart. * will not restart.
*/ */
else print_job_timer.start(); else print_job_timer.start();
#endif
if (temp > thermalManager.degHotend(target_extruder)) LCD_MESSAGEPGM(MSG_HEATING); if (temp > thermalManager.degHotend(target_extruder)) LCD_MESSAGEPGM(MSG_HEATING);
} }

Loading…
Cancel
Save