From 4ea26f70db024c85f9502b9a7a1c43e44f6d81c8 Mon Sep 17 00:00:00 2001 From: Kevin Whitaker <eyecreate@eyecreate.org> Date: Mon, 11 Mar 2024 13:26:20 -0400 Subject: [PATCH] don't reset on wifi issues in case gets stuck eating batteries when it should wait longer. --- main.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/main.py b/main.py index 03d92f4..9f9725c 100644 --- a/main.py +++ b/main.py @@ -22,9 +22,11 @@ try: except RuntimeError as e: print(f' connect error: {e}') write_err(f' connect error: {e}') - #Likely a network oops, try starting again + #Likely a network oops uos.umount("/sd") - machine.soft_reset() + #machine.soft_reset() + #Don't start right away + inky_frame.sleep_for(60) try: nc = uNextcloud.uNextcloud(NEXTCLOUD_URL) @@ -33,9 +35,11 @@ try: except OSError as e: print(f' nextcloud error: {e}') write_err(f' nextcloud error: {e}') - #Likely a network oops, try starting again + #Likely a network oops uos.umount("/sd") - machine.soft_reset() + #machine.soft_reset() + #Don't start right away + inky_frame.sleep_for(60) inky_frame.set_time() -- GitLab