Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
193 changes: 137 additions & 56 deletions Loop.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions Loop/Extensions/BasalRelativeDose.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import Foundation
import LoopKit
import LoopAlgorithm
import LoopKitUI

public extension Array where Element == BasalRelativeDose {
func trimmed(from start: Date? = nil, to end: Date? = nil) -> [BasalRelativeDose] {
Expand Down Expand Up @@ -50,3 +51,14 @@ extension BasalRelativeDose {
)
}
}

extension LoopAlgorithm.BasalRelativeDose {
var chartedDose: ChartedDose {
let type: ChartedDose.DoseType
switch self.type {
case .bolus: type = .bolus
case .basal: type = .basal
}
return ChartedDose(type: type, startDate: startDate, endDate: endDate, volume: volume, netBasalUnits: netBasalUnits)
}
}
Loading