fix state attribute bugs
This commit is contained in:
parent
7460b007ce
commit
cd5516d849
|
@ -134,13 +134,14 @@ class StateMachine:
|
||||||
self.LED = Blinkenlights(17)
|
self.LED = Blinkenlights(17)
|
||||||
|
|
||||||
def action():
|
def action():
|
||||||
if self.currentState == self.armed:
|
if self.currentState == self.states.armed:
|
||||||
self.selectState(SIGNALS.TRIGGER)
|
self.selectState(SIGNALS.TRIGGER)
|
||||||
|
|
||||||
def actionVideo(pin):
|
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)
|
self.selectState(SIGNALS.TRIGGER)
|
||||||
while GPIO.input(pin):
|
while GPIO.input(pin):
|
||||||
|
# TODO: check that this path exists
|
||||||
path = '/mnt/glusterfs/pyledriver/images/%s.jpg'
|
path = '/mnt/glusterfs/pyledriver/images/%s.jpg'
|
||||||
#~ with open(path % datetime.now(), 'wb') as f:
|
#~ with open(path % datetime.now(), 'wb') as f:
|
||||||
#~ f.write(camera.getFrame())
|
#~ f.write(camera.getFrame())
|
||||||
|
|
Loading…
Reference in New Issue