Skip to content

Commit 519609c

Browse files
committed
Merge branch 'dev-ivan' into microboluses
# Conflicts: # Loop.xcconfig # Loop/Views/MicrobolusView.swift # LoopCore/Microbolus.swift
2 parents 626630e + 62952ae commit 519609c

File tree

2 files changed

+20
-12
lines changed

2 files changed

+20
-12
lines changed

Loop/Views/MicrobolusView.swift

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ struct MicrobolusView: View {
3030
@Published fileprivate var pickerMinimumBolusSizeIndex: Int
3131
@Published fileprivate var partialApplicationIndex: Int
3232

33-
fileprivate let values = stride(from: 30, to: 301, by: 5).map { $0 }
33+
fileprivate let values = stride(from: 30, to: 301, by: 5).map { $0 } + [1440] // + 1 day
3434
// @ToDo: Should be able to get the to limit from the settings but for now defult to a low value
3535
fileprivate let minimumBolusSizeValues = stride(from: 0.0, to: 0.51, by: 0.05).map { $0 }
36-
fileprivate let partialApplicationValues = stride(from: 0.1, to: 1.01, by: 0.1).map { $0 }
36+
fileprivate let partialApplicationValues = stride(from: 0.1, to: 1.01, by: 0.05).map { $0 }
3737

3838
private var cancellable: AnyCancellable!
3939
fileprivate let formatter: NumberFormatter = {
@@ -134,13 +134,13 @@ struct MicrobolusView: View {
134134

135135
var body: some View {
136136
Form {
137-
self.topSection
138-
self.withCobSection
139-
self.withoutCobSection
140-
self.partialApplicationSection
141-
self.safeModeSection
142-
self.temporaryOverridesSection
143-
self.otherOptionsSection
137+
topSection
138+
partialApplicationSection
139+
withCobSection
140+
withoutCobSection
141+
safeModeSection
142+
temporaryOverridesSection
143+
otherOptionsSection
144144
}
145145
.navigationBarTitle("Microboluses")
146146
.modifier(AdaptsToSoftwareKeyboard())
@@ -170,7 +170,11 @@ struct MicrobolusView: View {
170170

171171
Picker(selection: $viewModel.pickerWithCOBIndex, label: Text("Maximum Size")) {
172172
ForEach(0 ..< viewModel.values.count) { index in
173-
Text("\(self.viewModel.values[index])").tag(index)
173+
if index == self.viewModel.values.count - 1 {
174+
Text("Not limited").tag(index)
175+
} else {
176+
Text("\(self.viewModel.values[index])").tag(index)
177+
}
174178
}
175179
}
176180
}
@@ -185,7 +189,11 @@ struct MicrobolusView: View {
185189
}
186190
Picker(selection: $viewModel.pickerWithoutCOBIndex, label: Text("Maximum Size")) {
187191
ForEach(0 ..< viewModel.values.count) { index in
188-
Text("\(self.viewModel.values[index])").tag(index)
192+
if index == self.viewModel.values.count - 1 {
193+
Text("Not limited").tag(index)
194+
} else {
195+
Text("\(self.viewModel.values[index])").tag(index)
196+
}
189197
}
190198
}
191199
}

LoopCore/Microbolus.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public enum Microbolus {
3838
size: Double = 30,
3939
enabledWithoutCarbs: Bool = false,
4040
sizeWithoutCarb: Double = 30,
41-
partialApplication: Double = 0.5,
41+
partialApplication: Double = 0.3,
4242
safeMode: SafeMode = .enabled,
4343
minimumBolusSize: Double = 0,
4444
shouldOpenBolusScreen: Bool = false,

0 commit comments

Comments
 (0)