Skip to content

Commit

Permalink
Update timer logic to be 2.0 compatible, added extra print statements…
Browse files Browse the repository at this point in the history
… for easier debugging
  • Loading branch information
MikeSchapp committed Mar 22, 2024
1 parent 67eaa50 commit b0d1909
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion firmware/lib/scout.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ def set_timer(self, child_id, activity):
timer = send_api_request(
self.base_url, path=path, data={"child": child_id, "name": activity}
)
print("Timer started for " + activity)
return timer

def get_timer(self, child_id, activity):
Expand All @@ -88,7 +89,6 @@ def get_timer(self, child_id, activity):
if (
timer["name"] == activity
and timer["child"] == child_id
and timer["active"] == True
):
return timer
return None
Expand All @@ -101,6 +101,7 @@ def sleep(self, child_id):
"""
activity = "sleep"
self.resolve_timers(child_id, activity)
print("Recorded Sleep")

def tummy_time(self, child_id):
"""
Expand Down

0 comments on commit b0d1909

Please sign in to comment.