Add animated mascot display experience
This commit is contained in:
@@ -57,7 +57,6 @@ def main():
|
||||
display = None
|
||||
if settings["display_enabled"]:
|
||||
display = StatusDisplay()
|
||||
display.update(settings["wifi_ssid"])
|
||||
hid = get_hid()
|
||||
wlan = connect_wifi(settings)
|
||||
volume_requests = []
|
||||
@@ -77,7 +76,6 @@ def main():
|
||||
# connect_wifi() already started the first attempt; do not call connect()
|
||||
# again while the ESP32 station is still in STAT_CONNECTING state.
|
||||
next_wifi_retry = time.ticks_add(now, 10000)
|
||||
next_display_refresh = now
|
||||
|
||||
while True:
|
||||
now = time.ticks_ms()
|
||||
@@ -90,10 +88,9 @@ def main():
|
||||
wlan.connect(settings["wifi_ssid"], settings["wifi_password"])
|
||||
next_wifi_retry = time.ticks_add(now, 10000)
|
||||
|
||||
if display is not None and time.ticks_diff(now, next_display_refresh) >= 0:
|
||||
if display is not None:
|
||||
address = ip_address(wlan) if wlan.isconnected() else None
|
||||
display.update(settings["wifi_ssid"], address)
|
||||
next_display_refresh = time.ticks_add(now, 1000)
|
||||
display.tick(now, settings["wifi_ssid"], address)
|
||||
|
||||
|
||||
if release_at is not None and time.ticks_diff(now, release_at) >= 0:
|
||||
|
||||
Reference in New Issue
Block a user