diff options
author | Diego Elio Pettenò <flameeyes@flameeyes.eu> | 2018-03-17 14:49:27 +0100 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@flameeyes.eu> | 2018-03-17 14:49:27 +0100 |
commit | 45f68d03bceedbb23c64e7c4457297ceb09b61d2 (patch) | |
tree | 1cfc9118894198a3d4bc75612147c8ffd755b97d | |
parent | fsoptium: add debug logging when sending commands. (diff) | |
download | glucometerutils-45f68d03bceedbb23c64e7c4457297ceb09b61d2.tar glucometerutils-45f68d03bceedbb23c64e7c4457297ceb09b61d2.tar.gz glucometerutils-45f68d03bceedbb23c64e7c4457297ceb09b61d2.tar.bz2 glucometerutils-45f68d03bceedbb23c64e7c4457297ceb09b61d2.tar.lz glucometerutils-45f68d03bceedbb23c64e7c4457297ceb09b61d2.tar.xz glucometerutils-45f68d03bceedbb23c64e7c4457297ceb09b61d2.tar.zst glucometerutils-45f68d03bceedbb23c64e7c4457297ceb09b61d2.zip |
-rw-r--r-- | glucometerutils/support/freestyle.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/glucometerutils/support/freestyle.py b/glucometerutils/support/freestyle.py index 9b7d72e..7f9c7e8 100644 --- a/glucometerutils/support/freestyle.py +++ b/glucometerutils/support/freestyle.py @@ -103,12 +103,16 @@ class FreeStyleHidDevice(hiddevice.HidDevice): usb_packet = _FREESTYLE_MESSAGE.build( {'message_type': message_type, 'command': command}) + logging.debug('Sending packet: %r', usb_packet) + self._write(usb_packet) def _read_response(self): """Read the response from the device and extracts it.""" usb_packet = self._read() + logging.debug('Read packet: %r', usb_packet) + assert usb_packet message_type = usb_packet[0] message_length = usb_packet[1] |