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

**URL:** https://forum.fudiabetes.org/t/loop-my-new-build-of-freeaps-my-mods-and-some-questions/12202
**Category:** Pump
**Tags:** loop
**Created:** [December 23, 2021, 7:31pm UTC](https://forum.fudiabetes.org/t/loop-my-new-build-of-freeaps-my-mods-and-some-questions/12202 "2021-12-23T19:31:08Z")
**Posts on this page:** 14
**Page:** 3

<div class="post-metadata">

### Author: ![Eric](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.fudiabetes.org/eric/32/9209_2.png) [@Eric](https://forum.fudiabetes.org/u/Eric)
#### Post date: [December 31, 2021, 10:20pm UTC](https://forum.fudiabetes.org/t/loop-my-new-build-of-freeaps-my-mods-and-some-questions/12202/41 "2021-12-31T22:20:03Z")

</div>

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!”

---

<div class="post-metadata">

### Author: ![dm61](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.fudiabetes.org/dm61/32/1602_2.png) [@dm61](https://forum.fudiabetes.org/u/dm61)
#### Post date: [December 31, 2021, 11:03pm UTC](https://forum.fudiabetes.org/t/loop-my-new-build-of-freeaps-my-mods-and-some-questions/12202/42 "2021-12-31T23:03:05Z")

</div>

> [@Eric](#):
>
> Where is the cancel bolus button?

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.

---

<div class="post-metadata">

### Author: ![Eric](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.fudiabetes.org/eric/32/9209_2.png) [@Eric](https://forum.fudiabetes.org/u/Eric)
#### Post date: [December 31, 2021, 11:47pm UTC](https://forum.fudiabetes.org/t/loop-my-new-build-of-freeaps-my-mods-and-some-questions/12202/43 "2021-12-31T23:47:01Z")

</div>

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!

---

<div class="post-metadata">

### Author: ![Eric](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.fudiabetes.org/eric/32/9209_2.png) [@Eric](https://forum.fudiabetes.org/u/Eric)
#### Post date: [December 31, 2021, 11:48pm UTC](https://forum.fudiabetes.org/t/loop-my-new-build-of-freeaps-my-mods-and-some-questions/12202/44 "2021-12-31T23:48:57Z")

</div>

Just tried it. That was easy! 👍  
Thanks!

---

<div class="post-metadata">

### Author: ![Eric](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.fudiabetes.org/eric/32/9209_2.png) [@Eric](https://forum.fudiabetes.org/u/Eric)
#### Post date: [January 1, 2022, 6:05pm UTC](https://forum.fudiabetes.org/t/loop-my-new-build-of-freeaps-my-mods-and-some-questions/12202/45 "2022-01-01T18:05:05Z")

</div>

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.

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/fudiabetes/original/2X/3/314f911cb4a8647ca9aaf4d8d75d9570cee6b275.png)

---

<div class="post-metadata">

### Author: ![Trying](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.fudiabetes.org/trying/32/4078_2.png) [@Trying](https://forum.fudiabetes.org/u/Trying)
#### Post date: [January 1, 2022, 6:33pm UTC](https://forum.fudiabetes.org/t/loop-my-new-build-of-freeaps-my-mods-and-some-questions/12202/46 "2022-01-01T18:33:04Z")

</div>

Wow, those settings seem to work out perfectly!!

---

<div class="post-metadata">

### Author: ![Eric](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.fudiabetes.org/eric/32/9209_2.png) [@Eric](https://forum.fudiabetes.org/u/Eric)
#### Post date: [January 2, 2022, 5:28pm UTC](https://forum.fudiabetes.org/t/loop-my-new-build-of-freeaps-my-mods-and-some-questions/12202/47 "2022-01-02T17:28:26Z")

</div>

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.

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/fudiabetes/original/2X/9/9dad4aa4d9aaee3a04f4e731567264379fb250b6.png)

---

<div class="post-metadata">

### Author: ![Trying](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.fudiabetes.org/trying/32/4078_2.png) [@Trying](https://forum.fudiabetes.org/u/Trying)
#### Post date: [January 3, 2022, 2:42am UTC](https://forum.fudiabetes.org/t/loop-my-new-build-of-freeaps-my-mods-and-some-questions/12202/48 "2022-01-03T02:42:31Z")

</div>

Looks pretty non T1 to me!!!

---

<div class="post-metadata">

### Author: ![Eric](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.fudiabetes.org/eric/32/9209_2.png) [@Eric](https://forum.fudiabetes.org/u/Eric)
#### Post date: [March 20, 2022, 6:41pm UTC](https://forum.fudiabetes.org/t/loop-my-new-build-of-freeaps-my-mods-and-some-questions/12202/49 "2022-03-20T18:41:05Z")

</div>

Hi @dm61,  
I have a code question…

I get these notifications all the time:

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/fudiabetes/original/2X/7/7639cbcc208b8ebd096f754c591bde81f13ae70a.jpeg)

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)
> }
> }
> 
> ```

---

<div class="post-metadata">

### Author: ![Eric](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.fudiabetes.org/eric/32/9209_2.png) [@Eric](https://forum.fudiabetes.org/u/Eric)
#### Post date: [March 20, 2022, 7:34pm UTC](https://forum.fudiabetes.org/t/loop-my-new-build-of-freeaps-my-mods-and-some-questions/12202/50 "2022-03-20T19:34:21Z")

</div>

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]

---

<div class="post-metadata">

### Author: ![BrianJ](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.fudiabetes.org/brianj/32/10796_2.png) [@BrianJ](https://forum.fudiabetes.org/u/BrianJ)
#### Post date: [March 21, 2022, 4:44am UTC](https://forum.fudiabetes.org/t/loop-my-new-build-of-freeaps-my-mods-and-some-questions/12202/51 "2022-03-21T04:44:11Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Eric](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.fudiabetes.org/eric/32/9209_2.png) [@Eric](https://forum.fudiabetes.org/u/Eric)
#### Post date: [March 22, 2022, 3:29am UTC](https://forum.fudiabetes.org/t/loop-my-new-build-of-freeaps-my-mods-and-some-questions/12202/52 "2022-03-22T03:29:58Z")

</div>

> [@BrianJ](#):
>
> Do you carry the RileyLink when you are open-looping? If not, the notification is about not being able to connect to the pod.

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. 🤷‍♂️

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

---

<div class="post-metadata">

### Author: ![dm61](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.fudiabetes.org/dm61/32/1602_2.png) [@dm61](https://forum.fudiabetes.org/u/dm61)
#### Post date: [March 30, 2022, 8:38pm UTC](https://forum.fudiabetes.org/t/loop-my-new-build-of-freeaps-my-mods-and-some-questions/12202/53 "2022-03-30T20:38:15Z")

</div>

> [@Eric](#):
>
> I have a code question…

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.

---

<div class="post-metadata">

### Author: ![Eric](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.fudiabetes.org/eric/32/9209_2.png) [@Eric](https://forum.fudiabetes.org/u/Eric)
#### Post date: [March 30, 2022, 9:03pm UTC](https://forum.fudiabetes.org/t/loop-my-new-build-of-freeaps-my-mods-and-some-questions/12202/54 "2022-03-30T21:03:45Z")

</div>

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! 😂

[Previous page](https://forum.fudiabetes.org/t/loop-my-new-build-of-freeaps-my-mods-and-some-questions/12202.md?page=2)
