Use elif and parentheses in conditionals

This commit is contained in:
Scott Lahteine 2015-03-30 16:52:27 -07:00
parent 8c136a5ab5
commit 6864280803

View File

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