From 225a89004b0ff0cd946e17fdba14e5b1b78124ff Mon Sep 17 00:00:00 2001 From: InsanityAutomation Date: Sat, 5 Dec 2020 19:36:09 -0500 Subject: [PATCH] Poweroff kit --- Marlin/Configuration.h | 10 ++++++++-- Marlin/src/pins/ramps/pins_RAMPS_CREALITY.h | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index fa2dfa1c27..4f67079195 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -171,6 +171,7 @@ //#define SKR_ReverseSteppers // Some users reported directions backwards than others on SKR with various drivers. //#define DualZ // Uses 5th driver on CRX or SKR boards as Z2 +#define PowerShutoffKit /* * * If any non-stock dual extruder is used, define type here @@ -776,13 +777,18 @@ * Enable and connect the power supply to the PS_ON_PIN. * Specify whether the power supply is active HIGH or active LOW. */ -#if ENABLED(MachineCR2020) +#if ANY(MachineCR2020, PowerShutoffKit) #define PSU_CONTROL #endif //#define PSU_NAME "Power Supply" #if ENABLED(PSU_CONTROL) - #define PSU_ACTIVE_STATE LOW // Set 'LOW' for ATX, 'HIGH' for X-Box + #if ENABLED(PowerShutoffKit) + #define PS_ON_PIN 12 + #define PSU_ACTIVE_HIGH HIGH + #else + #define PSU_ACTIVE_HIGH FALSE // Set 'LOW' for ATX, 'HIGH' for X-Box + #endif //#define PSU_DEFAULT_OFF // Keep power off until enabled directly with M80 //#define PSU_POWERUP_DELAY 250 // (ms) Delay for the PSU to warm up to full power diff --git a/Marlin/src/pins/ramps/pins_RAMPS_CREALITY.h b/Marlin/src/pins/ramps/pins_RAMPS_CREALITY.h index 1dc898e6ca..cdf1e63f8b 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS_CREALITY.h +++ b/Marlin/src/pins/ramps/pins_RAMPS_CREALITY.h @@ -44,7 +44,7 @@ #endif #ifndef PS_ON_PIN - #define PS_ON_PIN 40 // Used by CR2020 Industrial series + #define PS_ON_PIN 40 // Used by CR2020 Industrial series #endif #if ENABLED(CASE_LIGHT_ENABLE) && !defined(CASE_LIGHT_PIN)