Loop - my new build of FreeAPS - my mods and some questions

Dumb question here, just trying to get used to the UI.

Where is the cancel bolus button?

Like I start a bolus and then say, “Oops! Wrong number!”

1 Like

As a bolus is initiated, a bolus progress bar shows up on the main Loop screen. Tap on the progress bar to cancel the bolus. With a Medtronic pump, this places the pump in the suspend state, so then another tap on the same bar is required to restart the pump. I do not know how this exactly works with an Omnipod, but the cancel part should be the same.

2 Likes

Thanks @dm61, I’ll give it a try with a small bolus first. Better to know how to do it before I really need to know and it’s too late!

1 Like

Just tried it. That was easy! :+1:
Thanks!

1 Like

I think it is dialed in reasonably well now. It’s not perfect, I am sure I could improve this with more testing. But this seems like a good safety setup for the time being.

I did not make the change to completely remove insulin from the prediction. I was a little bit nervous about that.

Instead I went with some reasonably safe numbers - a correction range of 80-110, a suspend number of 65, partial micro-bolus value of 25%, a max basal multiplier of 2X, and a 1 hour insulin duration.

Here was the result from last night. The high and low numbers are tagged. Almost the whole night was between 70 and 120, which seems fine to me.

3 Likes

Wow, those settings seem to work out perfectly!!

2 Likes

This is last night’s. I had to setup a new pod yesterday, so I figured I should run one more pod on Loop before I travel, just to make sure it’s all working well.

Seems pretty consistent.

5 Likes

Looks pretty non T1 to me!!!

1 Like

Hi @dm61,
I have a code question…

I get these notifications all the time:

For me it’s kinda dumb because the only time I am using Closed Loop is when I am asleep. During the daytime, of course Loop has not completed, I am Open right now!

I’d like to change that to only signal a “Loop Failure” when I am in Closed Loop mode. Like if there is an issue with the Riley Link. Not when I am in Open mode.

I see this code. Wanted to see what you might suggest to put in an “if” statement that only gives me a failure message when loop is closed, not open.

============

static func scheduleLoopNotRunningNotifications() {
// Give a little extra time for a loop-in-progress to complete
let gracePeriod = TimeInterval(minutes: 0.5)

    for minutes: Double in [20, 40, 60, 120] {
        let notification = UNMutableNotificationContent()
        let failureInterval = TimeInterval(minutes: minutes)

        let formatter = DateComponentsFormatter()
        formatter.maximumUnitCount = 1
        formatter.allowedUnits = [.hour, .minute]
        formatter.unitsStyle = .full

        if let failueIntervalString = formatter.string(from: failureInterval)?.localizedLowercase {
            notification.body = String(format: NSLocalizedString("Loop has not completed successfully in %@", comment: "The notification alert describing a long-lasting loop failure. The substitution parameter is the time interval since the last loop"), failueIntervalString)
        }

        notification.title = NSLocalizedString("Loop Failure", comment: "The notification title for a loop failure")
        notification.sound = .default
        notification.categoryIdentifier = LoopNotificationCategory.loopNotRunning.rawValue
        notification.threadIdentifier = LoopNotificationCategory.loopNotRunning.rawValue

        let request = UNNotificationRequest(
            identifier: "\(LoopNotificationCategory.loopNotRunning.rawValue)\(failureInterval)",
            content: notification,
            trigger: UNTimeIntervalNotificationTrigger(
                timeInterval: failureInterval + gracePeriod,
                repeats: false
            )
        )

        UNUserNotificationCenter.current().add(request)
    }
}
1 Like

I guess the simple hack would just be to change these numbers to something I will never get to, like 4800.

for minutes: Double in [20, 40, 60, 120]

1 Like

Do you carry the RileyLink when you are open-looping? If not, the notification is about not being able to connect to the pod. If you don’t want notifications, you can go to iPhone Settings>Notifications>Loop> Allow Notifications>Toggle Off

2 Likes

Hi @BrianJ,
Yes, I usually have my RL with me. No other way to bolus!

I figured out when it was alerting me. It seems to do that when I close the app.

Obviously I am not connected to Loop when the app is closed. :man_shrugging:

Is there a way to better define when it can give you alerts?

1 Like

Hi @Eric I’ve been tied up the last couple of weeks - have not been checking FUD - sorry about long delay. The open/closed loop status may not be visible in scheduleLoopNotRunningNotifications, so this may take a bit more than a simple change in the if statement. I’ll take a look and will let you know as soon as I get a chance.

2 Likes

Hi @dm61. Thanks! And no worries.

It seemed like I was getting the alert when I closed the app. The easy and hackish fix for me would just be to change the alert time so my pod expires before I ever see an alert.

Incidentally, I feel the same way about the PDM alerts. Like I hate the alert that reminds you to check your BG 90 minutes after starting a pod! :joy:

1 Like