Fix up PSU_CONTROL checks

This commit is contained in:
Scott Lahteine
2019-10-22 15:43:37 -05:00
parent 62b875f918
commit af214ff121
11 changed files with 21 additions and 17 deletions

View File

@ -120,7 +120,7 @@
#define DOGLCD
#define IS_ULTIPANEL
#define LED_COLORS_REDUCE_GREEN
#if HAS_POWER_SWITCH && EITHER(FYSETC_MINI_12864_2_0, FYSETC_MINI_12864_2_1)
#if ENABLED(PSU_CONTROL) && EITHER(FYSETC_MINI_12864_2_0, FYSETC_MINI_12864_2_1)
#define LED_BACKLIGHT_TIMEOUT 10000
#endif

View File

@ -333,8 +333,6 @@
#endif
#endif
#define HAS_POWER_SWITCH (ENABLED(PSU_CONTROL) && PIN_EXISTS(PS_ON))
/**
* Temp Sensor defines
*/

View File

@ -1591,7 +1591,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) && HAS_POWER_SWITCH)
#if defined(LED_BACKLIGHT_TIMEOUT) && !(EITHER(FYSETC_MINI_12864_2_0, FYSETC_MINI_12864_2_1) && ENABLED(PSU_CONTROL))
#error "LED_BACKLIGHT_TIMEOUT requires a FYSETC Mini Panel and a Power Switch."
#endif
@ -2467,8 +2467,14 @@ static_assert( _ARR_TEST(3,0) && _ARR_TEST(3,1) && _ARR_TEST(3,2)
/**
* Ensure this option is set intentionally
*/
#if ENABLED(PSU_CONTROL) && !defined(PSU_ACTIVE_HIGH)
#error "PSU_CONTROL requires PSU_ACTIVE_HIGH to be defined as 'true' or 'false'."
#if ENABLED(PSU_CONTROL)
#ifndef PSU_ACTIVE_HIGH
#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."
#endif
#elif ENABLED(AUTO_POWER_CONTROL)
#error "AUTO_POWER_CONTROL requires PSU_CONTROL."
#endif
#if HAS_CUTTER