Skip to content

Commit f9867d8

Browse files
committed
Add Rise/Fall rate alarm decoding
1 parent f0acd2b commit f9867d8

File tree

4 files changed

+6
-1
lines changed

4 files changed

+6
-1
lines changed

decocare/commands.py

+1
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,7 @@ class Bolus (PumpCommand):
475475
descr = "Bolus"
476476
params = [ ]
477477
def getData(self):
478+
print(str([hex(ch) for ch in self.data]))
478479
received = True if self.data[0] is 0x0c else False
479480
return dict(recieved=received, _type='BolusRequest')
480481

decocare/helpers/cli.py

+1
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ def exec_request (self, pump, msg, args={},
202202
if dryrun:
203203
print "skipping query", pump, msg, args
204204
return False
205+
print msg
205206
response = pump.query(msg, **args)
206207
print "response: %s" % response
207208
if render_hexdump:

decocare/history.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,9 @@ class AlarmSensor (KnownRecord):
328328
112: 'Weak Signal',
329329
113: 'Lost Sensor',
330330
114: 'High Glucose Predicted',
331-
115: 'Low Glucose Predicted'
331+
115: 'Low Glucose Predicted',
332+
116: 'Rise Rate',
333+
117: 'Fall Rate'
332334
}
333335

334336
def decode(self):

decocare/stick.py

+1
Original file line numberDiff line numberDiff line change
@@ -467,6 +467,7 @@ def __str__(self):
467467
def __repr__(self):
468468
return '<{0}>'.format(str(self))
469469
def process(self):
470+
print "PROCESSING!"
470471
"""
471472
Working with the usb stick typically follows a pretty routine process:
472473
1. send our opcode, get a response

0 commit comments

Comments
 (0)