Skip to content

Commit

Permalink
Add missing file
Browse files Browse the repository at this point in the history
  • Loading branch information
ps2 committed Jun 24, 2017
1 parent cf38b56 commit 2c0e48e
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions Loop/Models/StatusExtensionContext+LoopKit.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
//
// StatusExtensionContext+LoopKit.swift
// Loop
//
// Copyright © 2017 LoopKit Authors. All rights reserved.
//

import InsulinKit

extension NetBasalContext {
var tempBasal: DoseEntry? {
guard rate != 0 else {
return nil
}

return DoseEntry(
type: .tempBasal,
startDate: start,
endDate: end,
value: rate,
unit: .unitsPerHour
)
}
}

0 comments on commit 2c0e48e

Please sign in to comment.