BOLUS_BG will add BG readings which are associated with boluses
on the pump into the Nightscout treatment object. It will determine
whether the BG reading was automatically filled via the Dexcom
connection on the pump or was manually entered by seeing if the
BG reading matches the current CGM reading as known to the pump
at that time. Support for this is nearly complete.
CGM will add Dexcom CGM readings from the pump to Nightscout
as SGV (sensor glucose value) entries. This should only be
used in a situation where xDrip is not used and the pump
connection to the CGM will be the only source of CGM
data to Nightscout. This requires additional testing before
it should be considered ready.
Both options are hidden behind the ENABLE_TESTING_MODES=true
environment variable. Run tconnectsync with this environment
variable and BOLUS_BG and CGM will be usable with the
--features argument.
After trying to run auto update, I was met with an error saying that patientObjectId was not found, I commented the code out and the auto update ran. I propose that this line is removed as I do not see any use for the variable anywhere.
Changes all code which interacts with the nightscout api to
invoke it via a NightscoutApi object which is passed to it
and defined in the main, rather than having utility methods
in nightscout.py which rely on the global secret file state
of nightscout url/secret.
Before an instance of the android api is invoked via the TConnectApi
wrapper, the needs_relogin method is called to see whether the
current access token has expired. That check was using the refresh
token expiration date instead of the access token expiration date.
(The refresh tokens in the android api are currently unused.)