diff options
author | Diego Elio Pettenò <flameeyes@flameeyes.eu> | 2018-12-19 15:52:14 +0100 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@flameeyes.eu> | 2018-12-19 15:52:14 +0100 |
commit | bbdb7c84b1f199bbf72df5759587c574bb3fd9c0 (patch) | |
tree | 8d9961f52a90b41b2e46f2867ad7c79ecd1b4b8f | |
parent | Fix most of the pylint output, and hide away some that is not needed. (diff) | |
download | glucometerutils-bbdb7c84b1f199bbf72df5759587c574bb3fd9c0.tar glucometerutils-bbdb7c84b1f199bbf72df5759587c574bb3fd9c0.tar.gz glucometerutils-bbdb7c84b1f199bbf72df5759587c574bb3fd9c0.tar.bz2 glucometerutils-bbdb7c84b1f199bbf72df5759587c574bb3fd9c0.tar.lz glucometerutils-bbdb7c84b1f199bbf72df5759587c574bb3fd9c0.tar.xz glucometerutils-bbdb7c84b1f199bbf72df5759587c574bb3fd9c0.tar.zst glucometerutils-bbdb7c84b1f199bbf72df5759587c574bb3fd9c0.zip |
Diffstat (limited to '')
-rw-r--r-- | glucometerutils/drivers/otverio2015.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/glucometerutils/drivers/otverio2015.py b/glucometerutils/drivers/otverio2015.py index 3a73e20..0f99f52 100644 --- a/glucometerutils/drivers/otverio2015.py +++ b/glucometerutils/drivers/otverio2015.py @@ -54,7 +54,7 @@ _QUERY_REQUEST = construct.Struct( ) _QUERY_RESPONSE = construct.Struct( - construct.Const(b'\x03'), + construct.Const(b'\x03\x06'), 'value' / construct.CString(encoding='utf-16-le'), ) @@ -183,10 +183,7 @@ class Device: response = self._send_request( 3, _QUERY_REQUEST, {'selector': selector}, _QUERY_RESPONSE) - # Unfortunately the CString implementation in construct does not support - # multi-byte encodings, so we need to discard the terminating null byte - # ourself. - return response.value[:-1] + return response.value def get_meter_info(self): return common.MeterInfo( |