diff options
author | Diego Elio Pettenò <flameeyes@flameeyes.eu> | 2018-01-07 15:25:56 +0100 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@flameeyes.eu> | 2018-01-07 15:25:56 +0100 |
commit | 058ddbfe4f860ba0bd5294f996dce0d53290995a (patch) | |
tree | aa0d094d64d2b4cc8891a93c7fc030e3103af388 | |
parent | otverioiq: fix up a couple of syntax errors, and update baud rate. (diff) | |
download | glucometerutils-058ddbfe4f860ba0bd5294f996dce0d53290995a.tar glucometerutils-058ddbfe4f860ba0bd5294f996dce0d53290995a.tar.gz glucometerutils-058ddbfe4f860ba0bd5294f996dce0d53290995a.tar.bz2 glucometerutils-058ddbfe4f860ba0bd5294f996dce0d53290995a.tar.lz glucometerutils-058ddbfe4f860ba0bd5294f996dce0d53290995a.tar.xz glucometerutils-058ddbfe4f860ba0bd5294f996dce0d53290995a.tar.zst glucometerutils-058ddbfe4f860ba0bd5294f996dce0d53290995a.zip |
-rw-r--r-- | glucometerutils/drivers/otverioiq.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/glucometerutils/drivers/otverioiq.py b/glucometerutils/drivers/otverioiq.py index 0eb94b4..d239cff 100644 --- a/glucometerutils/drivers/otverioiq.py +++ b/glucometerutils/drivers/otverioiq.py @@ -88,10 +88,9 @@ _MEAL_FLAG = { _READING_RESPONSE = construct.Struct( lifescan_binary_protocol.COMMAND_SUCCESS, - 'timestamp' / construct_extras.Timestamp(construct.Int32ul), - 'value' / construct.Int32ul, + 'timestamp' / lifescan_binary_protocol.VERIO_TIMESTAMP, + 'value' / construct.Int16ul, 'control_test' / construct.Flag, - construct.Padding(1), # unknown 'meal' / construct.SymmetricMapping( construct.Byte, _MEAL_FLAG), construct.Padding(2), # unknown @@ -190,8 +189,7 @@ class Device(serial.SerialDevice): def _get_reading_count(self): response = self._send_request( - _READ_RECORD_REQUEST, {'record_id': _INVALID_RECORD}, - _READING_COUNT_RESPONSE) + _READ_RECORD_COUNT_REQUEST, None, _READ_RECORD_COUNT_RESPONSE) return response.count def _get_reading(self, record_id): |