Giter VIP home page Giter VIP logo

loopkit's Introduction

LoopKit

Build Status Carthage compatible project chat

LoopKit is a set of tools to speed up development of your own closed-loop insulin delivery app. It is agnostic to treatment decisions and input sources.

Loop

Loop is a full-featured app built on top of LoopKit.

LoopKit provides

  • Data storage and retrieval, using HealthKit and Core Data as appropriate
  • Protocol types for representing data models in a flexible way
  • Common calculation algorithms like Insulin On Board
  • Boilerplate user interfaces like editing basal rate schedules and carb entry

LoopKit does not provide

  • Treatment decisions: Your Diabetes May Vary.
  • Device communications: Device-specific libraries are maintained separately.

License

LoopKit is available under the MIT license. See the LICENSE file for more info.

Code of Conduct

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

loopkit's People

Contributors

arwaink avatar bill-foreflight avatar bjorkert avatar camji55 avatar cfaagaard avatar damonbayer avatar darinkrauss avatar diggabyte avatar dm61 avatar dnzxy avatar elnjensen avatar gestrich avatar itsmojo avatar jh-bate avatar joerg-schoemer avatar kdisimone avatar loudnate avatar marionbarker avatar mpangburn avatar mylma avatar nhamming avatar novalegra avatar panctronic avatar ps2 avatar rickpasetto avatar ryanarana-dexcom avatar sharpfive avatar swiftlynoah avatar vpdn avatar whiten avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

loopkit's Issues

Bolus reminder after back in range

Boluses for carbohydrates are (understandably) disabled when the glucose reading is below target. However, if, during this time, you enter in carbohydrates and then later forget to give the bolus when you arrive are back in range, Loop has to rely on increased basal rate alone to counteract these carbohydrates. I think it would be useful for Loop to remind you if you were low and returned to range that there are still carbs-on-board that you would have otherwise bolused for you had been in range.

Example:
You are 60 mg/dL.
You eat 30g. Had you been in range, you would have given 3 units.
You are not in range, so you give 0 units.
Once you become in range, Loop increases basals to counteract the remaining 20 carbs left in your system. (20g = 30g - the 10g were used to raise your blood sugars back to normal levels)
The max basal is not enough to counteract these carbohydrates and your blood sugar goes high.

New Feature Request

Is it possible that when there is a predicted low that we could get a recommended carb amount to ingest and a carb type based on the forecast model to get a nice recovery that doesn’t overshoot the target BG?

Pairing Issue with Pod and Riley Link

As of recent when there is a need for a pod change there is a fault with pairing. I've tried all the hints that were in the instructional as well as trying new environments. I've tried to cycle bluetooth and holding the units apart. I have a syndiagnosis and report but its too large to attach

Facial Recognition Not Working on iPhone X after latest builds

It appears multiple users are having issues with this... I personally still have the original build (~2 months ago) on my phone, which is not affected.

New users and users who are rebuilding the app as of recently (could be the Xcode update?) are having to enter a passcode instead of utilizing the facial recognition or touch ID.

Build issues integrating LoopKit into separate app

Hello, just starting to take a look at this awesome project and working to build a small app for myself, to start. I am only using the dexcom share library and had originally just pulled to sources into a project locally to start hacking on things. I am now trying to go the Carthage route but running into build issues. I'm using the same Scripts/carthage.sh file as Loop (to try to address the lips issue), yet when I try to build I get an error inside of LoopKit complaining that SwiftCharts cannot be found for the simulator architecture...

Any help here would be awesome! though maybe i should just switch to submodules or something :/

Cartfile:

github "LoopKit/LoopKit" "dev"
github "LoopKit/CGMBLEKit" "dev"
github "i-schuetz/SwiftCharts" == 0.6.5
github "LoopKit/dexcom-share-client-swift" "dev"

Build Log:
carthage-xcodebuild.zpqPVI.log

Minor issue - version display

The loop dev version is not displaying correctly in the settings. I downloaded and installed the dev branch yesterday, but in settings it is displaying as “LOOP V.1.10.0.” I’m sure this is the dev branch because it has the options to test Omnipod beeps and enable the beeps.

IMG_0002

IMG_0003

Glucose data is removed from Healthkit when it doesn't have to

The medtronic cgm users Healthkit glucose data is purged if older than 3hrs on every store of a glucose value. On Dex this was wanted to prevent duplicate data.

