Invert unlocker signals, 0 is unlock, 1 is lock

This commit is contained in:
Ondrej Mikle 2022-10-06 22:26:19 +02:00
parent cca9b4bbe0
commit daf13e58e6

View file

@ -46,9 +46,9 @@ class UnlockerWiringPi(Unlocker):
"""Unlocks lock at configured pin by pulling it high.
"""
import wiringpi
wiringpi.digitalWrite(self.lockPin, 1)
time.sleep(self.lockOpenedSecs)
wiringpi.digitalWrite(self.lockPin, 0)
time.sleep(self.lockOpenedSecs)
wiringpi.digitalWrite(self.lockPin, 1)
def lock(self):
"""
@ -56,5 +56,5 @@ class UnlockerWiringPi(Unlocker):
so that lock is not left disengaged.
"""
import wiringpi
wiringpi.digitalWrite(self.lockPin, 0)
wiringpi.digitalWrite(self.lockPin, 1)