Skip to content

Commit

Permalink
Merge pull request #14 from MikeSchapp/2.0-updates
Browse files Browse the repository at this point in the history
Update timer logic to be 2.0 compatible
  • Loading branch information
MikeSchapp authored Mar 22, 2024
2 parents 67eaa50 + b0d1909 commit f1b29cf
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 f1b29cf

Please sign in to comment.