I have commented it out and I am testing on a medtronic only system right now, but I would like to see at the very least the data left there for Medtronic CGM's.

Trim down the example app

It isn't really the "example" that casual visitors are looking for (that's Loop). Clarify the target name as only something intended as a UI testing harness, and remove the half-finished attempt at adding UISplitViewController support.

Excess basal delivery while disconnected to phone

Hi. I am new to Loop and I have a question. Today my son had a dinner but his BG was very low so Loop suggested 0 U and we accepted. After 30 minutes BG started to rise very fast and loop started to deliver 2.2 U. Everything was fine but he forgot his phone at the restaurant and when we came back it was already 35 minutes past the without connection. When RL connected back again, it was saying " Eventually 24".
I checked the Insulin Delivery and saw that all that 35 min. Loop was delivering 2.2U.
My question is if we weren't aware of forgetten phone for more than an hour, would the system continue to deliver 2,2U constantly which would lead to a fatal hypo? Or when the connection lost with the phone is it going back to set basal rates for security? Thanks

Minor Issue - Pump Battery Type label doesn't update after change

Yesterday I switched from an alkaline to a lithium battery for my Medtronic pump. I went into Settings, clicked on Pump Battery Type and changed it to Lithium. I then clicked on the navigation <Settings button and noticed that the Pump Battery Type was still Alkaline.

I click Done on the Settings screen, went back in and the Pump Battery Type correctly displayed as Lithium.

This is very minor, but I thought I'd at least log it as I wasn't sure the battery type had changed until I went back into Settings the second time.

Support for Omnipod DASH

The Omnipod DASH insulin pump as Bluetooth built in. It is appealing to "close the loop" with e.g. a Dexcom G6, Smartphone, and an Omnipod DASH, removing the need for the Rileylink for older Omnipod pumps.

Are there any plans to support the Omnipod DASH insulin pump?

"Bolus may not have succeeded", but it always does.

I just switched to my backup loopable pump, the Medtronic 715 with firmware 2.3A 1.1.

Every time I bolus, Loop tells me it may not have succeeded and that the pump responded unexpectedly. Yet every time it does actually work. Is this a known issue? Is there a workaround or a set of logs I can give you to help?

Thanks!

Add override support to GlucoseRangeSchedule

Add support for a single override value in the glucose range.

Despite the powerful code smell, the override needs to initially be based on the system clock, e.g. NSDate() rather than the requested time.

Shell Script Invocation Error

New iPhone and latest version of Loop. After setting up everything (new App Dev device), continue to get this error message. Also updated Xcode, Carthage. Any help would be appreciated.

Shell Script Invocation Error
Command /bin/sh failed with exit code 127

GlucoseMath counteractionEffects produces wrong results if glucose samples and insulin effects are not completely aligned

