summaryrefslogtreecommitdiff
path: root/platformio/relayctl/src/relay.h
diff options
context:
space:
mode:
authorEvgeny Zinoviev <me@ch1p.io>2022-12-18 06:31:24 +0300
committerEvgeny Zinoviev <me@ch1p.io>2022-12-24 12:57:55 +0300
commit0a065f48be99d4ebae49de622a335f23e50c6ca0 (patch)
treeb591d91fac26e5bf7a4dd6d37178b978061ef060 /platformio/relayctl/src/relay.h
parent022ec129bb8f511a7bf8cf537f165afce2303262 (diff)
pump-mqtt-bot: wip; relayctl: somewhat stable
Diffstat (limited to 'platformio/relayctl/src/relay.h')
-rw-r--r--platformio/relayctl/src/relay.h6
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