|
@@ -183,7 +183,7 @@ class IntelligentGenerator: BloodGlucoseGenerator {
|
|
|
|
|
|
|
|
private func makeStepInTrend() {
|
|
private func makeStepInTrend() {
|
|
|
currentGlucose +=
|
|
currentGlucose +=
|
|
|
- Int(Double((trendTargetValue - currentGlucose) / trendStepsLeft) * [0.3, 0.6, 1, 1.3, 1.6, 2.0].randomElement()!)
|
|
|
|
|
|
|
+ Int(Double((trendTargetValue - currentGlucose) / trendStepsLeft) * [0.3, 0.6, 1, 1.3, 1.6, 2.0].randomElement()!)
|
|
|
trendStepsLeft -= 1
|
|
trendStepsLeft -= 1
|
|
|
if trendStepsLeft == 0 {
|
|
if trendStepsLeft == 0 {
|
|
|
generateNewTrend()
|
|
generateNewTrend()
|