Change read function for PS_ON and EDM pins

This commit is contained in:
InsanityAutomation
2024-01-30 11:52:57 -05:00
parent 0316242347
commit ca18690349
2 changed files with 6 additions and 6 deletions
+5 -5
View File
@@ -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<seconds> to power off after a delay
//#define POWER_OFF_WAIT_FOR_COOLDOWN // Enable M81 S to power off only after cooldown
+1 -1
View File
@@ -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));
}