nightscout / Trio

MIT License
46 stars 130 forks source link

Display Pump Status Highlight Message in home view #218

Closed avouspierre closed 1 month ago

avouspierre commented 1 month ago

Display the eventual Pump Statut Highlight Message in home view if state is warning or critical.

fix partially issue #207 with displaying "No pod" in the homeview.

Example in French :

Warning message Critical message
CleanShot 2024-05-19 at 09 44 58@2x CleanShot 2024-05-19 at 09 44 27@2x
bjornoleh commented 1 month ago

I suppose Statut is a typo and should be replaced with Status in English?

marionbarker commented 1 month ago

I agree with @bjornoleh. The variable and function names should use Status: pumpStatutHighlightMessage and displayPumpStatutHighlightMessage.

Start by testing what is there (or not there) in dev, commit 5e513441. Note - the expiration count-down issue seems to be present in dev and not caused or addressed by this PR.

Test without the patch with pods using an rPi DASH simulator.

Test after applying the patch with pods using an rPi DASH simulator.

These next things are new and a success:

Yet to do: Medtronic pod testing. So far so good.

avouspierre commented 1 month ago

@marionbarker - I tried to analyse some test results with my rPi simulator :

Seems a correct behavior.

Seems a correct behavior. When reservoir = 0 ➡️ message "No insulin" and error alert.

Seems correct because a alert (Exceeded maximum Pod of Life...) is provided by pump when pod age > max ➡️ message "Pod expired".

avouspierre commented 1 month ago

Updated with the correction of statut ➡️ status

marionbarker commented 1 month ago

My prior test was not valid. A real pod has an alert set when it has a notification or if it expires. (My apologies - I often forget that I need to set the alert as well as the time to get reasonable responses with the rPi DASH simulator.)

I repeated the test for what happens near the time the pod reaches expiration.

Stages:

MikePlante1 commented 1 month ago

GitHub/Xcode problems slowed me down a bunch, so I'll have to continue this tomorrow.

From my initial test: Fresh install to iPhone SE (2nd gen) iOS 16.2 "Add Pump" icon Added Medtronic 722 pump + OrangeLink icon changed to "!! Signal Loss" (much better than staying at "add pump" icon like before) Added cgm (glucose simulator) and icon changed to typical Medtronic status icons

MikePlante1 commented 1 month ago

Okay, I finished some more tests with my Medtronic 722.

It shows ⚠️Insulin Suspended when the pump is suspended from the pump module in Trio, when the pump is suspended from the physical pump's menu, and when the pump completely runs out of insulin (actually runs out, not just says 0U)

The typical Medtronic status icons (battery and reservoir) are displayed at all other times, including when the pump claims 0U but actually still has insulin left, when the pump is out of range of the OrangeLink, and when the OrangeLink is out of range of the phone.

bjornoleh commented 1 month ago

Merging with two approvals (several when including those before the last commit with only a trivial change).