File tree Expand file tree Collapse file tree
Sources/LoopAlgorithmToPython Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -436,15 +436,20 @@ public func getDynamicCarbsOnBoard(jsonData: UnsafePointer<Int8>?) -> Double {
436436
437437 let startDate = dateFormatter. date ( from: input. inputICE [ 0 ] . startAt) !
438438 let endDate = dateFormatter. date ( from: input. inputICE. last!. startAt) !
439- let carbRatio = [ AbsoluteScheduleValue (
439+
440+ // This uses the compatibility layer to work on all platforms
441+ let carbRatio = [ AbsoluteScheduleValue< AlgorithmValue> . universal(
440442 startDate: startDate,
441443 endDate: endDate,
442- value: LoopQuantity ( unit: LoopUnit ( from: " g/U " ) , doubleValue: input. carbRatio)
444+ value: input. carbRatio,
445+ unit: " g/U "
443446 ) ]
444- let isf = [ AbsoluteScheduleValue (
447+
448+ let isf = [ AbsoluteScheduleValue< AlgorithmValue> . universal(
445449 startDate: startDate,
446450 endDate: endDate,
447- value: LoopQuantity ( unit: LoopUnit ( from: " mg/dL/U " ) , doubleValue: input. sensitivity)
451+ value: input. sensitivity,
452+ unit: " mg/dL/U "
448453 ) ]
449454 let statuses = [ carbEntries [ 0 ] ] . map (
450455 to: inputICE,
You can’t perform that action at this time.
0 commit comments