Use static classes for job timers (#9940)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user