bewest / decoding-carelink

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

CalBGForGH needs another byte/bit #124

Closed loudnate closed 8 years ago

loudnate commented 9 years ago
{
    "body": "2a", 
    "packet_size": 5, 
    "amount": 42, 
    "name": "CalBGForGH", 
    "raw": "86-20-2b-8f-2a", 
    "date": "2015-08-11T06:32:00", 
    "date_type": "minSpecific", 
    "_tell": 81, 
    "op": "0x0e"
  }

Was actually 298. (Nevermind that the 1st-gen Medtronic sensor was reporting 180...)

oskarpearson commented 9 years ago

I think I may have encountered this issue too, but I'm not 100% sure given the description :)

The pump was disconnected, and when reconnected BG was high. The sensor was then re-linked, and calibrated to 16.7 (around 300 - I only have UK units). 4.5 units insulin was given.

The screen of the pump showed BG of 16.7 a couple minutes later.

  {
    "body": "2d",
    "packet_size": 5,
    "amount": 45,
    "name": "CalBGForGH",
    "raw": "93-53-29-0f-2d",
    "date": "2015-09-09T19:19:00",
    "date_type": "minSpecific",
    "_tell": 45,
    "op": "0x0e"
  },
loudnate commented 9 years ago

45 is 2D in hex. 12D in hex is 301. We need to find the bit that is flipped in this entry but not flipped in entries less than 256 mg/dL. Can you find another data point? On Wed, Sep 9, 2015 at 2:31 PM Oskar Pearson notifications@github.com wrote:

I think I may have encountered this issue too, but I'm not 100% sure given the description :)

The pump was disconnected, and when reconnected BG was high. The sensor was then re-linked, and calibrated to 16.7 (around 300 - I only have UK units). 4.5 units insulin was given.

The screen of the pump showed BG of 16.7 a couple minutes later.

{ "body": "2d", "packet_size": 5, "amount": 45, "name": "CalBGForGH", "raw": "93-53-29-0f-2d", "date": "2015-09-09T19:19:00", "date_type": "minSpecific", "_tell": 45, "op": "0x0e" },

— Reply to this email directly or view it on GitHub https://github.com/bewest/decoding-carelink/issues/124#issuecomment-139051684 .

loudnate commented 8 years ago

The third left-most bit in the 3rd byte (day) is the magic one.