Update __init__.py

This change adds the option to reboot with the "X" button
This commit is contained in:
QuantumKraken 2018-07-27 12:55:12 -07:00 committed by GitHub
parent 5dd47f599b
commit 200339dddb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,8 +11,8 @@ import config
class PowerOffConfirmPage(ConfirmPage):
_ConfirmText = "Confirm Power OFF?"
_ConfirmText = "Awaiting Input?"
_FootMsg = ["Nav","Reboot","","Cancel","Shutdown"]
def CheckBattery(self):
try:
@ -60,6 +60,10 @@ class PowerOffConfirmPage(ConfirmPage):
cmdpath += "sudo halt -p"
pygame.event.post( pygame.event.Event(RUNSYS, message=cmdpath))
if event.key == CurKeys["X"]:
cmdpath = "sudo reboot"
pygame.event.post( pygame.event.Event(RUNSYS, message=cmdpath))
class APIOBJ(object):