mirror of
https://github.com/brmlab/brmdoor_libnfc.git
synced 2025-06-08 00:24:00 +02:00
Change wiringpi imports due to deprecation warnings
This commit is contained in:
parent
bf5adab659
commit
408dcd5ad2
1 changed files with 3 additions and 3 deletions
|
@ -34,7 +34,7 @@ class UnlockerWiringPi(Unlocker):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, config):
|
def __init__(self, config):
|
||||||
import wiringpi2 as wiringpi
|
import wiringpi
|
||||||
Unlocker.__init__(self, config)
|
Unlocker.__init__(self, config)
|
||||||
wiringpi.wiringPiSetupGpio() # pin numbers follow P1 GPIO header
|
wiringpi.wiringPiSetupGpio() # pin numbers follow P1 GPIO header
|
||||||
self.lockPin = self.config.getint("UnlockerWiringPi", "lock_pin")
|
self.lockPin = self.config.getint("UnlockerWiringPi", "lock_pin")
|
||||||
|
@ -43,7 +43,7 @@ class UnlockerWiringPi(Unlocker):
|
||||||
def unlock(self):
|
def unlock(self):
|
||||||
"""Unlocks lock at configured pin by pulling it high.
|
"""Unlocks lock at configured pin by pulling it high.
|
||||||
"""
|
"""
|
||||||
import wiringpi2 as wiringpi
|
import wiringpi
|
||||||
wiringpi.digitalWrite(self.lockPin, 1)
|
wiringpi.digitalWrite(self.lockPin, 1)
|
||||||
time.sleep(self.lockOpenedSecs)
|
time.sleep(self.lockOpenedSecs)
|
||||||
wiringpi.digitalWrite(self.lockPin, 0)
|
wiringpi.digitalWrite(self.lockPin, 0)
|
||||||
|
@ -53,6 +53,6 @@ class UnlockerWiringPi(Unlocker):
|
||||||
Lock the lock back. Meant to be used when program is shut down
|
Lock the lock back. Meant to be used when program is shut down
|
||||||
so that lock is not left disengaged.
|
so that lock is not left disengaged.
|
||||||
"""
|
"""
|
||||||
import wiringpi2 as wiringpi
|
import wiringpi
|
||||||
wiringpi.digitalWrite(self.lockPin, 0)
|
wiringpi.digitalWrite(self.lockPin, 0)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue