From dea8ec030eda9d9d2c4f22d1491cae5d2b94c79a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Elio=20Petten=C3=B2?= Date: Sat, 3 Jun 2017 15:46:35 +0100 Subject: Abbott devices: add support for using hidapi library. This allows these drivers to be used on operating systems other than Linux, as hidapi abstracts away the access. The interface is similar enough to using hidraw that the actual code only needed minimal changes. Maintain the ability to access the devices with the hidraw path too, without forcing the dependency. --- glucometerutils/drivers/fslibre.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'glucometerutils/drivers/fslibre.py') diff --git a/glucometerutils/drivers/fslibre.py b/glucometerutils/drivers/fslibre.py index b364cc2..4dda376 100644 --- a/glucometerutils/drivers/fslibre.py +++ b/glucometerutils/drivers/fslibre.py @@ -6,11 +6,13 @@ Supported features: - get and set date and time; - get serial number and software version. -Expected device path: /dev/hidraw9 or similar HID device. +Expected device path: /dev/hidraw9 or similar HID device. Optional when using +HIDAPI. Further information on the device protocol can be found at https://flameeyes.github.io/glucometer-protocols/abbott/freestyle-libre + """ __author__ = 'Diego Elio Pettenò' @@ -164,6 +166,8 @@ def _parse_arresult(record): class Device(freestyle.FreeStyleHidDevice): """Glucometer driver for FreeStyle Libre devices.""" + USB_PRODUCT_ID = 0x3650 + def get_meter_info(self): """Return the device information in structured form.""" return common.MeterInfo( -- cgit v1.2.3