Skip to content
This repository has been archived by the owner on Sep 10, 2024. It is now read-only.

Commit

Permalink
deepsleep.py: Add try-except block around sleep time calibration.
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Campora committed Aug 3, 2017
1 parent c6cd075 commit 074bc7e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion deepsleep/deepsleep.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,10 @@ def set_min_voltage_limit(self, value):
self.poke(MIN_BAT_ADDR, value)

def go_to_sleep(self, seconds):
self.calibrate()
try:
self.calibrate()
except Exception:
pass

# the 1.024 factor is because the PIC LF operates at 31 KHz
# WDT has a frequency divider to generate 1 ms
Expand Down

0 comments on commit 074bc7e

Please sign in to comment.