Skip to content

Commit

Permalink
Merge pull request #254 from Foundation-Devices/SFT-1823-prevent-auto…
Browse files Browse the repository at this point in the history
…-shutdown-while-updating-firmware

SFT-1823: prevent auto shutdown while updating firmware
  • Loading branch information
FoundationKen committed Apr 19, 2023
2 parents efdd6e6 + d44ccb5 commit cc98021
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions ports/stm32/boards/Passport/modules/pages/progress_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,19 @@ def __init__(
statusbar=statusbar,
left_micron=left_micron,
right_micron=right_micron)

def attach(self, group):
import common

super().attach(group)
# Never auto-shutdown during progress
common.settings.set_volatile('shutdown_timeout', 0)

def detach(self):
import common
from keypad import feedback

# reset auto-shutdown timer before returning to normal setting
feedback()
common.settings.clear_volatile('shutdown_timeout')
super().detach()

0 comments on commit cc98021

Please sign in to comment.