PodCommsSession+LoopKit.swift 426 B

1234567891011121314151617
  1. //
  2. // PodCommsSession+LoopKit.swift
  3. // OmniKit
  4. //
  5. // Created by Pete Schwamb on 9/25/18.
  6. // Copyright © 2018 Pete Schwamb. All rights reserved.
  7. //
  8. import Foundation
  9. import LoopKit
  10. extension BasalSchedule {
  11. public init(repeatingScheduleValues: [LoopKit.RepeatingScheduleValue<Double>]) {
  12. self.init(entries: repeatingScheduleValues.map { BasalScheduleEntry(rate: $0.value, startTime: $0.startTime) })
  13. }
  14. }