Skip to content
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

🐛 pumpManager(hasNewPumpEvents): Missing implementation for replacePendingEvents #405

Open
bastiaanv opened this issue Sep 11, 2024 · 2 comments
Labels
bug Something isn't working long-term For later, doesn't get staled

Comments

@bastiaanv
Copy link
Contributor

bastiaanv commented Sep 11, 2024

Describe the bug

Discord user Mr Mike is reporting issues with double insulin entries. At first it looked like issues with the time sync of the pump, but after looking closer the doubles insulin entries are marked from inside Trio (not from the history sync with the pump). After some investigation, I saw that the property replacePendingEvents isn't used in the pumpManager(hasNewPumpEvents) function inside the DeviceDataManager. This is a major problem for DanaKit, because DanaKit reports a bolus the following:

  1. Send the bolus command to the pump and wait for the accepted response
  2. Start the bolusReporter (for the Trio's UI) and report this bolus to the DeviceDataManager via pumpManager(hasNewPumpEvents), but leave the isMutable property inside the DoseEntry on true and set replacePendingEvents to false.
  3. When the bolus has finished/cancelled/aborted, calculate the delivered amount, set the isMutable property to false and re-report the bolus but now with replacePendingEvents to true.
  4. The old bolus should be deleted and the new bolus should sustain. But the both stay alive inside the insulin history (see screenshot)

Attach a Log

N.a.

To Reproduce

Steps to reproduce the behavior:

  1. Do a bolus (on a real Dana pump or via simulator)
  2. See a double insulin entry in the insulin history (with possible different times, but can happen on the same time depending on pump settings and bolus amount)

Expected behavior

Whenever a pumpManager(hasNewPumpEvents) is called with replacePendingEvents: true, it should delete all the NewPumpEvents which have a dose containing isMutable: true.

See Loop implementation:

Screenshots

IMG_9296 png

Setup Information (please complete the following information):

Smartphone:

N.a.

Pump:

  • Manufacturer: Sooil
  • Model: Dana-I & DanaRS-v3

CGM:

N.a.

Trio Version:

  • Version Number: 0.2.0
  • Repo: nightscout/trio
  • Branch: feat/Dana
  • Git Reference: ba01461

Technical Details

I believe DanaKit is the only dependency inside Trio which uses this method. I am not sure if I can patch this without losing this functionality inside Loop

Copy link

hey 👋 - no triage is done for 30 days 🤐 ... anybody? triage is required!

Copy link

hey 👋 - no triage is done for 30 days 🤐 ... anybody? triage is required!

@github-actions github-actions bot added the stale label Nov 18, 2024
@dnzxy dnzxy added long-term For later, doesn't get staled and removed needs-triage stale labels Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working long-term For later, doesn't get staled
Projects
Status: No status
Development

No branches or pull requests

3 participants