summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@flameeyes.eu>2018-03-17 14:38:14 +0100
committerDiego Elio Pettenò <flameeyes@flameeyes.eu>2018-03-17 14:41:48 +0100
commit8cc54e346a649effe117f8b684a6b9a5693eed1e (patch)
tree4587265e4d80951a9d1b1f0af71410fe933362a7
parentUpdate lifescan_binary_protocol.py (diff)
downloadglucometerutils-8cc54e346a649effe117f8b684a6b9a5693eed1e.tar
glucometerutils-8cc54e346a649effe117f8b684a6b9a5693eed1e.tar.gz
glucometerutils-8cc54e346a649effe117f8b684a6b9a5693eed1e.tar.bz2
glucometerutils-8cc54e346a649effe117f8b684a6b9a5693eed1e.tar.lz
glucometerutils-8cc54e346a649effe117f8b684a6b9a5693eed1e.tar.xz
glucometerutils-8cc54e346a649effe117f8b684a6b9a5693eed1e.tar.zst
glucometerutils-8cc54e346a649effe117f8b684a6b9a5693eed1e.zip
-rw-r--r--glucometerutils/drivers/fsoptium.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/glucometerutils/drivers/fsoptium.py b/glucometerutils/drivers/fsoptium.py
index 5c57ae3..1e1a319 100644
--- a/glucometerutils/drivers/fsoptium.py
+++ b/glucometerutils/drivers/fsoptium.py
@@ -90,11 +90,15 @@ class Device(serial.SerialDevice):
def _send_command(self, command):
cmd_bytes = bytes('$%s\r\n' % command, 'ascii')
+ logging.debug('Sending command: %r', cmd_bytes)
+
self.serial_.write(cmd_bytes)
self.serial_.flush()
response = self.serial_.readlines()
+ logging.debug('Received response: %r', response)
+
# We always want to decode the output, and remove stray \r\n. Any failure in
# decoding means the output is invalid anyway.
decoded_response = [line.decode('ascii').rstrip('\r\n')