-
Notifications
You must be signed in to change notification settings - Fork 161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(Draft) Merge dev into main #2
Draft
tmhastings
wants to merge
525
commits into
legacy-iaps-233
Choose a base branch
from
dev
base: legacy-iaps-233
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
+16,783
−342,068
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kelseyhuss
approved these changes
Mar 6, 2024
kelseyhuss
previously approved these changes
Mar 6, 2024
bjornoleh
pushed a commit
that referenced
this pull request
May 1, 2024
Merge pull request #2 from nightscout/alpha
in Shortcuts, HealthKit, FileStorageTests, and URLs
Re-write of the Contribute section.
Update README.md
Update app name to Trio
lingering from LA cherry picks
This reverts a few lines from commit 08e6a80.
oref0 branch: dev - git version: e023125 Last commits: e023125 Replace Open-iAPS with Trio (#23)
Rename directory for copy of .js files to trio-oref, update oref0 source files after updating script for Trio
rename Trio update Discord url
Update Issue templates for GitHub
Restore identifier
This ports Artificial-Pancreas/iAPS#272 into Open-iAPS. This is part of #47 Co-Authored-By: Deniz Cengiz <[email protected]>
Co-Authored-By: Deniz Cengiz <[email protected]>
…constraint error - fix clear button not working as expected - make cursor right adjusted when tapping in the Textfield
Merge `alpha` into `dev`
Only display if the selected CGM disables the toggle in Nightscout > Upload.
gemfile update
direct user where to flip Upload Glucose toggle
feat(issuemanagement): automatically adding the project to the issue types bug and needs triage
Stale Issues
Eventual BG with 1 decimal in the app and in the watch app
fix(projectmanagment): only run in nightscout repo, use of general token, rename
Live activity improvements
update submodule MinimedKit, update SHA, no change to code
Rework DecimalTextField Struct and Toolbar
* Add app group `group.$(BUNDLE_IDENTIIFER).trio-app-group` to Trio * Update testflight.md regarding Trio app group Co-Authored-By: Marion Barker <[email protected]> * Fix wrong CGMBLEKit SHA checked out for submodule * Update with latest dev; update submodules; resolve merge conflict leftover * Update testflight.md * Address review feedback: fix small typos, add bullet point * Address review feedback: Remove sections; add beta tester hint for app group --------- Co-authored-by: Marion Barker <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
todo:
alive
branch to mainTrio![trio](https://raw.githubusercontent.com/nightscout/trio-docs/e78591c461fa022ef7426a2ca65996f0899546da/docs/favicon.ico)
expand details
This app splits from Artificial-Pancreas/iAPS at v2.3.3 on the main branch and this commit. Very minimal UI changes were made in this initial update, but while it may look and for the most part seem the same as iAPS v2.3.3, you can see from the number of commits and files/lines of code changed in this PR that there are extensive changes under the hood. These changes were done to ensure it is truly open source, peer-reviewed and tested, to keep it in line with updates from Loop's submodules (the stuff that connects your pump, CGM, and services), to fix some bugs, and to add a few new features.
The Team
expand details
Trio is a collaborative project set up by members of the DIY community who welcome a peer reviewed, Open Source iOS implementation of the Oref/APS algorithm.
The team consists of:
The Name
expand details
“Trio” is inspired by several joint efforts:
Hosted by The Nightscout Foundation
expand details
The most obvious change is that the repository location has changed to be housed by Nightscout and AndroidAPS. The Nightscout Foundation has a long track record of facilitating innovation in DIY diabetes technology and stoking collaboration between many developers and projects. This will keep Trio in the hands of the community rather than a single individual, and ensure all development is peer-reviewed and tested before being released.
New Bundle ID
expand details
If you're currently using iAPS, another big change is the app's Bundle ID, which is now
org.nightscout.TEAMID.trio
. This means Trio will not overwrite the iAPS app on your iPhone, but all settings must be re-entered and all devices re-connected. Trio will need about 24 hours of data before the dynamic features can be enabled.If you're using Omnipod DASH or Eros, you will have to pair a new pod to start using Trio, but all other devices can transfer mid-session.
New App Group
expand details
Instead of using the Loop's App Group,
group.com.TEAMID.loopkit.LoopGroup
, Trio uses its own,group.org.nightscout.TEAMID.trio.trio-app-group
. This prevents settings from being retained when deleting and reinstalling Trio while Loop or iAPS is also installed. You still need to delete xDrip4iOS to completely reset settings, though.New Icons
expand details
New icons have been created as a symbol of the name Trio. (by @tmhastings), plus some old ones (by @tqb43)
Default Setting Changes
expand details
None
(instead ofNightscout
)On
(instead ofOff
)180
(instead of145
)Off
(instead ofOn
)60
(instead of65
, which keeps it more in line with Oref0)Sigmoid Adjustment Factor
expand details
With Dynamic ISF toggled on, the effects of
Adjustment Factor
vary drastically between havingSigmoid
turnedon
andoff
. Because of this, we've split theAdjustment Factor
in two and given Sigmoid its own setting. This allowsAdjustment Factor
to be defaulted to0.8
withSigmoid
turnedoff
and to0.5
withSigmoid
turnedon
. (by @MikePlante1)External Insulin & Glucose
expand details
External insulin entry (to log non-pump insulin, eg. from an insulin pen) has been moved to the History screen rather than the Bolus screen. External insulin entries will display a warning if amount is larger than Max Bolus setting and will not be allowed if over three times the Max Bolus setting. The History screen also now displays if a bolus was an SMB or External, and uses swipe gestures to delete entries. (by @BrianWieder with many cherry picks from @dnzxy)
Distinguish Manual Glucose Readings
expand details
Manually entered glucose readings are now more noticeable in both the history and the main chart. (by @mountrcg)
Edit Profile Overrides & Temp Targets
expand details
Swiping left on a saved profile override or temp target now gives you the option to edit or delete. Selecting to edit will open a new page where you can change the name and/or any of the settings. (by @dsnallfot)
LoopKit Submodules
expand details
The code that's used to connect to pumps, CGMs, and other things was taken from their implementations in Loop. This update changes where that code is housed from within this app to point to the code in @LoopKit or @loopandlearn's repositories. This allows for a better development as it makes it easy to see the differences between the code used in Trio vs the code being used in LoopKit and allows updates in the LoopKit repo to easily be pulled into Trio. (by @bjornoleh with help from @marionbarker and @bjornoleh)
Oref
expand details
This part is rather technical. Oref (the algorithm from OpenAPS that drives Trio) is written in the JavaScript programming language. In order to perform well in an iOS app, the algorithm is implemented in a minimized format. Until the algorithm is rewritten into the Swift programming language, it needs to be like this to ensure performance. The source code used to build the minimized files is now included in this repo as well as a separate repo trio-oref. This work is quite extensive and has been done and peer-reviewed by several contributors: (beautified/reconstructed by @JeremyStorring and updated by @bjornoleh, @mountrcg, @avouspierre, @MikePlante1, @tmhastings)
Schedule SMBs Off in Profile Overrides
expand details
The
Schedule when SMBs are Off
option in profile overrides has been improved to make it easier to understand and use. Now, if you want to disable SMBs for the entire time the override is active, toggle onAlways Disable SMBs
, but if you want to specify a timeframe for SMBs to be disabled, you can toggle offAlways Disable SMBs
toggle onSchedule when SMBs are Off
and set the timeframe. Note that setting a timeframe of 22-6 would disable SMBs from 22:00 (10PM) through 5:59 as long as the override is active during that time.Restart Bug Squashed
expand details
Since the beginning of FAX, there was a bug where restarting a phone could potentially cause a loss of pump or cgm connection. This was especially detrimental for Omnipod users, as there's no way to reconnect it after it's lost. The fix for this from LoopKit has now been added to Trio. (by @dnzxy, @kskandis, @avouspierre)
Apple Health Fix
expand details
The 2.3.3 version of iAPS had a bug with Apple Health. This part of the code was re-written and fixed (by @AndreasStokholm), then thoroughly tested and peer-reviewed by the team. Feel free to toggle Apple Health back on if you'd like.
Fix Multiple Meal Entry Bug
expand details
Some people have had the app freeze while entering a meal and mistakenly entered the same meal multiple times without realizing it. The
Save and continue
is now disabled as soon as it’s pressed to prevent that from happening. (by @MikePlante1)Omnipod Fixes
expand details
Code has been updated to avoid triggering the
Critical Pod Fault 049 (0x31)
error which caused a pod poss. (by @marionbarker and @itsmojo)Fix mmol/L Glucose Target Bug
expand details
The bug causing glucose target to not be settable to certain mmol/L values has been fixed. (cherry-picked from @Jon-b-m by @Sjoerd-Bo3)
Tidepool Integration
expand details
Tidepool can now be uploaded to directly from Trio instead of using Apple Health and the Tidepool app on your iPhone. Note that if both are enabled, you will see duplicate entries in Tidepool, and even after turning one off, you could still see up to a week of duplicate data. (by @avouspierre)
Dexcom Share Integration
expand details
Dexcom Share has been fixed so it can now be used as a CGM source. Also, if you use Dexcom G6 as your CGM and you enter your Dexcom Share credentials at the bottom in
⚙️ > CGM > CGM Configuration
, missed readings should backfill in Trio from Dexcom Share. Keep in mind, though, when you change G6 transmitters Trio will continue to pull readings from Dexcom Share causing you to rely on internet for readings until you update your G6 Transmitter ID in Trio. (by @avouspierre)Meal Settings
expand details
There is a new section in settings called
Meal Settings
. In it, you'll findMax Carbs
(which used to be inPump Settings
),Max Fat
,Max Protein
, and theFat and Protein Conversion Settings
that used to be found in it's own section. (by @bjornoleh)Max Macros
expand details
Max Fat
&Max Protein
Max Carbs
' defaultCarbohydrate limit
changed toLimit Per Entry
for Meal Settingsgrams
tog
for the meal entry screeng
to⚠️
PR.226.mov
Max Bolus
expand details
Manually entering a bolus larger than the
Max Bolus
setting used to just deliver the max bolus amount, but now this setting prevents the bolus from being delivered until the amount is lower than the max setting. (cherry-picked from @Jon-b-m and modified by @MikePlante1 with input from @bjornoleh)Also now displays the value read from the pump instead of from settings to ensure the correct value is shown. Important for Medtronic pumps and in the future for Dana pumps. (by @bastiaanv and ported by @dnzxy)
Live Activities (Dynamic Island & Lockscreen Widget)
expand details
Live Activities have been added to show relevant data without opening Trio. This displays glucose, delta, and trend on the lock screen (iOS 16.2+) as well as in the Dynamic Island (iPhone 14+). Optionally, a glucose graph and current IOB & COB can also be displayed. Consistently updated every 5 minutes with every loop cycle. (cherry-picked from @nas10, @polscm32 and ported by @MikePlante1)
Turn Live Activity on and switch between display options by going to ⚙️ >
Notifications
(long press)
Dexcom ONE+
expand details
Added support for Dexcom ONE+ (taken from this Zulip discussion)
Nightscout Menu Updated
expand details
The menu for Nightscout has been updated to include sub-menus. The new
Fetch Treatments
toggle controls whether Trio will fetch carbs and temp targets from Nightscout. The duplicateRemote Control
toggle has also been removed fromPreferences
. (by @dsnallfot)Import Settings From Nightscout
expand details
Fixed this so it now also works for mg/dL. Also now allows importing from settings saved to Nightscout from Loop and will use the center of your correction range from Loop for the target range in Trio. (by @kskandis and @MikePlante1)
Settings imported:
Improve Nightscout Uploads
expand details
Previously, only enacted loop cycles were uploaded to Nightscout, which caused information gaps from loop cycles that were just suggested but not actually enacted for one reason or another. Now suggested loop cycles will also be uploaded as well. (by @bjornoleh and suggested by @scottleibrand)
Fat & Protein Upload to Nightscout
expand details
Fat & Protein are now uploaded to Nightscout when you announce them in Trio. (by @aug0211)
FPU Conversion
expand details
Oref ignores any carb entry less than 1.0g. This used to happen when
Interval In Minutes
was set low and/or the amount of fat and protein was small. Now, the carb entries that were converted from fat & protein are saved to ensure they are always at least 1g each and not ignored by oref. (by @dnzxy)For example, with the default
Meal Settings
, 10g of protein and 5g of fat used to converted into 7 entries of 0.7g carbs. Now, it will be converted into 5 entries of 1g carbs.Statistics Range
expand details
The statistics screen now includes the
high
andlow
values in the normal range instead of the high and low ranges. This matches the colors of the glucose dots that were already being used on the Statistics screen. (by @MikePlante1)For this example in a simulator, I kept
high
/low
to the default70
/180
and manually entered these values:Pump Status Icons
expand details
New icons are displayed when your pod status has a warning or critical message. This will help highlight when a problem occurs with the pump to help make the user aware of the issue. (by @avouspierre)
Display icons/buttons when no pump/CGM is selected
expand details
When there is no pump or CGM selected, a button is displayed that will take you to the selection screen for pump or CGM. This does not affect instances where a pump or CGM *is* selected and just not paired. (by @avouspierre)
When Omnipod is removed as a pump source, it will now display
Add pump
rather than the erroneousNo pod
warning. (by @kskandis)Confirm Bolus Faster on Apple Watch
expand details
An option has been added in ⚙️ >
Watch
to require less of a turn of the Apple Watch crown to confirm a bolus. (by @MikePlante1, who likes to confirm boluses with his nose)Screen.Recording.2024-06-18.at.2.05.20.PM.mov
Hide Keyboard Button for Meal Notes
expand details
There is now a button to dismiss the keyboard when the textfield for Note is selected in the meal entry screen.
Eventual Glucose Rounding for mmol/L
expand details
Eventual Glucose now rounds to 1 decimal place for mmol/L users instead of 2 on the main screen as well as the watch app.
Tests Enabled
expand details
Added ability to run tests on Trio and submodules. (by @avouspierre)
Browser Build Updates
expand details
Browser Build updated to new Apple/GitHub standards. (by @bjornoleh) TestFlight Expiration is now displayed in Settings. (by @bjorkert) Gemfile updated. (by @mountrcg)
Guardrails
expand details
Guardrails to prevent preferences from being set outside a reasonable range can now be set in the code, although no guardrails have been added yet at this time. (by @JeremyStorring)
To add a guardrail, add
minVal
and/ormaxVal
to thetype
inFreeAPS/Sources/Modules/PreferencesEditor/PreferencesEditorStateModel.swift
. For example, to restrictMinimum Safety Threshold
from 60-120, use the following:Removed Stats Upload
expand details
Removed the option to upload Statistics to Nightscout, since it is no longer compatible with the website this feature was added for before. (by @MikePlante1)
List of individual PRs included in this large PR:
expand details
actualDate
as introduced in #22 #55Max Bolus exceeded
label #172storeCarbs
function to limit carb equivalents of FPU conversion to 1.0 grams #240Minimum Safety Threshold
update #260alpha
intodev
#333Go Team!🎉
expand details
Thank you to the following developers who have added commits to this PR and the initial version of Trio: @AndreasStokholm, @avouspierre, @bjorkert, @bjornoleh, @BrianWieder, @dnzxy, @dsnallfot, @JeremyStorring, @kskandis, @kylmcw, @lifeguardz, @marionbarker, @MikePlante1, @mountrcg, @polscm32, @Sjoerd-Bo3, @tmhastings
A heartfelt thank you to everyone who has played a crucial role behind the scenes with their valuable contributions in discussions, project management, coaching, documentation, testing, and more: