From ca1869034951b1eedbe24b32b1dfad42956fc4fb Mon Sep 17 00:00:00 2001 From: InsanityAutomation Date: Tue, 30 Jan 2024 11:52:57 -0500 Subject: [PATCH] Change read function for PS_ON and EDM pins --- Marlin/Configuration.h | 10 +++++----- Marlin/src/MarlinCore.cpp | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 8b2399674e..25604a6c77 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -153,7 +153,7 @@ //#define U_DRIVER_TYPE A4988 //#define V_DRIVER_TYPE A4988 //#define W_DRIVER_TYPE A4988 -#define E0_DRIVER_TYPE TMC2209 +#define E0_DRIVER_TYPE TMC2209_STANDALONE //#define E1_DRIVER_TYPE A4988 //#define E2_DRIVER_TYPE A4988 //#define E3_DRIVER_TYPE A4988 @@ -392,7 +392,7 @@ * Enable and connect the power supply to the PS_ON_PIN. * Specify whether the power supply is active HIGH or active LOW. */ -//#define PSU_CONTROL +#define PSU_CONTROL //#define PSU_NAME "Power Supply" #if ENABLED(PSU_CONTROL) @@ -401,8 +401,8 @@ //#define PS_OFF_SOUND // Beep 1s when power off #define PSU_ACTIVE_STATE HIGH // Set 'LOW' for ATX, 'HIGH' for X-Box - //#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 + #define PSU_DEFAULT_OFF // Keep power off until enabled directly with M80 + #define PSU_POWERUP_DELAY 750 // (ms) Delay for the PSU to warm up to full power //#define LED_POWEROFF_TIMEOUT 10000 // (ms) Turn off LEDs after power-off, with this amount of delay #define PSU_OFF_REDUNDANT // Second pin for redundant power control @@ -412,7 +412,7 @@ #define PS_ON_EDM_PIN P4_29 // EDM Pins to monitor feedback on external power control relay. Fault on mismatch. #define PS_ON1_EDM_PIN P1_17 - #define PS_EDM_RESPONSE 250 // Time in MS to allow for relay action + #define PS_EDM_RESPONSE 1000 // Time in MS to allow for relay action //#define POWER_OFF_TIMER // Enable M81 D to power off after a delay //#define POWER_OFF_WAIT_FOR_COOLDOWN // Enable M81 S to power off only after cooldown diff --git a/Marlin/src/MarlinCore.cpp b/Marlin/src/MarlinCore.cpp index e571d3ce9a..9d7bada97f 100644 --- a/Marlin/src/MarlinCore.cpp +++ b/Marlin/src/MarlinCore.cpp @@ -683,7 +683,7 @@ inline void manage_inactivity(const bool no_stepper_sleep=false) { #if defined(PS_ON_EDM_PIN) && ENABLED(PSU_OFF_REDUNDANT) if(ELAPSED(ms, powerManager.last_state_change_ms + PS_EDM_RESPONSE)) { - if(READ(PS_ON1_PIN)!=READ(PS_ON1_EDM_PIN)) + if(extDigitalRead(PS_ON1_PIN)!=extDigitalRead(PS_ON1_EDM_PIN)) kill(GET_TEXT_F(PS_ON1_EDM_FAIL)); }