Repository navigation
Forward the newest trend reading, not the oldest - #58
Conversation
glucosesToSamplesFilter returns readings oldest-first since afba845 (Sort glucose before filterDateRange), but the MiaoMiao/Bubble path still kept trends.first as the newest, so it forwarded the oldest new trend reading each cycle. Use .last, as the Libre 2 EU path does.
|
LGTM. By dropping third party transmitter support, (some of which actively block phone nfc scan from working), we could focus more on the libre 2 and 2 plus direct path, allowing also activation of the sensor via phone nfc scan . This is just some thoughts for now. |
|
Yes, I don’t have actual stats on usage of libre one so I can’t say one way or the other whether or not it’s still being used but if we have good evidence that it’s not I think it does definitely make sense to drop it. |
Loop: issue reports to the LoopKit developers (LoopKit/Loop#2585), even alarm loudness (LoopKit/Loop#2589), stop AlarmKit alarms after a relaunch (LoopKit/Loop#2590), alarms play through silent mode (LoopKit/Loop#2591), carb entry sync identifier (LoopKit/Loop#2587). LoopKit: watch glucose duplicate crash (LoopKit/LoopKit#655), chart back-gesture (LoopKit/LoopKit#656, LoopKit/LoopKit#658), iOS 17.6 and watchOS 10.6 (LoopKit/LoopKit#659), previous pump's reservoir values (LoopKit/LoopKit#657), carb entry sync identifier (LoopKit/LoopKit#654). LibreLoop: not-an-Abbott-product notice (LoopKit/LibreLoop#25), iOS 17.6 (LoopKit/LibreLoop#26), backfilled readings in Recent Readings (LoopKit/LibreLoop#27). LibreTransmitter: forward the newest trend reading (LoopKit/LibreTransmitter#58). EversenseKit and MixpanelService: iOS 17.6 (LoopKit/EversenseKit#7, LoopKit/MixpanelService#9).
Since afba845 ("Sort glucose before filterDateRange", May 2026),
glucosesToSamplesFilterreturns readings oldest-first. The MiaoMiao/Bubble path inLibreTransmitterManager+Transmitters.swiftstill keepstrends.firstas "the newest" reading.Each cycle filters to readings newer than the previous cycle's newest reading (
latestBackfill)..firstthen picks the oldest of those. So Loop gets a reading from the start of the interval since the last cycle, about one cycle (~5 min) older than the current one, rather than the current reading.This changes it to
.last, the same as the Libre 2 EU path (LibreTransmitterManager+Libre2EU.swift).Tested by building only; there's no MiaoMiao/Bubble hardware here to check against.