nightscout / Trio

Trio - an automated insulin delivery system for iOS based on the OpenAPS algorithm with adaptations.
https://docs.diy-trio.org/en/latest/
MIT License
98 stars 526 forks source link

set default state and image for simulatorPump #359

Closed kskandis closed 4 months ago

kskandis commented 4 months ago

This fixes an issue with "Add pump" not displaying pump after Simulator Pump is added per @dnzxy.

After fresh install on iPhone (or after Pump Delete in Trio on iPhone), home screen should look like:

image

Tap on "Add pump" and select "Add Simulator". Home screen should look like:

image

Tapping on the Pump Simulator, then select Simulator Settings, and edit Reservoir or Battery values. Home screen should reflect the new values:

image
MikePlante1 commented 4 months ago

Both with and without this PR applied, I notice with a fresh install on a simulator, adding a simulator pump still shows the "add pump" icon after selecting it. Sending a bolus changes the "add pump" icon to a "100% battery" icon, though, both with and without this PR. Removing the pump instantly changes the icon to "add pump", and if I then select "simulator" again for pump it shows the "100% battery" icon as soon as it's selected without having to issue another bolus.

Am I testing the wrong thing? What steps should I take?

kskandis commented 4 months ago

Am I testing the wrong thing? What steps should I take?

No, you are correct. There is still an issue with this PR that needs further investigation. I'll convert this PR to a draft 'til we isolate the additional issues.