diff --git a/decocare/history.py b/decocare/history.py index c57ee96..895065d 100644 --- a/decocare/history.py +++ b/decocare/history.py @@ -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): @@ -702,7 +708,7 @@ def decode (self): try: return (dict(valid_date=date(*mid).isoformat())) except ValueError, e: - return (dict(error_date=mid)) + return (dict(error_date=mid, error=str(e))) _confirmed.append(Sara6E) diff --git a/decocare/models/__init__.py b/decocare/models/__init__.py index b400e30..4d4518f 100644 --- a/decocare/models/__init__.py +++ b/decocare/models/__init__.py @@ -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 @@ -254,9 +255,11 @@ class Model723 (Model523): pass class Model530 (Model523): + Ian50Body = 34 pass class Model730 (Model530): + Ian50Body = 34 pass class Model540 (Model530):