Skip to content

Commit

Permalink
Merge pull request #166 from bewest/tghoward/wip-mystery-data
Browse files Browse the repository at this point in the history
Tghoward/wip mystery data
  • Loading branch information
bewest committed Feb 6, 2016
2 parents 45fca76 + e61ff48 commit 3e5dd4a
Show file tree
Hide file tree
Showing 35 changed files with 21 additions and 2 deletions.
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.

0 comments on commit 3e5dd4a

Please sign in to comment.