Use static classes for job timers (#9940)
This commit is contained in:
parent
bc08ce86be
commit
f0d8d76f68
11 changed files with 193 additions and 173 deletions
|
|
@ -260,6 +260,7 @@
|
|||
#include "pins_arduino.h"
|
||||
#include "math.h"
|
||||
#include "nozzle.h"
|
||||
#include "printcounter.h"
|
||||
#include "duration_t.h"
|
||||
#include "types.h"
|
||||
#include "gcode.h"
|
||||
|
|
@ -515,13 +516,6 @@ millis_t previous_cmd_ms = 0;
|
|||
static millis_t max_inactive_time = 0;
|
||||
static millis_t stepper_inactive_time = (DEFAULT_STEPPER_DEACTIVE_TIME) * 1000UL;
|
||||
|
||||
// Print Job Timer
|
||||
#if ENABLED(PRINTCOUNTER)
|
||||
PrintCounter print_job_timer = PrintCounter();
|
||||
#else
|
||||
Stopwatch print_job_timer = Stopwatch();
|
||||
#endif
|
||||
|
||||
// Auto Power Control
|
||||
#if ENABLED(AUTO_POWER_CONTROL)
|
||||
#define PSU_ON() powerManager.power_on()
|
||||
|
|
@ -13703,6 +13697,8 @@ void setup() {
|
|||
|
||||
thermalManager.init(); // Initialize temperature loop
|
||||
|
||||
print_job_timer.init(); // Initial setup of print job timer
|
||||
|
||||
#if ENABLED(USE_WATCHDOG)
|
||||
watchdog_init();
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue