Skip to content

Commit

Permalink
Change read function for PS_ON and EDM pins
Browse files Browse the repository at this point in the history
  • Loading branch information
InsanityAutomation committed Jan 30, 2024
1 parent 0316242 commit ca18690
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand All @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/MarlinCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

Expand Down

0 comments on commit ca18690

Please sign in to comment.