From a17fb4930f29c23f9bbcbdb650f5a430b7dd20cf Mon Sep 17 00:00:00 2001 From: Ralf Ramsauer Date: Thu, 27 Aug 2015 17:54:04 +0200 Subject: [PATCH] Switched button type from open to close Signed-off-by: Ralf Ramsauer --- doorlockd/door.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doorlockd/door.cpp b/doorlockd/door.cpp index 4b27572..04ca1cd 100644 --- a/doorlockd/door.cpp +++ b/doorlockd/door.cpp @@ -78,7 +78,7 @@ void Door::unlock() digitalWrite(_HEARTBEATPIN, LOW); usleep(10000); - if (digitalRead(_LOCKPIN)) { + if (!digitalRead(_LOCKPIN)) { std::thread([this] () { lock(); }).detach();