bewest / decoding-carelink

python serial driver for mm comlink2 protocol
http://bewest.github.io/decoding-carelink
Other
71 stars 52 forks source link

parsing BolusWizard record depends on BG units #201

Closed ecc1 closed 8 years ago

ecc1 commented 8 years ago

A user of a 753 pump using mg/dL for BG units noticed that BolusWizard records are being parsed incorrectly, because of

https://github.com/bewest/decoding-carelink/blob/master/decocare/records/bolus.py#L141

(This pump model has MMOL_DEFAULT = True).

I think the correct fix is to do a ReadBGUnits call during session initialization, after ReadPumpModel, and to use this dynamic value rather than the static default when decoding records.

ecc1 commented 8 years ago

Never mind, I see that this has been addressed in https://github.com/openaps/decocare. I and probably the user who reported it were still pulling from this repo.