forked from nightscout/Trio
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(DanaKit): Add fix for double insulin entries
- Loading branch information
Showing
2 changed files
with
30 additions
and
3 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
Submodule DanaKit contains modified content | ||
diff --git a/DanaKit/DanaKit/PumpManager/DanaKitPumpManager.swift b/DanaKit/DanaKit/PumpManager/DanaKitPumpManager.swift | ||
index d795d59..88ca56b 100644 | ||
--- a/DanaKit/DanaKit/PumpManager/DanaKitPumpManager.swift | ||
+++ b/DanaKit/DanaKit/PumpManager/DanaKitPumpManager.swift | ||
@@ -556,18 +556,6 @@ extension DanaKitPumpManager: PumpManager { | ||
self.state.bolusState = .inProgress | ||
self.notifyStateDidChange() | ||
|
||
- DispatchQueue.main.async { | ||
- let dose = self.doseEntry?.toDoseEntry(isMutable: true) | ||
- | ||
- if let dose = dose { | ||
- self.pumpDelegate.notify { (delegate) in | ||
- delegate?.pumpManager(self, hasNewPumpEvents: [NewPumpEvent.bolus(dose: dose, units: dose.programmedUnits)], lastReconciliation: Date.now, replacePendingEvents: false, completion: { _ in }) | ||
- } | ||
- | ||
- self.notifyStateDidChange() | ||
- } | ||
- } | ||
- | ||
completion(nil) | ||
} catch { | ||
self.state.bolusState = .noBolus |
4936421
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@m1key83
Hi, is adding a patchfile to the submodule actually patching the code that is used?
Unfortunatly I cannot test with no Dana, but I have 3 users that use autoISF with Dana and one complained about the double entries.
4936421
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @mountrcg ,
This patch fixed the issue. You can check if your users have the same issue if both entries do not have an extra text like external or manual. The issue is related to unimplemented feature introduced in the new LoopKit: nightscout#405
I updated the DanaKit submodule to include this patch:
https://github.com/loopandlearn/DanaKit/tree/trio