JohanDegraeve / xdripswift

xdrip for iOS, written in Swift
GNU General Public License v3.0
316 stars 310 forks source link

Live Activity downsampling: improvements #518

Closed stami closed 3 months ago

stami commented 3 months ago

I don't know why, but the 275 that was yesterday fine, was today morning too much. I need to use this a while on my device before I trust the value is low enough to not to fail.

paulplant commented 3 months ago

Tested, works fine (obviously) for 5-minute readings. Screenshot below just to document the PR after the strange sampling yesterday.

CBA4BEB6-45F8-4690-8B5C-5A2D4147C5DE_4_5005_c

@stami , could you show a screenshot of the downsampled 260 reading limit Just to document it all. Do you think there is any reason to drop to 250 to make extra sure?

paulplant commented 3 months ago

Just wanted to say that your changes helped me learn some of the things I should have taken into account / done from the beginning. Thanks!

Either way, I will also look at moving all of the code out of RootViewController and putting it all into the LiveActivityManager class as that's really where it should have been from the beginning!

stami commented 3 months ago

Sure! For reference, the downsampled 260 readings (from a bit over 400).

8 hours image

3 hours image

Original image

I'd like to wait and see for a couple of days how this 260 keeps working for me. Also moving those computed properties to not to be stored, we got a couple of extra bytes more, so I am optimistic this will be low enough.