mirror of
https://github.com/binary-kitchen/doorlockd
synced 2024-12-22 02:14:26 +01:00
doorlockd: fix logic bug
We don't want to continue if we actually want to close. Signed-off-by: Ralf Ramsauer <ralf@binary-kitchen.de>
This commit is contained in:
parent
f7725bba54
commit
f226f44190
@ -271,7 +271,7 @@ class DoorHandler:
|
||||
if self.do_close:
|
||||
tx = DoorHandler.CMD_CLOSE
|
||||
self.do_close = False
|
||||
if self.state == DoorState.Present:
|
||||
elif self.state == DoorState.Present:
|
||||
tx = DoorHandler.CMD_PRESENT
|
||||
elif self.state == DoorState.Open:
|
||||
tx = DoorHandler.CMD_OPEN
|
||||
@ -280,7 +280,6 @@ class DoorHandler:
|
||||
|
||||
self.serial.write(tx)
|
||||
self.serial.flush()
|
||||
sleep(0.1)
|
||||
|
||||
def open(self):
|
||||
if self.state == DoorState.Open:
|
||||
|
Loading…
Reference in New Issue
Block a user