rileylink_ios icon indicating copy to clipboard operation
rileylink_ios copied to clipboard

Avoid unecessary handling for duplicate packets.

Open ps2 opened this issue 10 years ago • 3 comments

A simple "is this the same packet as the last one we handled, and if so, drop it" should cut down on most of the duplicates.

ps2 avatar Sep 16 '15 03:09 ps2

Yeah, that's what I'm doing, though equality is defined as lhs.pumpDate == rhs.pumpDate && lhs.glucoseDate == rhs.glucoseDate since the sequence numbers will differ.

loudnate avatar Sep 16 '15 05:09 loudnate

Same logic is done in both Loop and RileyLink. Though I would like to record what the actual MySentry does, as I remember it had a way of ACKing that avoided subsequent packets being sent from the pump.

ps2 avatar Aug 07 '16 19:08 ps2

The original problem with my attempts to ACK was not replying with the sequence number. You figured that out during refactoring of the sentry pairing, so maybe we should try again.

I'd love to get that 10s back every 5 minutes to ease my phone's battery usage.

loudnate avatar Aug 08 '16 16:08 loudnate