| 1234567891011121314151617181920 |
- extension Bolus {
- final class Provider: BaseProvider, BolusProvider {
- var suggestion: Suggestion? {
- storage.retrieve(OpenAPS.Enact.suggested, as: Suggestion.self)
- }
- func getProfile() -> CarbRatios {
- storage.retrieve(OpenAPS.Settings.carbRatios, as: CarbRatios.self)
- ?? CarbRatios(from: OpenAPS.defaults(for: OpenAPS.Settings.carbRatios))
- ?? CarbRatios(units: .grams, schedule: [])
- }
- func pumpSettings() -> PumpSettings {
- storage.retrieve(OpenAPS.Settings.settings, as: PumpSettings.self)
- ?? PumpSettings(from: OpenAPS.defaults(for: OpenAPS.Settings.settings))
- ?? PumpSettings(insulinActionCurve: 6, maxBolus: 10, maxBasal: 2)
- }
- }
- }
|