✨ AUTO_POWER_SPINDLE_LASER (#25739)
This commit is contained in:
parent
27e68a61fa
commit
06d46a0ef9
|
@ -412,11 +412,12 @@
|
|||
|
||||
//#define AUTO_POWER_CONTROL // Enable automatic control of the PS_ON pin
|
||||
#if ENABLED(AUTO_POWER_CONTROL)
|
||||
#define AUTO_POWER_FANS // Turn on PSU if fans need power
|
||||
#define AUTO_POWER_E_FANS
|
||||
#define AUTO_POWER_CONTROLLERFAN
|
||||
#define AUTO_POWER_CHAMBER_FAN
|
||||
#define AUTO_POWER_COOLER_FAN
|
||||
#define AUTO_POWER_FANS // Turn on PSU for fans
|
||||
#define AUTO_POWER_E_FANS // Turn on PSU for E Fans
|
||||
#define AUTO_POWER_CONTROLLERFAN // Turn on PSU for Controller Fan
|
||||
#define AUTO_POWER_CHAMBER_FAN // Turn on PSU for Chamber Fan
|
||||
#define AUTO_POWER_COOLER_FAN // Turn on PSU for Cooler Fan
|
||||
#define AUTO_POWER_SPINDLE_LASER // Turn on PSU for Spindle/Laser
|
||||
#define POWER_TIMEOUT 30 // (s) Turn off power if the machine is idle for this duration
|
||||
//#define POWER_OFF_DELAY 60 // (s) Delay of poweroff after M81 command. Useful to let fans run for extra time.
|
||||
#endif
|
||||
|
|
|
@ -53,6 +53,10 @@ bool Power::psu_on;
|
|||
#include "controllerfan.h"
|
||||
#endif
|
||||
|
||||
#if ANY(LASER_FEATURE, SPINDLE_FEATURE)
|
||||
#include "spindle_laser.h"
|
||||
#endif
|
||||
|
||||
millis_t Power::lastPowerOn;
|
||||
#endif
|
||||
|
||||
|
@ -196,6 +200,10 @@ void Power::power_off() {
|
|||
if (controllerFan.state()) return true;
|
||||
#endif
|
||||
|
||||
#if ANY(LASER_FEATURE, SPINDLE_FEATURE)
|
||||
if (TERN0(AUTO_POWER_SPINDLE_LASER, cutter.enabled())) return true;
|
||||
#endif
|
||||
|
||||
if (TERN0(AUTO_POWER_CHAMBER_FAN, thermalManager.chamberfan_speed))
|
||||
return true;
|
||||
|
||||
|
|
|
@ -2623,6 +2623,9 @@
|
|||
#if !HAS_AUTO_COOLER_FAN || AUTO_COOLER_IS_E
|
||||
#undef AUTO_POWER_COOLER_FAN
|
||||
#endif
|
||||
#if !HAS_CUTTER
|
||||
#undef AUTO_POWER_SPINDLE_LASER
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Controller Fan Settings
|
||||
|
|
Loading…
Reference in a new issue