Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Open
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
11 changes: 11 additions & 0 deletions MockKit/MockPumpManagerState.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public struct MockPumpManagerState: Equatable {
case omnipod
case medtronicX22
case medtronicX23
case dana
case custom

var supportedBolusVolumes: [Double]? {
Expand All @@ -32,6 +33,8 @@ public struct MockPumpManagerState: Equatable {
let scaledRanges = (range.lowerBound * scale + 1)...(range.upperBound * scale)
return scaledRanges.map { Double($0) / Double(scale) }
}
case .dana:
return (1...800).map { Double($0) / 10 }
case .custom:
return nil
}
Expand All @@ -50,6 +53,9 @@ public struct MockPumpManagerState: Equatable {
// 0.05 units for rates between 1-9.95 U/h
// 0.1 units for rates between 10-25 U/h
return "0-1-10-25 by 0.025|0.05|0.1"
case .dana:
// 0.1 units for volumes between 0.1-80U
return "0.1-80 by 0.1"
case .custom:
return nil
}
Expand All @@ -71,6 +77,8 @@ public struct MockPumpManagerState: Equatable {
// 0.1 units for rates between 10-35 U/h
let rateGroup3 = (100...350).map { Double($0) / 10 }
return rateGroup1 + rateGroup2 + rateGroup3
case .dana:
return (0...1600).map { Double($0) / 100 }
case .custom:
return nil
}
Expand All @@ -89,6 +97,9 @@ public struct MockPumpManagerState: Equatable {
// 0.05 units for rates between 1-9.95 U/h
// 0.1 units for rates between 10-35 U/h
return "0-1-10-35 by 0.025|0.05|0.1"
case .dana:
// 0.01 units for rates between 0.01-16U/hr
return "0.01-16 by 0.01"
case .custom:
return nil
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,8 @@ final class MockPumpManagerSettingsViewController: UITableViewController {
return "x22"
case .medtronicX23:
return "x23"
case .dana:
return "Dana"
case .custom:
return "Custom"
}
Expand Down