From 68642808032b7eaed642fccf4b797f5ed0e8dcf5 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 30 Mar 2015 16:52:27 -0700 Subject: [PATCH] Use elif and parentheses in conditionals --- Marlin/Conditionals.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Marlin/Conditionals.h b/Marlin/Conditionals.h index 5df6424b8..36f1ffb54 100644 --- a/Marlin/Conditionals.h +++ b/Marlin/Conditionals.h @@ -265,15 +265,14 @@ #ifndef POWER_SUPPLY #define POWER_SUPPLY 1 #endif - #if (POWER_SUPPLY == 1) // 1 = ATX + #if (POWER_SUPPLY == 1) // 1 = ATX #define PS_ON_AWAKE LOW #define PS_ON_ASLEEP HIGH - #endif - #if (POWER_SUPPLY == 2) // 2 = X-Box 360 203W + #elif (POWER_SUPPLY == 2) // 2 = X-Box 360 203W #define PS_ON_AWAKE HIGH #define PS_ON_ASLEEP LOW #endif - HAS_POWER_SWITCH = POWER_SUPPLY > 0 && defined(PS_ON_PIN) && PS_ON_PIN >= 0 + HAS_POWER_SWITCH = (POWER_SUPPLY > 0 && defined(PS_ON_PIN) && PS_ON_PIN >= 0) /** * Temp Sensor defines