浏览代码

Use elif and parentheses in conditionals

Scott Lahteine 10 年前
父节点
当前提交
6864280803
共有 1 个文件被更改,包括 3 次插入4 次删除
  1. 3
    4
      Marlin/Conditionals.h

+ 3
- 4
Marlin/Conditionals.h 查看文件

@@ -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

正在加载...
取消
保存