diff options
author | Diego Elio Pettenò <flameeyes@flameeyes.eu> | 2017-01-17 01:28:44 +0100 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@flameeyes.eu> | 2017-01-17 01:28:44 +0100 |
commit | cd6d708d687a80587e666c83db51471b2a30c05b (patch) | |
tree | 488c9b6236d8926eda80aa6c61939a2e03eb1394 /glucometerutils | |
parent | fsprecisionneo: fix mistake in readings dump command. (diff) | |
download | glucometerutils-cd6d708d687a80587e666c83db51471b2a30c05b.tar glucometerutils-cd6d708d687a80587e666c83db51471b2a30c05b.tar.gz glucometerutils-cd6d708d687a80587e666c83db51471b2a30c05b.tar.bz2 glucometerutils-cd6d708d687a80587e666c83db51471b2a30c05b.tar.lz glucometerutils-cd6d708d687a80587e666c83db51471b2a30c05b.tar.xz glucometerutils-cd6d708d687a80587e666c83db51471b2a30c05b.tar.zst glucometerutils-cd6d708d687a80587e666c83db51471b2a30c05b.zip |
Diffstat (limited to 'glucometerutils')
-rw-r--r-- | glucometerutils/drivers/fsprecisionneo.py | 12 | ||||
-rw-r--r-- | glucometerutils/support/freestyle.py | 8 |
2 files changed, 10 insertions, 10 deletions
diff --git a/glucometerutils/drivers/fsprecisionneo.py b/glucometerutils/drivers/fsprecisionneo.py index 2b5ae35..c748770 100644 --- a/glucometerutils/drivers/fsprecisionneo.py +++ b/glucometerutils/drivers/fsprecisionneo.py @@ -40,14 +40,6 @@ class Device(freestyle.FreeStyleHidDevice): 'Software version: ' + self._get_version(),), native_unit=self.get_glucose_unit()) - def _get_version(self): - """Return the software version of the device.""" - return self._send_text_command(b'$swver?').rstrip('\r\n') - - def get_serial_number(self): - """Returns the serial number of the device.""" - return self._send_text_command(b'$serlnum?').rstrip('\r\n') - def get_glucose_unit(self): """Returns the glucose unit of the device.""" return common.UNIT_MGDL @@ -58,8 +50,8 @@ class Device(freestyle.FreeStyleHidDevice): if not record or record[0] != _TYPE_GLUCOSE_READING: continue - # Build a _NeoReading object by parsing each of the entries in the - # CSV as integers. + # Build a _reading object by parsing each of the entries in the CSV + # as integers. raw_reading = _NeoReading._make([int(v) for v in record]) timestamp = datetime.datetime( diff --git a/glucometerutils/support/freestyle.py b/glucometerutils/support/freestyle.py index b6dce38..9857086 100644 --- a/glucometerutils/support/freestyle.py +++ b/glucometerutils/support/freestyle.py @@ -152,6 +152,14 @@ class FreeStyleHidDevice(object): # Some of the commands are also shared across devices that use this HID # protocol, but not many. Only provide here those that do seep to change # between them. + def _get_version(self): + """Return the software version of the device.""" + return self._send_text_command(b'$swver?').rstrip('\r\n') + + def get_serial_number(self): + """Returns the serial number of the device.""" + return self._send_text_command(b'$serlnum?').rstrip('\r\n') + def get_datetime(self): """Gets the date and time as reported by the device. |