summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xglucometer.py2
-rw-r--r--glucometerutils/drivers/fsprecisionneo.py3
-rw-r--r--glucometerutils/support/hiddevice.py4
-rw-r--r--glucometerutils/support/serial.py4
4 files changed, 4 insertions, 9 deletions
diff --git a/glucometer.py b/glucometer.py
index 827cf2d..88c44b4 100755
--- a/glucometer.py
+++ b/glucometer.py
@@ -82,7 +82,7 @@ def main():
print(inspect.getdoc(driver))
return 0
- device = driver.Device(args.device, args.with_ketone)
+ device = driver.Device(args.device)
device.connect()
device_info = device.get_meter_info()
diff --git a/glucometerutils/drivers/fsprecisionneo.py b/glucometerutils/drivers/fsprecisionneo.py
index e1c2082..6fd07c2 100644
--- a/glucometerutils/drivers/fsprecisionneo.py
+++ b/glucometerutils/drivers/fsprecisionneo.py
@@ -74,8 +74,7 @@ class Device(freestyle.FreeStyleHidDevice):
cls = None
if record and record[0] == _TYPE_GLUCOSE_READING:
cls = common.GlucoseReading
- elif self.with_ketone and record or (record and record[0] ==
- _TYPE_KETONE_READING):
+ elif record and record[0] == _TYPE_KETONE_READING:
cls = common.KetoneReading
else:
continue
diff --git a/glucometerutils/support/hiddevice.py b/glucometerutils/support/hiddevice.py
index 0ffa028..86203ba 100644
--- a/glucometerutils/support/hiddevice.py
+++ b/glucometerutils/support/hiddevice.py
@@ -42,7 +42,7 @@ class HidDevice(object):
TIMEOUT_MS = None
- def __init__(self, device, with_ketone=False):
+ def __init__(self, device):
if None in (self.USB_VENDOR_ID, self.USB_PRODUCT_ID) and not device:
raise exceptions.CommandLineError(
'--device parameter is required, should point to a /dev/hidraw '
@@ -54,8 +54,6 @@ class HidDevice(object):
raise exceptions.ConnectionFailed(
message='Path %s does not exist.' % device)
- self.with_ketone = with_ketone
-
# If the user passed a device, try opening it.
if device:
self.handle_ = open(device, 'w+b')
diff --git a/glucometerutils/support/serial.py b/glucometerutils/support/serial.py
index 6f8b486..d4f352b 100644
--- a/glucometerutils/support/serial.py
+++ b/glucometerutils/support/serial.py
@@ -45,11 +45,9 @@ class SerialDevice(object):
TIMEOUT = 1
- def __init__(self, device, with_ketone=False):
+ def __init__(self, device):
assert self.BAUDRATE is not None
- self.with_ketone = with_ketone
-
if not device and self.DEFAULT_CABLE_ID:
logging.info(
'No --device parameter provided, looking for default cable.')