~n0mn0m/on-air

680a9b08f0934410eb181c5fd8626367023c4ff6 — n0mn0m 2 years ago 2979290
Update portal wake.

After sleeping through the evening have the portal reload.
1 files changed, 5 insertions(+), 1 deletions(-)

M display/code.py
M display/code.py => display/code.py +5 -1
@@ 24,6 24,8 @@ pyportal = PyPortal(
)

pyportal.set_backlight(.5)
display = board.DISPLAY
display.rotation = 180

def deep_sleep(portal):
    """


@@ 34,7 36,9 @@ def deep_sleep(portal):
    portal.neo_status((0, 0, 0))
    # Magic numbers, this is 9 hours in seconds
    time.sleep(32400)
    portal.set_backlight(.5)
    # Go ahead and reload the device after sleeping
    # to restart the day with defaults.
    supervisor.reload()
    
def get_current_hour(portal):
    try: