diff options
Diffstat (limited to 'platformio/relayctl/src/relay.h')
-rw-r--r-- | platformio/relayctl/src/relay.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/platformio/relayctl/src/relay.h b/platformio/relayctl/src/relay.h index a3519ac..ba7f5a6 100644 --- a/platformio/relayctl/src/relay.h +++ b/platformio/relayctl/src/relay.h @@ -3,14 +3,14 @@ #include <Arduino.h> #include "config.def.h" -namespace homekit::relay { +namespace homekit { namespace relay { inline void init() { pinMode(RELAY_PIN, OUTPUT); } inline bool getState() { - return digitalRead(RELAY_PIN) == 1; + return digitalRead(RELAY_PIN) == HIGH; } inline void setOn() { @@ -21,4 +21,4 @@ inline void setOff() { digitalWrite(RELAY_PIN, LOW); } -}
\ No newline at end of file +} }
\ No newline at end of file |