mirror of https://github.com/Kodomo/regadora
typo fix
parent
ef61e453fa
commit
52b1bf270c
|
|
@ -64,7 +64,7 @@ def create_app():
|
||||||
turnon.curval = 1
|
turnon.curval = 1
|
||||||
turnon.lastoff = ts
|
turnon.lastoff = ts
|
||||||
gpio.output(turnon.pin, gpio.HIGH)
|
gpio.output(turnon.pin, gpio.HIGH)
|
||||||
msg = Historial(trigger='timer', mensaje='{} encendido'.format(Estado.pin))
|
msg = Historial(trigger='timer', mensaje='{} encendido'.format(turnon.pin))
|
||||||
db.session.add(msg)
|
db.session.add(msg)
|
||||||
db.session.flush()
|
db.session.flush()
|
||||||
else:
|
else:
|
||||||
|
|
@ -73,7 +73,7 @@ def create_app():
|
||||||
gpio.output(turnoff.pin, gpio.LOW)
|
gpio.output(turnoff.pin, gpio.LOW)
|
||||||
turnoff.curval = 0
|
turnoff.curval = 0
|
||||||
turnoff.laston = ts
|
turnoff.laston = ts
|
||||||
msg = Historial(trigger='timer', mensaje='{} apagado'.format(Estado.pin))
|
msg = Historial(trigger='timer', mensaje='{} apagado'.format(turnoff.pin))
|
||||||
db.session.add(msg)
|
db.session.add(msg)
|
||||||
if timer.repeat > 0:
|
if timer.repeat > 0:
|
||||||
timer.repeat = timer.repeat - 1
|
timer.repeat = timer.repeat - 1
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue