Explorar el Código

Use elif and parentheses in conditionals

Scott Lahteine hace 10 años
padre
commit
6864280803
Se han modificado 1 ficheros con 3 adiciones y 4 borrados
  1. 3
    4
      Marlin/Conditionals.h

+ 3
- 4
Marlin/Conditionals.h Ver fichero

@@ -265,15 +265,14 @@
265 265
   #ifndef POWER_SUPPLY
266 266
     #define POWER_SUPPLY 1
267 267
   #endif
268
-  #if (POWER_SUPPLY == 1)   // 1 = ATX
268
+  #if (POWER_SUPPLY == 1)     // 1 = ATX
269 269
     #define PS_ON_AWAKE  LOW
270 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 272
     #define PS_ON_AWAKE  HIGH
274 273
     #define PS_ON_ASLEEP LOW
275 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 278
    * Temp Sensor defines

Loading…
Cancelar
Guardar