Skip to content

Commit 309f4c1

Browse files
committed
Added the ice functions
1 parent 7abf833 commit 309f4c1

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

python_api/python_api.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,13 @@ def get_glucose_effect_velocity_dates(json_file):
7777
return date_list
7878

7979

80+
def get_active_carbs(json_file):
81+
json_bytes = get_bytes_from_json(json_file)
8082

83+
swift_lib.getActiveCarbs.argtypes = [ctypes.c_char_p]
84+
swift_lib.getActiveCarbs.restype = ctypes.c_double
8185

82-
86+
return swift_lib.getActiveCarbs(json_bytes)
8387

8488

8589

@@ -103,5 +107,7 @@ def get_glucose_effect_velocity_dates(json_file):
103107
glucose_effect_velocity_dates = get_glucose_effect_velocity_dates(json_file)
104108
print("glucose_effect_velocity_dates", glucose_effect_velocity_dates)
105109
print(" ")
106-
110+
active_carbs = get_active_carbs(json_file)
111+
print("active_carbs", active_carbs)
112+
print(" ")
107113

0 commit comments

Comments
 (0)