Browse Source

Fix PSU_POWERUP_DELAY compile error (#16064)

pull/1/head
Felicia Hummel 5 years ago
committed by Scott Lahteine
parent
commit
6c2438deae
  1. 19
      Marlin/src/inc/Conditionals_post.h
  2. 4
      Marlin/src/inc/SanityCheck.h

19
Marlin/src/inc/Conditionals_post.h

@ -321,25 +321,20 @@
#endif
/**
* Power Supply Control
* Power Supply
*/
#ifndef PSU_NAME
#if ENABLED(PSU_CONTROL)
#if PSU_ACTIVE_HIGH
#if DISABLED(PSU_CONTROL)
#define PSU_NAME "Generic" // No control
#elif PSU_ACTIVE_HIGH
#define PSU_NAME "XBox" // X-Box 360 (203W)
#else
#define PSU_NAME "ATX" // ATX style
#endif
#if DISABLED(AUTO_POWER_CONTROL)
#ifndef PSU_POWERUP_DELAY
#endif
#if !defined(PSU_POWERUP_DELAY) && ENABLED(PSU_CONTROL) && DISABLED(AUTO_POWER_CONTROL)
#define PSU_POWERUP_DELAY 100
#endif
#elif defined(PSU_POWERUP_DELAY)
#error "PSU_POWERUP_DELAY has no effect if AUTO_POWER_CONTROL is enabled."
#endif
#else
#define PSU_NAME "Generic" // No control
#endif
#endif
/**

4
Marlin/src/inc/SanityCheck.h

@ -1605,7 +1605,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
/**
* LED Backlight Timeout
*/
#if defined(LED_BACKLIGHT_TIMEOUT) && !(EITHER(FYSETC_MINI_12864_2_0, FYSETC_MINI_12864_2_1) && ENABLED(PSU_CONTROL))
#if defined(LED_BACKLIGHT_TIMEOUT) && !(ENABLED(PSU_CONTROL) && EITHER(FYSETC_MINI_12864_2_0, FYSETC_MINI_12864_2_1))
#error "LED_BACKLIGHT_TIMEOUT requires a FYSETC Mini Panel and a Power Switch."
#endif
@ -2486,6 +2486,8 @@ static_assert( _ARR_TEST(3,0) && _ARR_TEST(3,1) && _ARR_TEST(3,2)
#error "PSU_CONTROL requires PSU_ACTIVE_HIGH to be defined as 'true' or 'false'."
#elif !PIN_EXISTS(PS_ON)
#error "PSU_CONTROL requires PS_ON_PIN."
#elif defined(PSU_POWERUP_DELAY) && ENABLED(AUTO_POWER_CONTROL)
#error "PSU_POWERUP_DELAY has no effect with AUTO_POWER_CONTROL enabled."
#endif
#elif ENABLED(AUTO_POWER_CONTROL)
#error "AUTO_POWER_CONTROL requires PSU_CONTROL."

Loading…
Cancel
Save