# -*- coding: utf-8 -*- # # SPDX-FileCopyrightText: © 2017 The glucometerutils Authors # SPDX-License-Identifier: MIT """Driver for FreeStyle Optium devices. Supported features: - get readings (ignores ketone results); - use the glucose unit preset on the device by default; - get and set date and time; - get serial number and software version. Expected device path: /dev/ttyUSB0 or similar serial port device. Further information on the device protocol can be found at https://protocols.glucometers.tech/abbott/freestyle-optium """ import datetime import logging import re from typing import Generator, NoReturn, Sequence from glucometerutils import common, exceptions from glucometerutils.support import driver_base, serial _CLOCK_RE = re.compile( r"^Clock:\t(?P[A-Z][a-z]{2}) (?P[0-9]{2}) (?P[0-9]{4})\t" r"(?P