use regular timer here

This commit is contained in:
petrucci4prez 2017-06-10 02:25:22 -04:00
parent 7bae6680c8
commit 950db417f3
1 changed files with 4 additions and 2 deletions

View File

@ -1,7 +1,7 @@
import RPi.GPIO as GPIO import RPi.GPIO as GPIO
import logging, time import logging, time
from functools import partial from functools import partial
from auxilary import CountdownTimer from threading import Timer
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
@ -36,7 +36,9 @@ def startMotionSensor(pin, location, action):
action() action()
logger.debug('waiting %s for %s to power on', INIT_DELAY, name) logger.debug('waiting %s for %s to power on', INIT_DELAY, name)
CountdownTimer(INIT_DELAY, partial(_initGPIO, name, pin, GPIO.RISING, trip)) t = Timer(INIT_DELAY, partial(_initGPIO, name, pin, GPIO.RISING, trip))
t.daemon = True
t.start()
def startDoorSensor(pin, action, sound=None): def startDoorSensor(pin, action, sound=None):
def trip(channel): def trip(channel):