openaps / decocare

python serial driver for mm comlink2 protocol
Other
27 stars 29 forks source link

CGM page decoding needs some enhancements and additional events #15

Open tmecklem opened 7 years ago

tmecklem commented 7 years ago

New cgm event discoveries from comparison with Excel dumps and decoding various example pages:

0x03 Sensor Calibration

0x04 Sensor Packet

0x05 Sensor Error

0x06 Sensor Data Low

0x07 “Fokko-07” - Sensor Data High

0x08 Sensor Timestamp

0x0B Sensor Status

0x0D Sensor Sync

0x0E Cal BG For GH

0x10 “10-Something”

0x11, 0x12 and 0x13 (aka "19-Something")

Algorithms discoveries/changes needed:

tmecklem commented 7 years ago

Two implementations that can serve as a reference for the requested changes:

Elixir

Implementation: https://github.com/tmecklem/ex_decocare/tree/master/lib

Test Suite: https://github.com/tmecklem/ex_decocare/tree/master/test

Swift

Implementation:

https://github.com/ps2/rileylink_ios/blob/dev/MinimedKit/GlucosePage.swift https://github.com/ps2/rileylink_ios/tree/dev/MinimedKit/GlucoseEvents

Tests:

https://github.com/ps2/rileylink_ios/blob/dev/MinimedKitTests/GlucosePageTests.swift https://github.com/ps2/rileylink_ios/tree/dev/MinimedKitTests/GlucoseEvents