fix state attribute bugs

This commit is contained in:
petrucci4prez 2017-05-25 02:41:58 -04:00
parent 7460b007ce
commit cd5516d849
1 changed files with 3 additions and 2 deletions

View File

@ -134,13 +134,14 @@ class StateMachine:
self.LED = Blinkenlights(17)
def action():
if self.currentState == self.armed:
if self.currentState == self.states.armed:
self.selectState(SIGNALS.TRIGGER)
def actionVideo(pin):
if self.currentState in (self.armed, self.armedCountdown, self.triggered):
if self.currentState in (self.states.armed, self.states.armedCountdown, self.states.triggered):
self.selectState(SIGNALS.TRIGGER)
while GPIO.input(pin):
# TODO: check that this path exists
path = '/mnt/glusterfs/pyledriver/images/%s.jpg'
#~ with open(path % datetime.now(), 'wb') as f:
#~ f.write(camera.getFrame())