don't reset on wifi issues in case gets stuck eating batteries when it should wait longer.
This commit is contained in:
12
main.py
12
main.py
@@ -22,9 +22,11 @@ try:
|
|||||||
except RuntimeError as e:
|
except RuntimeError as e:
|
||||||
print(f' connect error: {e}')
|
print(f' connect error: {e}')
|
||||||
write_err(f' connect error: {e}')
|
write_err(f' connect error: {e}')
|
||||||
#Likely a network oops, try starting again
|
#Likely a network oops
|
||||||
uos.umount("/sd")
|
uos.umount("/sd")
|
||||||
machine.soft_reset()
|
#machine.soft_reset()
|
||||||
|
#Don't start right away
|
||||||
|
inky_frame.sleep_for(60)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
nc = uNextcloud.uNextcloud(NEXTCLOUD_URL)
|
nc = uNextcloud.uNextcloud(NEXTCLOUD_URL)
|
||||||
@@ -33,9 +35,11 @@ try:
|
|||||||
except OSError as e:
|
except OSError as e:
|
||||||
print(f' nextcloud error: {e}')
|
print(f' nextcloud error: {e}')
|
||||||
write_err(f' nextcloud error: {e}')
|
write_err(f' nextcloud error: {e}')
|
||||||
#Likely a network oops, try starting again
|
#Likely a network oops
|
||||||
uos.umount("/sd")
|
uos.umount("/sd")
|
||||||
machine.soft_reset()
|
#machine.soft_reset()
|
||||||
|
#Don't start right away
|
||||||
|
inky_frame.sleep_for(60)
|
||||||
|
|
||||||
inky_frame.set_time()
|
inky_frame.set_time()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user