Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tghoward/wip mystery data #166

Merged
merged 6 commits into from
Feb 6, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion decocare/history.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,12 @@ class Ian69(KnownRecord):
class Ian50(KnownRecord):
opcode = 0x50
body_length = 34

# XXX: tghoward testing on 723 at length 30
body_length = 30
def __init__ (self, head, model, **kwds):
super(Ian50, self).__init__(head, model, **kwds)
self.body_length = model.Ian50Body
_confirmed.append(Ian50)

class Ian54(KnownRecord):
Expand Down Expand Up @@ -699,7 +705,10 @@ def __init__(self, head, larger=False):
def decode (self):
self.parse_time( )
mid = unmask_m_midnight(self.date)[0:3]
return (dict(valid_date=date(*mid).isoformat()))
try:
return (dict(valid_date=date(*mid).isoformat()))
except ValueError, e:
return (dict(error_date=mid, error=str(e)))

_confirmed.append(Sara6E)

Expand Down
3 changes: 3 additions & 0 deletions decocare/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ class PumpModel (object):
basal_strokes = 40
MMOL_DEFAULT = False
larger = False
Ian50Body = 30
def __init__(self, model, session):
self.model = model
self.session = session
Expand Down Expand Up @@ -254,9 +255,11 @@ class Model723 (Model523):
pass

class Model530 (Model523):
Ian50Body = 34
pass

class Model730 (Model530):
Ian50Body = 34
pass

class Model540 (Model530):
Expand Down
7 changes: 6 additions & 1 deletion decocare/stick.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
Consumes a :ref:`link`, which allows us to debug everything on the
wire.

This module contains a class for each logical operation available in
the stick's firmware. Each operation is sent has a string of bytes
over the serial/usb interface, and then a response with a particular
format can be read.

"""

log = logging.getLogger( ).getChild(__name__)
Expand All @@ -36,7 +41,7 @@ class StickCommand(object):
allows you to send recieve commands to the pump, by formatting your
message into payloads with opcodes, and then letting the stick work
on what you've given it. It's kind of like a modem with this funky
binary interface.
binary interface and 64 byte payloads.
"""
code = [ 0x00 ]
label = 'example stick command'
Expand Down
Binary file added logs/2016-01-09/ReadHistoryData-page-0.data
Binary file not shown.
Binary file added logs/2016-01-09/ReadHistoryData-page-10.data
Binary file not shown.
Binary file added logs/2016-01-09/ReadHistoryData-page-11.data
Binary file not shown.
Binary file added logs/2016-01-09/ReadHistoryData-page-12.data
Binary file not shown.
Binary file added logs/2016-01-09/ReadHistoryData-page-13.data
Binary file not shown.
Binary file added logs/2016-01-09/ReadHistoryData-page-14.data
Binary file not shown.
Binary file added logs/2016-01-09/ReadHistoryData-page-15.data
Binary file not shown.
Binary file added logs/2016-01-09/ReadHistoryData-page-16.data
Binary file not shown.
Binary file added logs/2016-01-09/ReadHistoryData-page-17.data
Binary file not shown.
Binary file added logs/2016-01-09/ReadHistoryData-page-18.data
Binary file not shown.
Binary file added logs/2016-01-09/ReadHistoryData-page-19.data
Binary file not shown.
Binary file added logs/2016-01-09/ReadHistoryData-page-20.data
Binary file not shown.
Binary file added logs/2016-01-09/ReadHistoryData-page-21.data
Binary file not shown.
Binary file added logs/2016-01-09/ReadHistoryData-page-22.data
Binary file not shown.
Binary file added logs/2016-01-09/ReadHistoryData-page-23.data
Binary file not shown.
Binary file added logs/2016-01-09/ReadHistoryData-page-24.data
Binary file not shown.
Binary file added logs/2016-01-09/ReadHistoryData-page-25.data
Binary file not shown.
Binary file added logs/2016-01-09/ReadHistoryData-page-26.data
Binary file not shown.
Binary file added logs/2016-01-09/ReadHistoryData-page-27.data
Binary file not shown.
Binary file added logs/2016-01-09/ReadHistoryData-page-28.data
Binary file not shown.
Binary file added logs/2016-01-09/ReadHistoryData-page-29.data
Binary file not shown.
Binary file added logs/2016-01-09/ReadHistoryData-page-30.data
Binary file not shown.
Binary file added logs/2016-01-09/ReadHistoryData-page-31.data
Binary file not shown.
Binary file added logs/2016-01-09/ReadHistoryData-page-32.data
Binary file not shown.
Binary file added logs/2016-01-09/ReadHistoryData-page-33.data
Binary file not shown.
Binary file added logs/2016-01-09/ReadHistoryData-page-34.data
Binary file not shown.
Binary file added logs/2016-01-09/ReadHistoryData-page-35.data
Binary file not shown.
1 change: 1 addition & 0 deletions logs/2016-01-09/ReadHistoryData-page-36.data
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions logs/2016-01-09/ReadHistoryData-page-37.data
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Binary file added logs/2016-01-09/ReadHistoryData-page-7.data
Binary file not shown.
Binary file added logs/2016-01-09/ReadHistoryData-page-8.data
Binary file not shown.
Binary file added logs/2016-01-09/ReadHistoryData-page-9.data
Binary file not shown.