You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/build/code_customization.md
+13-27
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,8 @@
1
1
## Code Customizations
2
2
3
-
!!! danger "Version 3.2.1"
3
+
!!! warning "Version 3.2.1"
4
4
With the release of Loop 3.2.1, the location for the Eros pod customizations has moved.
5
5
6
-
LoopDocs will be updated later. The Key_Phrase search should still work for Mac/Xcode folks.
7
-
8
6
### Mac/Xcode
9
7
10
8
The customization instructions on this page were written for the [Mac-Xcode Build](../build/overview.md) method.
@@ -63,6 +61,7 @@ Be sure to read the [Instructions for Finding the Lines](code_customization.md#i
63
61
* Loop 3 has been released but there are still many people using older code.
64
62
* The labels below indicate Loop 2.2.x or Loop 3, if they are different
65
63
* Users of Loop 2.2.9 (or earlier) or FreeAPS should refer to the Loop 2.2.x examples.
64
+
* Some 2.2.x customizations will be removed as time goes on
66
65
* Users of Loop 3 should refer to the Loop 3 examples.
67
66
* Note that some changes are in a different file for Loop 3 (part of the architecture upgrade for the app).
68
67
@@ -260,8 +259,6 @@ If you are mostly happy with the Dosing Strategy of Automatic Bolus but wish it
260
259
261
260
This customization changes the percent of the recommended bolus used for automatic delivery. The method for calculating that recommendation is not changed by this modification. The default value is 40% (0.4). It is recommended you take small changes of 0.1 at a time. Once you modify it once and try it out for a while, it’s easy to go back and change it again.
262
261
263
-
With Loop 2.2.x, the end of the line has a comment `// %`, whereas with Loop 3, there is an explanatory comment (line starting with `//`) before the line.
264
-
265
262
**Change just the number and double check that the value is less than 1.**
266
263
267
264
```{ .txt .copy title="Key_Phrase" }
@@ -272,20 +269,15 @@ let bolusPartialApplicationFactor
272
269
* Loop 3
273
270
* Folder: Loop/Loop/Models
274
271
* File: LoopConstants.swift
275
-
* Line: 44
276
-
* Loop 2.2.x
277
-
* Folder: Loop/LoopCore
278
-
* File: LoopSettings.swift
279
-
* Line: 89 (2.2.5 and later)
272
+
* Line: 53
280
273
281
274
_Code Before Modification_
282
275
283
-
public let bolusPartialApplicationFactor = 0.4
276
+
static let bolusPartialApplicationFactor = 0.4
284
277
285
278
_Code After Modification to 50% of recommended insulin_
286
279
287
-
public let bolusPartialApplicationFactor = 0.5
288
-
280
+
static let bolusPartialApplicationFactor = 0.5
289
281
290
282
!!! warning "Do not exceed 1.0"
291
283
This number should never be bigger than 1 (you’d be getting more than Loop recommends). If you think you need more than 1, consider your settings and meal entries.
@@ -369,7 +361,6 @@ Users of Loop 2.2.9 and earlier or FreeAPS must use the following method for mod
369
361
370
362
Some people want to limit the maximum number of carbs that can be entered in one entry – especially for children or folks who eat lower carb. This helps prevent accidental typos, e.g., entry of 115 g instead of 15 g for a meal.
371
363
372
-
373
364
```{ .txt .copy title="Key_Phrase" }
374
365
maxQuantity =
375
366
```
@@ -380,9 +371,9 @@ As shown in the graphic below, this phrase shows up in 2 places, only the first
380
371
{align="center"}
381
372
382
373
383
-
* Loop 2.2.x and Loop 3
374
+
* Loop 2.2.x
384
375
* Folder: Loop/Loop/View Controllers
385
-
* File: CarbEntryViewController.swift, Line 33 (Loop 2.2.x) or 36 (Loop 3)
376
+
* File: CarbEntryViewController.swift, Line 33 (Loop 2.2.x)
386
377
387
378
_Code Before Modification_
388
379
@@ -394,7 +385,7 @@ _Code After Modification to limit carb entry to 99 g_
394
385
395
386
## Pods: Add Extra Insulin on Insertion
396
387
397
-
The default value is 0.0 u of extra insulin. If you use this customization, start with a small number and work your way up. If you are coming from manual podding and routinely gave yourself an extra bolus with your PDM at pod change time, you may not need nearly as much with Loop - be conservative.
388
+
The default value is 0.0 U of extra insulin. If you use this customization, start with a small number and work your way up. If you are coming from manual podding and routinely gave yourself an extra bolus with your PDM at pod change time, you may not need nearly as much with Loop - be conservative.
398
389
399
390
Note that Loop does not include the amount of insulin in the prime or insertion steps in your IOB. The pod reports every pulse that it delivers to Loop. If you look in the Pod Settings insulin delivered row, that is the total delivered by the pod minus the (prime plus insertion) amounts. The only way to know that you successfully made this change is to count the clicks. Normal insertion is 0.5 U (0.5 U / 0.05 U per click = 10 clicks). So if you add 0.35 U to the "extra" value, you should get 0.35 / 0.05 = 7 extra clicks. In other words, 17 total clicks after you press insert.
400
391
@@ -404,16 +395,12 @@ This code change is found in one location for Eros Pods (called Omnipod througho
* File: Pod.swift, Line 82 (DASH); Line 87 (Eros);
412
-
* Loop 2.2.x: Eros Pod (ones that require a RileyLink compatible device)
413
-
* Folder: rileylink_ios/OmniKit/Model
414
-
* File: Pod.swift, Line 72 (Loop 2.2.x)
415
-
416
-
_When finding the file using the folder icons in Xcode, instead of using the `Key_Phrase` in `Find in Workspace`, the RileyLink icon represents the rileylink_ios folder name on the computer._
403
+
* Loop 2.2.x: Eros Pod (still configured in rileylink_ios - use Key_Phrase)
417
404
418
405
_Code Before Modification_
419
406
@@ -425,12 +412,11 @@ _Code After Modification to add 0.35 U_
425
412
426
413
## Modify the Guardrails
427
414
428
-
### Glucose Guardrails
429
-
430
415
The [Therapy Setting Guardrails](../loop-3/therapy-settings.md#guardrails-for-settings) are for Loop 3 only.
431
416
432
-
If you build Loop 3 over a version of Loop 2.2.x or FreeAPS where the Correction Range is lower than the default value of 87 mg/dL (4.8 mmol/L), your app requires you to satisfy the new guardrail before you can save that Therapy Setting when you onboard.
417
+
### Glucose Guardrails
433
418
419
+
If you build Loop 3 over a version of Loop 2.2.x or FreeAPS where the Correction Range is lower than the default value of 87 mg/dL (4.8 mmol/L), your app requires you to satisfy the new guardrail before you can save that Therapy Setting when you onboard.
0 commit comments