From d176a98e82fbbb4280cb10c0ffc40bb8476198bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Elio=20Petten=C3=B2?= Date: Sun, 7 Jan 2018 14:29:28 +0000 Subject: otverioiq: fix up set_datetime method. --- glucometerutils/drivers/otverioiq.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/glucometerutils/drivers/otverioiq.py b/glucometerutils/drivers/otverioiq.py index d239cff..d58fa99 100644 --- a/glucometerutils/drivers/otverioiq.py +++ b/glucometerutils/drivers/otverioiq.py @@ -172,9 +172,11 @@ class Device(serial.SerialDevice): response = self._send_request( _WRITE_RTC_REQUEST, { 'timestamp': date, - }, _READ_RTC_RESPONSE) + }, lifescan_binary_protocol.COMMAND_SUCCESS) - return response.timestamp + # The device does not return the new datetime, so confirm by calling + # READ RTC again. + return self.get_datetime() def zero_log(self): self._send_request( -- cgit v1.2.3