Closed paulplant closed 1 year ago
It's probably not a good idea to build in these checks now, as long as we didn't solve the real root cause, which is the terribly low or high values if the NFC scan failed during sensor startup. This fix would may hide the real issue for the user
OK, but it's just a firewall to prevent any of the many different CGMTransmitter classes from potentially getting out of bounds data into coredata and then onto the user.
I definitely agree that the root cause should be fixed in the case of the Libre 2, but this is just an additional layer of security that would be applied to all subclasses, the same as the if glucose.glucoseLevelRaw > 0
that proceeds it.
It's much easier to add basic sanity checking in RVC before saving to core data, than implementing it into every different CGMTransmitter subclass.
yes, but after fixing the issue with Libre 2 setup. Because if we implement this limit now for Libre 2, users may still have wrong values due to wrong setup (ie failed NFC scan), but would never see it. As it is now, users should see that if they receive values like 1, or > 100.000, that something is really wrong. besides the change for Libre 2 or almost done? probably it's not worth having an intermediate release with just this PR
OK, let's close this and go with the other method.
(not tested!!!)