From 7d383068c4f6d88e78a3173528a0c81f398c4753 Mon Sep 17 00:00:00 2001 From: marionbarker Date: Mon, 4 Mar 2024 18:55:59 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20LoopKit/?= =?UTF-8?q?loopdocs@136f9ff132d7e8ef67d036ae4d89c1d56241e3a2=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/edit-mac/index.html | 36 +++--- gh-actions/edit-browser/index.html | 160 +++++++++++++++++++++++---- gh-actions/img/create-branch.gif | Bin 0 -> 249302 bytes search/search_index.json | 2 +- sitemap.xml.gz | Bin 127 -> 127 bytes version/code-custom-edits/index.html | 99 ++++++++++++++--- 6 files changed, 247 insertions(+), 50 deletions(-) create mode 100644 gh-actions/img/create-branch.gif diff --git a/build/edit-mac/index.html b/build/edit-mac/index.html index 4dccfbf3f77..be235a68439 100644 --- a/build/edit-mac/index.html +++ b/build/edit-mac/index.html @@ -1325,18 +1325,18 @@
  • - + - Modify and Save + Folders and Icons
  • - + - Folders and Icons + Modify and Save @@ -3484,18 +3484,18 @@
  • - + - Modify and Save + Folders and Icons
  • - + - Folders and Icons + Modify and Save @@ -3519,7 +3519,7 @@

    Custom Edits with Mac

    Overview

    -

    When applying a customization using Mac, the downloaded code should be fairly recent. If you are not sure, get a fresh download. If you know your downloaded code is the Current Release, you can skip the download and use the same folder as last time.

    +

    When applying a customization using Mac, the downloaded code should be fairly recent. If you are not sure, get a fresh download. If you know your downloaded code is the Current Release, you can skip the download and use the same folder as last time.

    Find My Downloaded Loop Code

    Refer to the graphic below. The Downloads folder in Finder is highlighted on the upper left. The full path to Loop.xcworkspace is highlighted along the bottom.

    @@ -3541,7 +3541,7 @@

    Find My Downloaded iOS (not their phone) to ensure download is good and is compatible with macOS, Xcode and phone iOS. Once the build is successful, they apply their customizations and build again to the simulator. Last step is to build the customized version to their real phone.

    Instructions for Finding the Lines

    -

    For each customization, you are given landmarks to find the correct location in the code when you review Version: Custom Edits. You can choose to search using the Key_Phrase or navigate to the file in the folder structure and look for ( Cmd+L # ) the line number.

    +

    For each customization, you are given landmarks to find the correct location in the code when you review Version: Custom Edits. You can choose to search using the Key_Phrase or navigate to the file in the folder structure and look for ( Cmd+L # ) the line number.

    For example, if you wanted to change fast to be slightly longer, the edit would be as follows:

    _Code Before Modification

    @@ -3950,6 +3974,7 @@

    Adjust Maximum Loop

  • Folder: Loop/Managers
  • File: LoopDataManager.swift, line: 1690 (main), 1796 (dev)
  • +
  • Stable: Yes
  • The following example is for someone who limits a single bolus to 5 U but frequently needs to achieve an IOB of 15 U for meals. They want that level of IOB to be reached with automatic bolusing. In that case, they may want to modify the factor used to calculate \(\mathit{automaticDosingIOBLimit}\).

    Original Code: @@ -3970,6 +3995,7 @@

    Adjust Percent Bolus for Folder: Loop/Loop/Models
  • File: LoopConstants.swift
  • Line: 53
  • +
  • Stable: Yes
  • Code Before Modification

    static let bolusPartialApplicationFactor = 0.4
    @@ -3995,7 +4021,7 @@ 

    Pods: Add Extra Insulin on Insertio
  • File: Pod.swift, Line 82 (DASH); Line 87 (Eros);
  • -
  • Loop 2.2.x: Eros Pod (still configured in rileylink_ios - use Key_Phrase)
  • +
  • Stable: Yes
  • Code Before Modification

    public static let cannulaInsertionUnitsExtra = 0.0 // edit to add a fixed additional amount of insulin during cannula insertion
    @@ -4015,14 +4041,27 @@ 

    Glucose Version after Update +

    Version before Update

    Code Before Modification

    static let suspendThreshold = Guardrail(absoluteBounds: 67...110, recommendedBounds: 74...80, unit: .milligramsPerDeciliter, startingSuggestion: 80)
     

    and

    static let correctionRange = Guardrail(absoluteBounds: 87...180, recommendedBounds: 100...115, unit: .milligramsPerDeciliter, startingSuggestion: 100)
     
    -

    Modify the 67 for suspendThreshold or 87 for correctionRange to the desired value. Loop automatically converts from mg/dL. So you must enter values reasonable for mg/dL (18 times higher than for mmol/L).

    +

    Modify the absoluteBounds to change the allowed ranges or the recommendedBounds to change the color of the numbers on the picker wheel.

    +

    Loop automatically converts from mg/dL to mmol/L. So you must enter values reasonable for mg/dL (18 times higher than for mmol/L).

    +

    Version after Update

    +

    This update, merged into dev on 2024 Feb 19 was part of a larger fix to a problem when glucose units were mmol/L. The user could not select two values (min and max) that were the same and equal to the reported absolute range. This was a rounding problem going between mmol/L and mg/dL that has now been resolved. Part of the resolution was to modify the mg/dL absolute ranges to preserve the previously reported mmol/L absolute ranges.

    +

    Code Before Modification

    +
    static let suspendThreshold = Guardrail(absoluteBounds: (66.1)...(110.9), recommendedBounds: (73.1)...(80.9), unit: .milligramsPerDeciliter, startingSuggestion: 80)
    +
    +

    and

    +
    static let correctionRange = Guardrail(absoluteBounds: (86.1)...(180.5), recommendedBounds: (99.1)...(115.9), unit: .milligramsPerDeciliter, startingSuggestion: 100)
    +
    +

    Modify the absoluteBounds to change the allowed ranges or the recommendedBounds to change the color of the numbers on the picker wheel.

    +

    Loop automatically converts from mg/dL to mmol/L. So you must enter values reasonable for mg/dL (18 times higher than for mmol/L).

    Modify Guardrails for Insulin Sensitivity Factor (ISF)

    Similar to the instructions for glucose guardrails above, but use this Key_Phrase and modify the absoluteBounds row, next line.

    Key_Phrase
    static let insulinSensitivity = Guardrail(
    @@ -4031,6 +4070,7 @@ 

    Modify Module: LoopKit
  • Folder: LoopKit/Extensions
  • File: Guardrail+Settings.swift, line: 81
  • +
  • Stable: Yes
  • Modify Guardrails for Carb Ratio (CR)

    Similar to the instructions for glucose guardrails above, but use this Key_Phrase and modify the absoluteBounds row, next line.

    @@ -4040,16 +4080,33 @@

    Modify Adjust Future Carbs Time Interval

    -

    Loop 3 limits the future time change allowed to 1 hour.

    -
    Key_Phrase
    cell.datePicker.maximumDate = date.addingTimeInterval
    -
    +

    Loop 3 limits to 1 hours the amount of time in the future that carbs can be entered.

    + +

    The customization varies depending on whether you are building dev or main.

    • Module: Loop
    • +
    • Stable: Changed on 2024 May 29
    • +
    +

    The main branch:

    +
    • Folder: Loop/Loop/View Controllers
    • -
    • File:CarbEntryViewController.swift, Line 438
    • +
    • File: CarbEntryViewController.swift, Line 438
    +

    The dev branch:

    +
      +
    • Folder: Loop/Loop/Models
    • +
    • File: LoopConstants.swift, Line 28
    • +
    +

    The changes required for this customization have changed several time for dev. The code provided in Version after Update is for the latest dev code, as of 2023 Aug 20.

    +

    Version before Update

    +
    Key_Phrase
    cell.datePicker.maximumDate = date.addingTimeInterval
    +

    Default shown below (for maximum and minimum):

    Code Before Modification

    cell.datePicker.maximumDate = date.addingTimeInterval(.hours(1))
    @@ -4057,6 +4114,14 @@ 

    Adjust Future Carbs Time Interval

    Change the maximumDate to the number of hours in the future you desire. Remember that Loop may increase insulin dosing for future carbs - make sure that they actually arrive.

    The minimumDate is how far back in the past you can modify time. The default is 12 hours in the past.

    +

    Version after Update

    +
    Key_Phrase
    static let maxCarbEntryFutureTime
    +
    +

    Default shown below:

    +

    Code Before Modification

    +
    static let maxCarbEntryFutureTime = TimeInterval(hours: 1)
    +
    +

    Change the maxCarbEntryFutureTime to the number of hours in the future you desire. Remember that Loop may increase insulin dosing for future carbs - make sure that they actually arrive.

    Adjust the Watch Crown Sensitivity

    The rate of change of the carb and bolus entry pickers when using the digital crown can be altered as can the rotation required to confirm a bolus on the watch. If you are running an older series watch - you may want to make these customizations. When I switched from Series 3 to Series 7 watch - it was amazing. I got a graph on the main watch screen I didn't even know existed and the bolus acceptance was a breeze!

      @@ -4071,6 +4136,7 @@

      Loop
    • Folder: Loop/WatchApp Extension/Views/Carb Entry & Bolus
    • +
    • Stable: Yes

    use a single Key_Phrase to identify all lines needed to customize sensitivity with loop 3

    Modify Bolus Confirmation Motion

    @@ -4106,6 +4172,7 @@

    Expiration Notification Customiza
  • Line 28: modify how frequently you will be notified
  • +
  • Stable: Yes
  • Key_Phrase
    expirationAlertWindow: TimeInterval
     
    @@ -4163,6 +4230,7 @@

    Insulin Model Customizationimg/exponential.png

    This Loop 3 table of default values is provided for convenience. The times are all in minutes.

    @@ -4238,6 +4306,7 @@

    Disable Authentication for Bolusing
  • Module: LoopKit
  • Folder: LoopKit/LoopKitUI/Extensions/
  • File: Environment+Authenticate.swift, Line 20
  • +
  • Stable: Yes
  • Code Before Modification

    if context.canEvaluatePolicy(.deviceOwnerAuthentication, error: &error) {
    @@ -4267,6 +4336,7 @@ 

    Modify
    private let allScaleFactorPercentages = Array(stride(from: 10, through: 200, by: 10))
    @@ -4282,6 +4352,7 @@ 

    Modify Maximum and Warning Carb E
  • Module: Loop
  • Folder: Loop/Loop/Models
  • File: LoopConstants.swift, line 18
  • +
  • Stable: Yes
  • Code Before Modification

    static let maxCarbEntryQuantity = HKQuantity(unit: .gram(), doubleValue: 250) // cannot exceed this value