Skip to content

Commit

Permalink
utc offset to be set in rest api via each setbasal request
Browse files Browse the repository at this point in the history
  • Loading branch information
winemug committed Apr 4, 2019
1 parent ea2dba5 commit da1b0d1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions restapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,9 @@ def new_pod():
if request.args.get('radio_address') is not None:
pod.radio_address = int(request.args.get('radio_address'))
else:
pod.radio_address = 0

if pod.radio_address == 0:
pod.radio_address = _get_pdm_address(45000)

archive_pod()
Expand Down Expand Up @@ -403,6 +406,9 @@ def set_basal_schedule():
rate = Decimal(request.args.get("h"+str(i)))
schedule.append(rate)

utc_offset = int(request.args.get("utc"))
pdm.pod.var_utc_offset = utc_offset

pdm.set_basal_schedule(schedule)

def is_pdm_busy():
Expand Down

0 comments on commit da1b0d1

Please sign in to comment.