[I don't think this affects Loop:master in practice as it only calls this function on new data points]

Consider the following data, when looking at a 4 hour interval, the insulin effect only has data from 21:10 to 22:20 (14 samples), the glucoseData exists from 18:20 to 22:20, but insulinCounteractionEffects gets calculated from 18:20 until 19:30 .

I would have expected the insulinCounteractionEffects data to be filled in from 21:20 to 22:20, aligned with the interval of the insulin effect data.

Afaict there is a bug in GlucoseKit counteractionEffects which assumes that the time series are aligned. Due to missing pump data / app error (in this case simulator) this isn't always the case.

Now I'm not sure how to best handle this situation, but I assume some kind of alignment between the time series would be best. Some kind of piece-wise linear interpolation might be best. But it is way too late today to think straight about this.

Example in pseudo code:

for glucose in self {
...
for effect in effects {
if startGlucose.startDate.timeIntervalSince(effect.startDate) ~ (closest) {
< pick startEffect >
}
if endGlucose.startDate.timeIntervalSince(effect.startDate) ~ (closest) {
< pick endEffect >
}
}
...
let effectChange = endEffect - startEffect
// the effect and glucose interval can be different, so we can't directly substract the glucose and effect change
let effectVelocity = effectChange / endEffect.timeintervalSince(startEffect)
let glucoseVelocity = glucoseChange / glucoseTimeInterval
let averageVelocity = glucoseVelocity - effectVelocity
...
}

Example data to reproduce the bug:

insulinEffect
2020-04-22 00:20:51.032128+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 21:10:00 +0000, 2020-04-21 21:10:00 +0000, 0.0
2020-04-22 00:20:51.032252+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 21:15:00 +0000, 2020-04-21 21:15:00 +0000, 0.0
2020-04-22 00:20:51.032473+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 21:20:00 +0000, 2020-04-21 21:20:00 +0000, 0.0
2020-04-22 00:20:51.032969+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 21:25:00 +0000, 2020-04-21 21:25:00 +0000, -0.081685128695172
2020-04-22 00:20:51.033191+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 21:30:00 +0000, 2020-04-21 21:30:00 +0000, -0.36103537027385335
2020-04-22 00:20:51.033422+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 21:35:00 +0000, 2020-04-21 21:35:00 +0000, -1.5976956099214026
2020-04-22 00:20:51.033641+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 21:40:00 +0000, 2020-04-21 21:40:00 +0000, -5.891232659531845
2020-04-22 00:20:51.033716+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 21:45:00 +0000, 2020-04-21 21:45:00 +0000, -12.859588711661342
2020-04-22 00:20:51.033933+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 21:50:00 +0000, 2020-04-21 21:50:00 +0000, -22.011075161695867
2020-04-22 00:20:51.034114+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 21:55:00 +0000, 2020-04-21 21:55:00 +0000, -32.90420668651475
2020-04-22 00:20:51.034330+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 22:00:00 +0000, 2020-04-21 22:00:00 +0000, -45.154685239968984
2020-04-22 00:20:51.034563+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 22:05:00 +0000, 2020-04-21 22:05:00 +0000, -58.434309126591906
2020-04-22 00:20:51.034646+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 22:10:00 +0000, 2020-04-21 22:10:00 +0000, -72.46940686250046
2020-04-22 00:20:51.034750+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 22:15:00 +0000, 2020-04-21 22:15:00 +0000, -87.01067143023353
2020-04-22 00:20:51.034830+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 22:20:00 +0000, 2020-04-21 22:20:00 +0000, -101.84457648262465
2020-04-22 00:20:51.034907+0200 Loop[6132:162087] [AutoAdjust]

glucoseSamples
2020-04-22 00:20:51.048520+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 18:20:59 +0000, 2020-04-21 18:20:59 +0000, 107.09608722918229
2020-04-22 00:20:51.048892+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 18:25:59 +0000, 2020-04-21 18:25:59 +0000, 103.84534813220924
2020-04-22 00:20:51.049660+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 18:30:59 +0000, 2020-04-21 18:30:59 +0000, 100.7175556903945
2020-04-22 00:20:51.050938+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 18:35:59 +0000, 2020-04-21 18:35:59 +0000, 97.73651429283414
2020-04-22 00:20:51.051191+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 18:40:59 +0000, 2020-04-21 18:40:59 +0000, 94.92491146456645
2020-04-22 00:20:51.051282+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 18:45:59 +0000, 2020-04-21 18:45:59 +0000, 92.30414520080494
2020-04-22 00:20:51.051355+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 18:50:59 +0000, 2020-04-21 18:50:59 +0000, 89.89416111528047
2020-04-22 00:20:51.051473+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 18:55:59 +0000, 2020-04-21 18:55:59 +0000, 87.7133006420705
2020-04-22 00:20:51.051674+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 19:00:59 +0000, 2020-04-21 19:00:59 +0000, 85.77816144621713
2020-04-22 00:20:51.051789+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 19:05:59 +0000, 2020-04-21 19:05:59 +0000, 84.10347110546851
2020-04-22 00:20:51.051863+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 19:10:59 +0000, 2020-04-21 19:10:59 +0000, 82.70197502452413
2020-04-22 00:20:51.051969+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 19:15:59 +0000, 2020-04-21 19:15:59 +0000, 81.58433943480674
2020-04-22 00:20:51.052233+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 19:20:59 +0000, 2020-04-21 19:20:59 +0000, 80.7590702180002
2020-04-22 00:20:51.052360+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 19:25:59 +0000, 2020-04-21 19:25:59 +0000, 80.23244817115611
2020-04-22 00:20:51.052755+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 19:30:59 +0000, 2020-04-21 19:30:59 +0000, 80.00848120603371
2020-04-22 00:20:51.052864+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 19:35:59 +0000, 2020-04-21 19:35:59 +0000, 80.08887384647265
2020-04-22 00:20:51.052964+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 19:40:59 +0000, 2020-04-21 19:40:59 +0000, 80.47301425593687
2020-04-22 00:20:51.053067+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 19:45:59 +0000, 2020-04-21 19:45:59 +0000, 81.15797889396003
2020-04-22 00:20:51.053139+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 19:50:59 +0000, 2020-04-21 19:50:59 +0000, 82.13855476605346
2020-04-22 00:20:51.053226+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 19:55:59 +0000, 2020-04-21 19:55:59 +0000, 83.40727909774327
2020-04-22 00:20:51.053301+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 20:00:59 +0000, 2020-04-21 20:00:59 +0000, 84.95449613078776
2020-04-22 00:20:51.053431+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 20:05:59 +0000, 2020-04-21 20:05:59 +0000, 86.76843060933129
2020-04-22 00:20:51.053585+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 20:10:59 +0000, 2020-04-21 20:10:59 +0000, 88.8352773967074
2020-04-22 00:20:51.053655+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 20:15:59 +0000, 2020-04-21 20:15:59 +0000, 91.13930654086924
2020-04-22 00:20:51.053751+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 20:20:59 +0000, 2020-04-21 20:20:59 +0000, 93.66298298881831
2020-04-22 00:20:51.053820+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 20:25:59 +0000, 2020-04-21 20:25:59 +0000, 96.3871000389473
2020-04-22 00:20:51.054014+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 20:30:59 +0000, 2020-04-21 20:30:59 +0000, 99.2909255156396
2020-04-22 00:20:51.054430+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 20:35:59 +0000, 2020-04-21 20:35:59 +0000, 102.35235955363797
2020-04-22 00:20:51.054636+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 20:40:59 +0000, 2020-04-21 20:40:59 +0000, 105.54810279137082
2020-04-22 00:20:51.055133+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 20:45:59 +0000, 2020-04-21 20:45:59 +0000, 108.8538336931544
2020-04-22 00:20:51.055832+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 20:50:59 +0000, 2020-04-21 20:50:59 +0000, 112.24439365077338
2020-04-22 00:20:51.056331+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 20:55:59 +0000, 2020-04-21 20:55:59 +0000, 115.69397845567201
2020-04-22 00:20:51.056705+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 21:00:59 +0000, 2020-04-21 21:00:59 +0000, 119.17633468457099
2020-04-22 00:20:51.057097+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 21:10:42 +0000, 2020-04-21 21:10:42 +0000, 125.93279155416747
2020-04-22 00:20:51.057210+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 21:21:32 +0000, 2020-04-21 21:21:32 +0000, 133.26299984489768
2020-04-22 00:20:51.057297+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 21:26:32 +0000, 2020-04-21 21:26:32 +0000, 136.50155505985032
2020-04-22 00:20:51.057447+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 21:31:32 +0000, 2020-04-21 21:31:32 +0000, 139.61453004765505
2020-04-22 00:20:51.057529+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 21:36:32 +0000, 2020-04-21 21:36:32 +0000, 142.57822197066272
2020-04-22 00:20:51.057604+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 21:41:32 +0000, 2020-04-21 21:41:32 +0000, 145.37007605422457
2020-04-22 00:20:51.057702+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 21:46:32 +0000, 2020-04-21 21:46:32 +0000, 147.96884779131102
2020-04-22 00:20:51.057765+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 21:51:32 +0000, 2020-04-21 21:51:32 +0000, 150.35475920832462
2020-04-22 00:20:51.057859+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 21:56:32 +0000, 2020-04-21 21:56:32 +0000, 152.5096454760867
2020-04-22 00:20:51.057934+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 22:10:38 +0000, 2020-04-21 22:10:38 +0000, 157.20984533356892
2020-04-22 00:20:51.058019+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 22:20:50 +0000, 2020-04-21 22:20:50 +0000, 159.2202392371572

insulinCounteractionEffects
2020-04-22 00:20:51.034995+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 18:20:59 +0000, 2020-04-21 18:25:59 +0000, -0.6501478193946097, -195.04434581838294
2020-04-22 00:20:51.035092+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 18:25:59 +0000, 2020-04-21 18:30:59 +0000, -0.6255584883629467, -187.66754650888402
2020-04-22 00:20:51.035176+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 18:30:59 +0000, 2020-04-21 18:35:59 +0000, -0.5798712537730377, -173.96137613191132
2020-04-22 00:20:51.035259+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 18:35:59 +0000, 2020-04-21 18:40:59 +0000, -0.5064505173378027, -151.9351552013408
2020-04-22 00:20:51.035342+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 18:40:59 +0000, 2020-04-21 18:45:59 +0000, -0.2768212048227921, -83.04636144683764
2020-04-22 00:20:51.035442+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 18:45:59 +0000, 2020-04-21 18:50:59 +0000, 0.3767105928171943, 113.0131778451583
2020-04-22 00:20:51.035531+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 18:50:59 +0000, 2020-04-21 18:55:59 +0000, 0.9574991157839042, 287.2497347351713
2020-04-22 00:20:51.035649+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 18:55:59 +0000, 2020-04-21 19:00:59 +0000, 1.4432694508362316, 432.98083525086946
2020-04-22 00:20:51.036008+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 19:00:59 +0000, 2020-04-21 19:05:59 +0000, 1.8436882368140532, 553.1064710442159
2020-04-22 00:20:51.036113+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 19:05:59 +0000, 2020-04-21 19:10:59 +0000, 2.1697964945019703, 650.9389483505911
2020-04-22 00:20:51.036223+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 19:10:59 +0000, 2020-04-21 19:15:59 +0000, 2.432397659381105, 729.7192978143315
2020-04-22 00:20:51.036304+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 19:15:59 +0000, 2020-04-21 19:20:59 +0000, 2.641965703820405, 792.5897111461215
2020-04-22 00:20:51.036404+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 19:20:59 +0000, 2020-04-21 19:25:59 +0000, 2.8029285041777934, 840.8785512533381
2020-04-22 00:20:51.036483+0200 Loop[6132:162087] [AutoAdjust] * 2020-04-21 19:25:59 +0000, 2020-04-21 19:30:59 +0000, 2.921987617453743, 876.5962852361229

Settings mismatched / maxed basal rate

I was high all night a couple nights in a row and loop wasn't looping, took a while to figure out why. But Erzi and I just figured out that it was because the max basal rate in the pump was mismatched with the max basal rate in loop - so loop was trying to send a basal rate of 3U/hr but wasn't able to because the pump max-basal rate was 2.45U/hr. I wish the error for its failed temp basal attempts would persist so I could have seen it in the morning and say something like "max basal rate maxed out either from the loop app or the pump settings" OR that the loop app would push the settings to the pump.

History list cleanup

Display the title for PumpEvents, and adjust the "since" date to strictly reflect reservoir (for now)

Shareclient Shareerror

I have a stable rig using Loop, Medtronic 722 w/Rileylink & G6. A G6 transmitter change last night has knocked the rig offline (in part) - pump is still talking to Rileylink and app as reservoir and battery levels are visible, but BGs not pulling thru even tho visible in Dexcom app. And no loop of course. Would welcome any insight or suggestions, thanks everso, Liam

Loop Report 2020-06-01 12:29:28+01:00 copy.txt

Swift version blocks build

Build is blocked as:Module compiled with Swift 4.0 cannot be imported in Swift 4.0.2: /Users/mac/Downloads/Loop-master/Carthage/Build/iOS/SwiftCharts.framework/Modules/SwiftCharts.swiftmodule/arm64.swiftmodule
Have tried online suggestions to correct this to no avail. Does anyone have a suggestion?
Thanks,
John

Store trend in GlucoseStore

Trend is displayed in Loop in the GlucoseHUD. We can't display trend data from share, as those values go through GlucoseStore.

Does loop support ios14 now?

After my apple mobile phone system is updated to IOS 14, the loop cannot be used. I wonder if this problem can be solved. I look forward to your help

Tests do not pass when not in DST

testNormalizeEdgeCaseDoses, and testCarbEffectFromHistory fail when running outside of DST; this is due to the fixture data being in DST, and the current schedule being outside of DST.

AuthenticationViewController should be extendable

Hi. During a call to CGMManagerUI.setupViewController() (which is called when a cgm plugin is initially setup by the end user) it is quite common to setup and configure an AuthenticationViewController.
I would like to be able to extend AuthenticationViewController from LoopKit in my own plugin to add custom functionality, like adding another section where it makes sense. However this controller is marked as "final" in loopkit, making this impossible.
image

It would simplify development of my own plugin if this can be implemented. I have implemented an insanely complicated hack to make it possible to extend AuthenticationViewController even if it is marked as final. I would like to remove that hack.

This is how my extended AuthenticationViewController looks:
Foto_-_Google_Foto

Use structs for DailyValueSchedule types

When I was originally ad-hoc designing these types, I saw a lot of overlap but I at the time I could only articulate it using inheritance. Considering the properties are all immutable and there's no reliance on sharing references to a single instance currently in Loop, the inheritance pattern is the only blocker.

Jojo CGM units

I’ve been using jojo on mmol for cgm data. I’ve noticed that every morning the app has switched to mg/dl. It works if left and it resets to mmol if the app is closed and RE-opened.

Predictions and Insulin delivery error

Every 3 to 5 minutes when the basal recommendation appears on top, the prediction BG shows -230 then in 5 seconds gets back to normal. Although the normal is not normal.
I entered breakfast carb for 56g, delivered 2.650 U and choose 2:30hr to digest.
Now Loop predicts me to be 216 after 5 hours.
Am I doing something wrong?
I attached 2 screenshots taken in 3 seconds.
D4BF3618-509D-4030-8540-18107E72DAFD
1393DDA7-0DEA-4834-9655-AAB360B5AAA6

TemporaryScheduleOverride does not serialize enactTrigger

Pulled from a bigger change

LoopKit/TemporaryScheduleOverride.swift

@@ -141,6 +142,7 @@ extension TemporaryScheduleOverride: RawRepresentable {
public var rawValue: RawValue {
return [
"context": context.rawValue,

  •        "enactTrigger": enactTrigger.rawValue,
           "settings": settings.rawValue,
           "startDate": startDate.timeIntervalSince1970,
           "duration": duration.rawValue,
    

Loop won't run because of missing glucose data but Dexcom shows updated data

Hi. This is the first time I am submitting an issue so please let me know if I am using this forum incorrectly. First, a big THANK YOU to everyone who has made Loop possible - it has significantly improved my daughter's life and the well being of our entire family!

Now to the issue. We have frequently been getting a red loop on my daughter's iPhone. When clicked, it gives a missing blood glucose error. The blood sugar shown in Loop is also stale with a yellow exclamation mark. When the blood sugar is clicked on, the Dexcom app opens up BUT shows a current blood sugar is shown. This error may persist for quite a while. The last time this happened I noticed that the pump data was also stale. In the Loop app I went into settings, Riley Link, and clicked on Read Pump Status to confirm that there was a connection (there was). A few minutes after doing this, Loop began running again. Is the stale blood glucose error related to the stale pump data? Am I somehow "forcing" a blood sugar and pump data update by fetching the Pump Status? Is there a way to prevent this from happening in the future? We am running LoopV.1.4.0 - would updating to the latest version help? Thank you very much for your thoughts.

New Feature Request: Automatic Overrides

The feature's purpose would be to simplify dealing with changing basal needs which result in above target blood sugar when no carbs are present. When no carbs are on-board, no manual overrides are active, and when enabled, then apply 'Automatic Overrides'.

'Automatic Overrides' could be configured and turned on\off in the loop app.

An automatic override would apply an additional percentage of basal insulin based on how high above target blood sugar the current blood sugar is. For example, if target blood sugar is 100mg/dl and current blood sugar is 150mg/dl. Then the automatic override could be configured to provide a basal rate of 150% of the scheduled basal rate.

Automatic Override configuration would have two settings; the 'Maximum Override Percent' and a blood sugar setting (mg/dl). When the actual blood sugar reading is at or below the high end of the loop target blood sugar, no automatic override would be applied. When the actual blood sugar reading is above the high end of the loop target blood sugar and below the 'Automatic Override' blood sugar setting, a linear scale is applied to calculate the bolus override percentage. When the actual blood sugar reading is at or above the 'Automatic Override' blood sugar setting, the 'Automatic Override', 'Maximum Override Percent' would be applied to the scheduled basal.

The 'Maximum Override Percent' has to be greater than 100%.
The blood sugar setting has to be greater than the Loop target blood sugar.

Here is an example with an 'Automatic Override' configured with a 'Maximum Override Percentage' of 200% applied when blood sugar is 200mg/dl and the Loop high-end target blood sugar is 100mg/dl. (Numbers are chosen for mathematical simplicity, not as best practice.)

Automatic Override Configuration Loop High End Target BG (mg/dl) Actual BG (mg/dl) Automatic Override % (applied to Basal)
200% at 200mg/dl 100 85 100%
200% at 200mg/dl 100 90 100%
200% at 200mg/dl 100 100 100%
200% at 200mg/dl 100 110 110%
200% at 200mg/dl 100 150 150%
200% at 200mg/dl 100 175 175%
200% at 200mg/dl 100 200 200%
200% at 200mg/dl 100 250 200%

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.