Browse Source

Use elif and parentheses in conditionals

Scott Lahteine 10 years ago
parent
commit
6864280803
1 changed files with 3 additions and 4 deletions
  1. 3
    4
      Marlin/Conditionals.h

+ 3
- 4
Marlin/Conditionals.h View File

265
   #ifndef POWER_SUPPLY
265
   #ifndef POWER_SUPPLY
266
     #define POWER_SUPPLY 1
266
     #define POWER_SUPPLY 1
267
   #endif
267
   #endif
268
-  #if (POWER_SUPPLY == 1)   // 1 = ATX
268
+  #if (POWER_SUPPLY == 1)     // 1 = ATX
269
     #define PS_ON_AWAKE  LOW
269
     #define PS_ON_AWAKE  LOW
270
     #define PS_ON_ASLEEP HIGH
270
     #define PS_ON_ASLEEP HIGH
271
-  #endif
272
-  #if (POWER_SUPPLY == 2)   // 2 = X-Box 360 203W
271
+  #elif (POWER_SUPPLY == 2)   // 2 = X-Box 360 203W
273
     #define PS_ON_AWAKE  HIGH
272
     #define PS_ON_AWAKE  HIGH
274
     #define PS_ON_ASLEEP LOW
273
     #define PS_ON_ASLEEP LOW
275
   #endif
274
   #endif
276
-  HAS_POWER_SWITCH = POWER_SUPPLY > 0 && defined(PS_ON_PIN) && PS_ON_PIN >= 0
275
+  HAS_POWER_SWITCH = (POWER_SUPPLY > 0 && defined(PS_ON_PIN) && PS_ON_PIN >= 0)
277
 
276
 
278
   /**
277
   /**
279
    * Temp Sensor defines
278
    * Temp Sensor defines

Loading…
Cancel
Save