Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | pre-commit autoupdate | Diego Elio Pettenò | 2022-12-17 | 1 | -6/+6 |
| | | | | This includes the flake8 repo change. | ||||
* | Mergify: simplify the pull request rules. | Diego Elio Pettenò | 2021-11-02 | 1 | -11/+3 |
| | |||||
* | pre-commit autoupgrade. | Diego Elio Pettenò | 2021-11-02 | 1 | -3/+3 |
| | |||||
* | CI: include Python 3.10 in the list of tested platforms. | Diego Elio Pettenò | 2021-11-02 | 1 | -1/+1 |
| | |||||
* | Add missing dependency on types-python-dateutil. | Diego Elio Pettenò | 2021-11-02 | 1 | -0/+1 |
| | | | | It looks like this was split out of typeshed in the meantime. | ||||
* | Update fsprecisionneo.py | ONO,Tetsuo | 2021-09-18 | 1 | -2/+2 |
| | | | Fixed syntax (missing space) | ||||
* | Update fsprecisionneo.py | ONO,Tetsuo | 2021-09-18 | 1 | -0/+2 |
| | | | Sometimes I gets "LO" record (lower-than 30 ) on using Precision Neo . | ||||
* | pre-commit autoupgrade. | Diego Elio Pettenò | 2021-05-17 | 1 | -5/+5 |
| | |||||
* | CI: Replace Travis CI with GitHub Actions. | Diego Elio Pettenò | 2021-05-17 | 4 | -30/+38 |
| | |||||
* | glucomenareo: new driver added. | Diego Elio Pettenò | 2021-03-27 | 4 | -0/+230 |
| | | | | | | | This driver supports GlucoMen areo by A. Menarini Diagnostics. It possibly works with the GlucoMen Areo 2K but it is untested with it, and does not support reporting Ketone readings. | ||||
* | serial meters support: allow selection of parity mode. | Diego Elio Pettenò | 2021-03-27 | 1 | -1/+2 |
| | | | | | While uncommon there are glucometers that don't use the default parity mode of "none". Allow the drivers to override this. | ||||
* | Round mg/dL conversion to one decimal place. | Diego Elio Pettenò | 2021-03-27 | 1 | -1/+1 |
| | | | | | | This is only affecting accucheck_reports for now, but it makes sure that a round-trip between mmol/L→mg/dL→mmol/L don't lose (or invent) precision. | ||||
* | Add .vscode/ to the ignored list. | Diego Elio Pettenò | 2021-03-27 | 1 | -0/+1 |
| | |||||
* | CSV: use the same number of fields foreach reading | Pierre-Louis Bonicoli | 2021-03-08 | 2 | -2/+33 |
| | | | | | | | | | | | | | | | | | | | | | | | Use 5 fields with KetoneReading and TimeAdjustment too. With this patch: $ glucometer --driver fslibre dump --with-ketone "2021-03-06 16:05:00","","","time","2021-03-06 15:57:59" "2021-03-07 14:34:26","0.01","","blood sample","(Ketone)" "2021-03-07 14:34:49","140.00","","blood sample","(Blood)" "2021-03-07 14:48:46","131.00","","CGM","(Sensor)" "2021-03-07 15:00:18","121.00","","CGM","(Scan)" Without this patch, KetoneReadings and TimeAdjustments use only 4 fields: $ glucometer --driver fslibre dump --with-ketone "2021-03-06 16:05:00","","time","2021-03-06 15:57:59" "2021-03-07 14:34:26","0.01","blood sample","(Ketone)" "2021-03-07 14:34:49","140.00","","blood sample","(Blood)" "2021-03-07 14:48:46","131.00","","CGM","(Sensor)" "2021-03-07 15:00:18","121.00","","CGM","(Scan)" | ||||
* | Travis CI: update matrix of Python versions. | Diego Elio Pettenò | 2021-03-03 | 1 | -1/+2 |
| | |||||
* | freestyle: use freestyle-hid 1.0.2 encoding parameter. | Diego Elio Pettenò | 2021-03-03 | 3 | -8/+13 |
| | | | | | This allows FreeStyle Libre devices to use UTF-8 patient names, while not risking to brick older models that might just support ASCII. | ||||
* | fslibre: add a debug log for the retrieved arresults. | Diego Elio Pettenò | 2021-03-01 | 1 | -0/+2 |
| | | | | This just makes debugging a bit easier. | ||||
* | fslibre: don't drop the first and last characters of the comment. | Diego Elio Pettenò | 2021-03-01 | 1 | -1/+1 |
| | | | | | | The comment string is already parsed out of the quotes (`""`) so there is no reason to drop the first and last characters, which might make the comment itself unreadable. | ||||
* | Re-add missing td42xx tests. | Diego Elio Pettenò | 2021-03-01 | 1 | -0/+28 |
| | |||||
* | td42xx: updat eextra definition in setup.py. | Diego Elio Pettenò | 2021-02-25 | 1 | -1/+1 |
| | |||||
* | td42xx: rename the previous td4277 driver, and support TD-4236B. | Diego Elio Pettenò | 2021-02-25 | 3 | -40/+22 |
| | | | | | | | | | | | The TD-4235B meter (sold as GlucoRx Nexus Q) uses pretty much the same protocol as the TD-4277. This change renames the driver, and reports the model returned by the device when receiving information. Other than that, a couple of constants are different from the previous meter. | ||||
* | Update pre-commit configuration. | Diego Elio Pettenò | 2021-02-25 | 1 | -9/+3 |
| | |||||
* | Spell freestyle-hid consistently in the dependencies list. | Diego Elio Pettenò | 2020-10-04 | 2 | -8/+8 |
| | |||||
* | Only run pytest for glucometerutils directory. | Diego Elio Pettenò | 2020-10-04 | 1 | -1/+1 |
| | | | | | This removes the need for having typing information applied to setup.py, which is just boilerplate. | ||||
* | Move pytest configuration to pyproject.toml. | Diego Elio Pettenò | 2020-10-04 | 2 | -13/+11 |
| | |||||
* | Remove pytest-flake8 from configuration. | Diego Elio Pettenò | 2020-10-04 | 1 | -1/+0 |
| | | | | flake8 is now run as pre-commit. | ||||
* | Add py.typed file to mark the package as typed. | Diego Elio Pettenò | 2020-10-04 | 4 | -0/+12 |
| | |||||
* | Use 0BSD instead of Unlicense for copyright disclaim. | Diego Elio Pettenò | 2020-10-04 | 8 | -26/+18 |
| | |||||
* | Move console_scripts definition to setup.cfg. | Diego Elio Pettenò | 2020-10-04 | 2 | -1/+4 |
| | |||||
* | Depend on freestyle-hid for FreeStyle support and remove tools. | Diego Elio Pettenò | 2020-10-04 | 12 | -1051/+25 |
| | | | | | | | | | Instead of maintaining the reversing tools for Abbott FreeStyle devices in this repository, they are now part of their own project (https://github.com/glucometers-tech/freestyle-hid), making it easier to split the dependencies requirements. The basic I/O of the FreeStyle session is also implemented in that library. | ||||
* | td4277: update dependency information for pyserial. | Diego Elio Pettenò | 2020-09-21 | 2 | -3/+3 |
| | | | | | Now that there's an actual release (even if beta) that supports the CP2110, we can depend on it with the extras enabled. | ||||
* | Update pre-commit plugins to the latest versions as of today. | Diego Elio Pettenò | 2020-09-07 | 18 | -25/+50 |
| | |||||
* | Extend the Libre2 encryption reversing tool. | Diego Elio Pettenò | 2020-08-03 | 2 | -0/+221 |
| | |||||
* | Partially reformat setup.cfg with setup-cfg-fmt. | Diego Elio Pettenò | 2020-08-03 | 1 | -21/+21 |
| | | | | | The formatter drops comments, which is not good, and prevents it from being usable as a pre-commit check. | ||||
* | Expect an input file as argument instead. | Diego Elio Pettenò | 2020-08-03 | 1 | -2/+2 |
| | |||||
* | Make use of modern Python ordered kwargs. | Svetlana Pantelejeva | 2020-08-02 | 7 | -121/+119 |
| | | | | Remove usage of overloaded division operator in construct structures. | ||||
* | Update otverio2015 dependencies to include PYSCSI. | Diego Elio Pettenò | 2020-06-24 | 2 | -2/+2 |
| | | | | | | | Now that PYSCSI v2.0.1 is released, its dependency can be expressed correctly. Also link to PyPI rather than Markus's own fork. | ||||
* | Update pre-commit configuration to run on main branch. | Diego Elio Pettenò | 2020-06-13 | 1 | -1/+1 |
| | |||||
* | freestyle_libre: extract non-encrypted metadata from encrypted messages. | Diego Elio Pettenò | 2020-05-25 | 1 | -3/+17 |
| | | | | | The sequence number and MAC are not actually encrypted, so they can be extracted as METADATA. | ||||
* | extract_freestyle: print metadata about messages outside of the message. | Diego Elio Pettenò | 2020-05-25 | 1 | -0/+12 |
| | | | | This makes it easier to figure out what the message length is meant to be. | ||||
* | Add usbmon to the list of known third_party packages. | Diego Elio Pettenò | 2020-05-25 | 1 | -1/+1 |
| | |||||
* | Fix the help messages. | Diego Elio Pettenò | 2020-05-25 | 1 | -3/+3 |
| | |||||
* | Fix up header. | Diego Elio Pettenò | 2020-05-25 | 1 | -15/+2 |
| | |||||
* | Move pre-commit checks from Travis CI to a GitHub Action. | Diego Elio Pettenò | 2020-05-16 | 3 | -2/+27 |
| | | | | | | | This replaces the need for optional execution within the Travis CI configuration, and updates Mergify to wait on both checks. Also remove flake8 from pytest on 3.8 since flake8 is already executed in pre-commit. | ||||
* | Remove f-string prefix from strings with no placeholders. | Diego Elio Pettenò | 2020-05-16 | 2 | -2/+2 |
| | |||||
* | There's no need to install the pre-commit to run it. | Diego Elio Pettenò | 2020-05-16 | 1 | -1/+1 |
| | |||||
* | Remove reference to test-requirements.txt that does not exist anymore. | Diego Elio Pettenò | 2020-05-16 | 1 | -1/+0 |
| | |||||
* | Move more setup() parameters in setup.cfg. | Diego Elio Pettenò | 2020-05-16 | 2 | -5/+10 |
| | | | | This leaves only very few parameters to setup(), one of which is calculated programmatically so cannot be moved at all. | ||||
* | Add pre-commit configuration for REUSE.software. | Diego Elio Pettenò | 2020-05-16 | 10 | -0/+48 |
| | | | | | The only files that were lacking a license were the 0-sized __init__.py files — since those are not copyrighteable, make them Unlicense relesed. | ||||
* | Fix mistake on content type variable. | Diego Elio Pettenò | 2020-05-16 | 1 | -1/+1 |
| | |||||
* | Make the project compliant with the REUSE guidelines. | Diego Elio Pettenò | 2020-04-20 | 16 | -1/+281 |
| | | | | | | | | | See https://reuse.software/ for details. For simplicity, the support files, that are vastly copy-pasta, are licensed under MIT license, rather than LGPL-2.1-or-later. Note that `reuse lint` currently fails due to fsfe/reuse-tool#208. | ||||
* | Run flake8 and mypy as part of pytest, but on 3.8 only. | Diego Elio Pettenò | 2020-04-09 | 2 | -4/+4 |
| | | | | | | There's no need to run mypy and flake8 on multiple Python versions, since they are independent. So instead prefer running them on the most recent stable release. | ||||
* | When no action is provided by user, print the help output instead. | Diego Elio Pettenò | 2020-04-09 | 1 | -3/+4 |
| | | | | This makes it friendlier to the user who's not sure how to use it. | ||||
* | Move driver loading to glucometerutils.driver. | Diego Elio Pettenò | 2020-04-09 | 2 | -7/+22 |
| | | | | This allows wrapping around some of the interfaces, and make typing more strict. | ||||
* | Rename driver.GlucometerDriver to driver.GlucometerDevice. | Diego Elio Pettenò | 2020-04-09 | 11 | -11/+11 |
| | | | | | The "driver" is the module — the classes need to be called Device. This allows adding further typing around this. | ||||
* | Move driver_base to glucometerutils.driver instead. | Diego Elio Pettenò | 2020-04-09 | 11 | -34/+28 |
| | | | | This makes it more like the other common modules, and allows expanding the interfaces. | ||||
* | Add some base hooks to pre-commit checks. | Diego Elio Pettenò | 2020-03-27 | 1 | -0/+6 |
| | |||||
* | Add missing SPDX-FileCopyrightText throughout the project. | Diego Elio Pettenò | 2020-03-27 | 37 | -0/+38 |
| | | | | This is following the advice provided in https://matija.suklje.name/how-and-why-to-properly-write-copyright-statements-in-your-code | ||||
* | The big typing cleanup. | Diego Elio Pettenò | 2020-03-27 | 23 | -305/+409 |
| | | | | | | | | Now that Python 3.7 is the minimum Python version, typing can be done inline, which makes it easier for mypy to know the files to check. Indeed, all the files are now typechecked, which uncovered a few minor bugs and mistakes here and there. | ||||
* | Bring up command line error as we only support Python 3.7+ now. | Diego Elio Pettenò | 2020-03-27 | 1 | -2/+2 |
| | |||||
* | Combine a strangely-separated string. | Diego Elio Pettenò | 2020-03-27 | 1 | -1/+1 |
| | |||||
* | Fix typing for contourusb support module. | Diego Elio Pettenò | 2020-03-27 | 1 | -32/+33 |
| | | | | | | | This replaces the definition of modes with an Enum class, which is more appropriate, and adds typing throughout the module. Text is also replaced with str since we don't support Python 2 anyway. | ||||
* | Use PEP526 declarations rather than `attr.ib()` calls all over. | Diego Elio Pettenò | 2020-03-27 | 1 | -38/+32 |
| | | | | | This simplifies type annotations a bit, and makes it easier figure out why attrs is still required (validators). | ||||
* | Add flake8 to configuration and pre-commit. | Diego Elio Pettenò | 2020-03-26 | 2 | -0/+9 |
| | |||||
* | Fix errors identified by flake8. | Diego Elio Pettenò | 2020-03-26 | 13 | -30/+24 |
| | |||||
* | Update the local Emacs config to match the black/isort/flake8 configs. | Diego Elio Pettenò | 2020-03-26 | 1 | -1/+2 |
| | |||||
* | Specify why some isort settings are a certain way. | Diego Elio Pettenò | 2020-03-26 | 1 | -0/+2 |
| | |||||
* | Remove bdist_wheel/install cycle from Travis CI. | Diego Elio Pettenò | 2020-03-25 | 1 | -2/+0 |
| | | | | These don't seem to match the actual released builds, and they don't respect pyproject.toml dependencies. | ||||
* | Use setuptools_scm to handle the packaging and versioning. | Diego Elio Pettenò | 2020-03-25 | 2 | -0/+11 |
| | |||||
* | Remove `tests_require` from `setup.py`. | Diego Elio Pettenò | 2020-03-25 | 1 | -12/+8 |
| | | | | | | | This field is deprecated together with the `test` command. Instead, rely on the `dev` extra — which is what Travis CI is already using to install the right set of dependencies. | ||||
* | Remove support for `setup.py test`. | Diego Elio Pettenò | 2020-03-25 | 1 | -13/+0 |
| | | | | | | | | As per https://github.com/pypa/setuptools/issues/1684, the test command in setuptools is deprecated, so let's not go out of our way to have it work correctly. Travis is not depending on this feature at all. | ||||
* | Move static descriptions to `setup.cfg` simplifying `setup.py`. | Diego Elio Pettenò | 2020-03-25 | 2 | -23/+23 |
| | | | | | This removes a number of fixed strings from the Python side of the setup, and prefers referencing the `README.md` file by name. | ||||
* | Update build status to point to travis-ci.com. | Diego Elio Pettenò | 2020-03-25 | 1 | -1/+1 |
| | |||||
* | Mergify: configuration update | Diego Elio Pettenò | 2020-03-25 | 1 | -2/+2 |
| | |||||
* | Check type annotations for tools with mypy, too. | Diego Elio Pettenò | 2020-03-23 | 3 | -1/+1 |
| | | | | This requires the released version of usbmon-tools. | ||||
* | Add an `all` extension that includes all dependencies. | Diego Elio Pettenò | 2020-03-23 | 2 | -22/+33 |
| | | | | This makes it easier in the integration to install all the needed dependencies. | ||||
* | otverio2015: remove python-scsi from dependencies. | Diego Elio Pettenò | 2020-03-23 | 1 | -1/+1 |
| | | | | The python-scsi module is not installable via pip, so there's no point in listing it as a dependency right now. It's probably better to replace this with a new extension altogether. | ||||
* | Travis CI: install hidapi build dependencies. | Diego Elio Pettenò | 2020-03-23 | 1 | -0/+6 |
| | | | | This includes libusb-1.0-0-dev and libudev-dev, which are required for building the hidapi C extension. | ||||
* | Increase minimum supported Python version to 3.7. | Diego Elio Pettenò | 2020-03-23 | 4 | -6/+5 |
| | | | | This simplifies compatibility with usbmon-tools for the reversing tools, and will allow converting all the type annotations inline, which is less intrusive. | ||||
* | Make HID support a "session" class rather than a base class. | Diego Elio Pettenò | 2020-03-22 | 9 | -127/+153 |
| | | | | | | This in turn allows wrapping the FreeStyle access in its own session class, which the freestyle_hid_console can use without dirty tricks, and without triggering the now-abstract class. | ||||
* | Exclude mypy from Python 3.9 | Diego Elio Pettenò | 2020-03-16 | 1 | -1/+2 |
| | | | | It looks like subscripts (Dict[Text]) don't work correctly with the current 3.9 dev, so ignore mypy on it right now. | ||||
* | Refresh Python versions. | Diego Elio Pettenò | 2020-03-16 | 1 | -1/+2 |
| | | | | | - 3.8 is now stable. - 3.9 is now the next release. | ||||
* | Add mypy to continuous integration. | Diego Elio Pettenò | 2020-03-16 | 2 | -1/+2 |
| | |||||
* | Add the README to the generated pypi package. | Diego Elio Pettenò | 2020-03-16 | 1 | -0/+6 |
| | |||||
* | Update references to the repository to point to the glucometers-tech org. | Diego Elio Pettenò | 2020-03-16 | 1 | -4/+4 |
| | |||||
* | Move tests to be organized within the source directory. | Diego Elio Pettenò | 2020-03-16 | 15 | -11/+3 |
| | | | | | This should simplify maintaining the tests in the long run, and allows mypy to more thoroughly check for types. | ||||
* | Mergify: configuration update | Diego Elio Pettenò | 2020-03-16 | 1 | -0/+15 |
| | |||||
* | Fix version information formatting. | Diego Elio Pettenò | 2020-03-14 | 1 | -1/+3 |
| | | | | The order of operations is a bit different with f-strings so the amount of padding is different. | ||||
* | Now that Python 3.6 is the minimum supported version, use f-strings. | Diego Elio Pettenò | 2020-03-14 | 15 | -74/+50 |
| | | | | | | | | | | | The f-strings formatted strings are generally simpler to write, read and debug, with a few exceptions. Keep the logging strings lazy, keep the CSV-building with %-formatting, as it makes it more readable. In fsoptium, keep `'$%s\r\n'` as a %-format, to avoid making it `f'${command}\r\n'` that would make it easy to mistake for a Shell variable. | ||||
* | Expand line length in Emacs to match black. | Diego Elio Pettenò | 2020-03-14 | 1 | -1/+1 |
| | |||||
* | Update minimum Python version. | Diego Elio Pettenò | 2020-03-08 | 1 | -2/+1 |
| | |||||
* | Remove the python3.6 version override on pre-commit. | Diego Elio Pettenò | 2020-03-08 | 1 | -2/+0 |
| | | | | This shouldn't be needed, and it would break if there's no Python 3.6 version installed in the system committing. | ||||
* | only run pre-commit on python3.6 | Ben | 2020-03-08 | 1 | -6/+7 |
| | |||||
* | format code with black | Ben | 2020-03-08 | 35 | -1162/+1297 |
| | |||||
* | pre-commit guide in README | Ben | 2020-03-08 | 2 | -3/+21 |
| | |||||
* | add configuration for pre-commit, black and isort | Ben | 2020-03-08 | 5 | -60/+93 |
| | |||||
* | FreeStyle: fix keepalive message handling for non-Libre devices. | Diego Elio Pettenò | 2020-03-06 | 1 | -1/+1 |
| | | | | | | | Message type 0x22 is a keepalive message, which has usually one 0x05 or 0x03 byte. But don't expect a certain value, just ignore the message. This fixes issue #73. | ||||
* | Fix typo. | Diego Elio Pettenò | 2020-03-06 | 1 | -2/+2 |
| | |||||
* | factor out common driver methods | Ben | 2020-02-18 | 14 | -101/+114 |
| | |||||
* | Bugfix: get current time within the function | Ben | 2020-02-18 | 8 | -8/+30 |
| | |||||
* | update AUTHORS | Ben | 2020-02-14 | 1 | -0/+1 |
| | |||||
* | Clean up the extraction script, and make it more user friendly. | Diego Elio Pettenò | 2020-02-01 | 1 | -13/+37 |
| | | | | | | | | | This includes changes to the flags, so that instead of an address prefix you need to provide a full device address, and instead of `--libre2`, there's a `--encrypted_protocol` flag. If the capture includes the descriptors, neither flags are needed because the script identifies them itself. | ||||
* | contourusb: fix mypy typing. | Diego Elio Pettenò | 2020-01-25 | 1 | -6/+9 |
| | | | | | This includes importing the right abstract classes and correcting some call typing information. | ||||
* | freestyle: add some (rough) support for encrypted messages. | Diego Elio Pettenò | 2020-01-25 | 1 | -17/+80 |
| | | | | | | While the Libre 2 protocol is still not usable, this makes it possible to at least send messages to it and get a translation of what the mistake was in the first place. | ||||
* | freestyle: raise exceptions if a command returned an error state. | Diego Elio Pettenò | 2020-01-25 | 1 | -0/+7 |
| | | | | | This includes both the classic "unknown message type" error, and the Libre 2 encryption error state. | ||||
* | freestyle: simplify the code for initialization further. | Diego Elio Pettenò | 2020-01-25 | 1 | -9/+3 |
| | | | | | | This is not a sequence, but rather a single initialization command. Remove the loop and the long comment that no longer applies (serial numbers and all.) | ||||
* | extract_freestyle: add an option to not print keepalive messages. | Diego Elio Pettenò | 2020-01-24 | 1 | -1/+16 |
| | | | | These messages are not encrypted, but they can also be safely ignored. | ||||
* | freestyle: only send command 0x01 to initialize the device. | Diego Elio Pettenò | 2020-01-24 | 1 | -1/+1 |
| | | | | | | | | This has been tested on fslibre and fsprecisionneo, but please report if this does not work with other FreeStyle devices (Insulinx?) It appears the 0x04/0x05/0x15 dance is only needed by the Abbott software to identify which model (and software version) it is talking with. | ||||
* | Avoid heuristics, and instead add an explicit --libre2 flag. | Diego Elio Pettenò | 2020-01-24 | 1 | -12/+16 |
| | | | | | This encodes some more details of which commands are encrypted and not, but makes decoding easier. | ||||
* | Add a tool to extract a FreeStyle protocol chatter from an usbmon capture. | Diego Elio Pettenò | 2020-01-24 | 1 | -0/+109 |
| | | | | | | | | | | | The tool needs https://github.com/Flameeyes/usbmon-tools to work, and is derived off the extract-hid-chatter tool in that repository, so it's Apache-2 licensed (unlike the rest of the repository) and shares copyright with the usbmon-tools authors. While this does not work correctly for Libre2 traces, it does appear to work fine with Libre1 systems with text protocol exchanges, and it provides a starting point. | ||||
* | Update AUTHORS | matmutant | 2019-12-04 | 1 | -0/+1 |
| | |||||
* | Fix the freestyle_hid_console to use Python 3.5 compatible formatting. | Diego Elio Pettenò | 2019-09-27 | 1 | -2/+2 |
| | |||||
* | Make InvalidChecksum parameters and message harder to misunderstand. | Diego Elio Pettenò | 2019-09-26 | 1 | -3/+3 |
| | |||||
* | Add driver implementation for Ascensia ContourUSB. | Arvanitis Christos | 2019-09-25 | 6 | -1/+531 |
| | | | | | | | | | | | Implemented based on the protocol documentation provide by Ascensia, with portions from glucodump by @sm6xmm (relicensed by the author under MIT license.) Squashed from pull request #62. Signed-off-by: Anders Hammarquist <iko@iko.pp.se> Signed-off-by: Diego Elio Pettenò <flameeyes@flameeyes.com> | ||||
* | Remove try/except around typing imports. | Diego Elio Pettenò | 2019-09-24 | 4 | -20/+4 |
| | | | | Since Python 3.4 is no longer supported, there's no reason for typing not to be there. | ||||
* | freestyle: fix return type for empty log. | Diego Elio Pettenò | 2019-09-21 | 1 | -1/+1 |
| | | | | () is not a valid Iterator[List[Text]] | ||||
* | Ooops remove my duplicate line. | Diego Elio Pettenò | 2019-09-21 | 1 | -1/+0 |
| | |||||
* | Add an AUTHORS file listing contributors with a name-looking handle. | Diego Elio Pettenò | 2019-09-21 | 2 | -1/+23 |
| | | | | | | | | This is currently missing @matmutant and @schferbe who are welcome to send me a pull request to add their names. This also changes the copyright notice to note that it's not just me anymore who assert copyright to this project. | ||||
* | Add the list of known FreeStyle commands to the tools directory. | Diego Elio Pettenò | 2019-09-15 | 1 | -0/+48 |
| | | | | This can be used to help testing new FreeStyle devices, like the Libre2. | ||||
* | fslibre: add support for factory resetting FreeStyle Libre device. | Diego Elio Pettenò | 2019-09-08 | 1 | -1/+5 |
| | |||||
* | freestyle_hid_console: allow feeding a list of known commands. | Diego Elio Pettenò | 2019-09-08 | 1 | -1/+7 |
| | | | | This makes it easier to identify the expected command range of a FreeStyle device. | ||||
* | freestyle devices: don't error out if there are no readings. | Diego Elio Pettenò | 2019-09-08 | 1 | -0/+4 |
| | | | | | The multi-record format returns "Log Empty" if there's no entry in the device, catch that. | ||||
* | Add a simple-ish script to use access a FreeStyle HID-compatible commands. | Diego Elio Pettenò | 2019-09-08 | 1 | -0/+46 |
| | | | | This makes it possible to send and receive text-command protocols to a FreeStyle HID device without actually writing any code, to identify possible valid commands. | ||||
* | Add fsoptium basic tests for clock parsing. | Diego Elio Pettenò | 2019-09-02 | 1 | -0/+39 |
| | |||||
* | fsoptium: fix error in date stirng parsing. | Diego Elio Pettenò | 2019-09-02 | 1 | -1/+1 |
| | |||||
* | Use the new website's URL. | Diego Elio Pettenò | 2019-09-02 | 1 | -1/+1 |
| | |||||
* | Drop support for Python 3.4. | Diego Elio Pettenò | 2019-09-02 | 4 | -5/+4 |
| | | | | | | | | Python 3.4 lacks the `typing` module, which requires try/catch when importing, making type annotations more verbose than needed. At the time of writing, Debian oldstable has Python 3.5 available, so it sounds like a good default. | ||||
* | Use the new website URL for glucometer-protocols. | Diego Elio Pettenò | 2019-09-02 | 5 | -9/+8 |
| | |||||
* | Use type= parameters in attr.ib() declarations. | Diego Elio Pettenò | 2019-09-02 | 1 | -16/+18 |
| | | | | | This should work just as well and makes it read a little better. Also, replace Text references with str, since we don't support Python 2 anyway. | ||||
* | Replace the device_id attribute with a more generic extra_data dictionary. | Diego Elio Pettenò | 2019-09-02 | 2 | -6/+8 |
| | | | | This will allow providing other information, for other non-fslibre drivers. | ||||
* | add internal device id to glucose measurements (and other entries) to prepare for better sorting | Ben | 2019-09-02 | 2 | -3/+11 |
| | |||||
* | Add type: ignore comments when using lifescan_binary_protocol.Timestamp. | Diego Elio Pettenò | 2019-09-01 | 3 | -9/+9 |
| | | | | Somehow mypy does not seem to recognize it as a valid construct class. | ||||
* | Fix the PIP URL to install glucometerutils. | Diego Elio Pettenò | 2019-08-31 | 1 | -1/+1 |
| | | | | Newer versions of pip/wheel or some other packaging tools will error out during install phase if the egg value is wrong. | ||||
* | td4277: add to the setup.py dependencies. | Diego Elio Pettenò | 2019-08-06 | 1 | -5/+6 |
| | | | | Also sort the list so that's easier to know where to add it. | ||||
* | td4277: new driver for rebranded TaiDoc TD-4277 glucometers. | Diego Elio Pettenò | 2019-08-03 | 3 | -17/+291 |
| | | | | | This driver supports the GlucoRx Nexus, Menarini GlucoMen Nexus, and Aktivmed GlucoCheck XL. | ||||
* | Fix invalid attribute in setup() method. | Diego Elio Pettenò | 2019-07-30 | 1 | -1/+1 |
| | |||||
* | travis: add Python 3.8 to the list of versions to test. | Diego Elio Pettenò | 2019-07-30 | 1 | -0/+1 |
| | |||||
* | FreeStyle devices: don't error out for non-ASCII patient names. | Diego Elio Pettenò | 2019-07-30 | 1 | -15/+27 |
| | | | | | | | | | | This was brought up in issue #60. While the devices don't appear to care much for patient names, and can't be expected to support UTF-8 (the Windows software don't appear to allow that), it's worth protecting against this and just replacing the non-ASCII characters. To make this easier, the decoding is pushed down to the end of the processing of the multi-packet response, rather than being done per-packet. | ||||
* | and patient_name support | matmutant | 2019-07-08 | 1 | -2/+4 |
| | |||||
* | Get and set the patient name on supported meters. | Diego Elio Pettenò | 2019-07-07 | 3 | -1/+33 |
| | | | | | | This includes the command line extensions to include the get/set patient name, as well as the driver support for all FreeStyle devices with the shared HID protocol, although not all will support this properly. | ||||
* | fslibre: expose patient name if the device knows it. | Diego Elio Pettenò | 2019-07-07 | 3 | -4/+19 |
| | | | | | This includes extension of the base info command to report this when asked on the command line. | ||||
* | Fix type annotations. | Diego Elio Pettenò | 2019-07-01 | 1 | -4/+4 |
| | |||||
* | Fix syntax error. | Diego Elio Pettenò | 2019-07-01 | 1 | -1/+2 |
| | |||||
* | Introduce an explicit InvalidDateTime exception for meters with unset time. | Diego Elio Pettenò | 2019-07-01 | 3 | -4/+18 |
| | | | | | | | | At least the FreeStyle Precision Neo appears to be able to report an invalid date/time (255/255/255 255:255), probably when the RTC is lost (see issue #58). This returns a more precise output than N/A, and should suggest to confirm the date and time setting instead. | ||||
* | handle device.get_datetime() value error exception | matmutant | 2019-07-01 | 1 | -0/+2 |
| | |||||
* | common: Correctly show ketone sample type in csv | Andreas Sandberg | 2019-05-19 | 1 | -1/+1 |
| | |||||
* | fsprecisionneo: Scale ketone readings to mmol/l | Andreas Sandberg | 2019-05-19 | 3 | -14/+18 |
| | | | | | | The FreeStyle Optimum Neo reports ketones in using the same unit as FreeStyle Libre. Move the conversion function from fslibre.py to freestyle.py to facilitate sharing and do the right conversion in fsprecisionneo.py. | ||||
* | freestyle support: restore correct order of parameters. | Diego Elio Pettenò | 2019-05-16 | 2 | -1/+24 |
| | | | | Also add a test so that we don't break this again in the future. | ||||
* | new line at end of .gitignore, rename arresult entry map | Ben | 2019-05-05 | 2 | -3/+3 |
| | |||||
* | add time adjustments to fslibre dump | Ben | 2019-05-05 | 3 | -9/+45 |
| | |||||
* | Bug fix: incorrect argument order in call to construct.Const. | André Caldas | 2019-05-05 | 1 | -1/+1 |
| | |||||
* | Add SPDX license to .dir-locals.el. | Diego Elio Pettenò | 2019-03-31 | 1 | -0/+1 |
| | |||||
* | fslibre: correct the ketone reading. | Diego Elio Pettenò | 2019-03-31 | 1 | -2/+9 |
| | | | | | As discussed in glucometer-protocols #6, the value is actually converted the same way as blood glucose, despite it not having the same ratio. | ||||
* | Replace epydoc metadata with SPDX identifiers. | Diego Elio Pettenò | 2019-02-08 | 27 | -126/+55 |
| | | | | | | | | | | Most of the epydoc metadata (author, copyright, email) is duplicate in the package's setup.py or README. These copies are more likely to get out of date, and increase the amount of work to keep them in line. The license information should rather be provided with an SPDX identifier, which is more similar to what the Linux kernel and other projects, such as pyserial, do. | ||||
* | Replace flameeyes.eu with flameeyes.com. | Diego Elio Pettenò | 2019-02-08 | 28 | -29/+30 |
| | | | | | | | | Due to EURid threatening to suspend my domain, make sure that the references are updated to point at the right stable domain. This includes changes to the files as well as a mailmap to update the author references in the log. | ||||
* | hiddevice: fix support for modern hidapi. | Diego Elio Pettenò | 2019-01-29 | 1 | -3/+3 |
| | | | | | | | The value of None is not valid for current hidapi implementation, but anything below 0 is considered no timeout. Fixes issue #50. | ||||
* | exceptions: avoid using kwargs for message, as it's not correct. | Diego Elio Pettenò | 2019-01-28 | 1 | -2/+2 |
| | | | | Fixes the nested exception reported in Issue #50. | ||||
* | Include the OneTouch Select Plus Flex in the otverio2015 list. | Diego Elio Pettenò | 2018-12-19 | 1 | -16/+18 |
| | | | | Add a note that only the USB connection is supported, not the BlueTooth one. | ||||
* | otverio2015: fix string parsing to include the full prefix. | Diego Elio Pettenò | 2018-12-19 | 1 | -5/+2 |
| | | | | | This caused the normal ASCII-in-UTF16 strings to be misaligned, and the `info` output to be full of garbage. | ||||
* | Fix most of the pylint output, and hide away some that is not needed. | Diego Elio Pettenò | 2018-12-12 | 17 | -202/+228 |
| | | | | Again, this is not ready for CI yet unfortunately :( | ||||
* | Simplify exceptions hierarchy. | Diego Elio Pettenò | 2018-12-12 | 1 | -14/+10 |
| | |||||
* | Reindent all files to match the 4-spaces indentation. | Diego Elio Pettenò | 2018-12-12 | 6 | -630/+630 |
| | |||||
* | hiddevice: split handle_ and hidapi_handle_. | Diego Elio Pettenò | 2018-12-12 | 1 | -9/+15 |
| | | | | This avoids confusing mypy, and is also less magical. | ||||
* | Sprinkle more type annotations throughout the codebase. | Diego Elio Pettenò | 2018-12-12 | 6 | -7/+30 |
| | |||||
* | Fix indentation of common.py. | Diego Elio Pettenò | 2018-12-12 | 1 | -83/+86 |
| | |||||
* | Make GlucoseReading and KetoneReading use attrs, too. | Diego Elio Pettenò | 2018-12-12 | 1 | -44/+24 |
| | | | | This also adds more type annotations for them. | ||||
* | Remove --sort-by flag. | Diego Elio Pettenò | 2018-12-12 | 1 | -9/+1 |
| | | | | | | There's nothing really meaningful beside the timestamp sorting, remove the flag. If for whatever analysis, a different sorting is needed, that should be post-processed from the generated CSV. | ||||
* | Experimentally start adding type annotations, and mypy configs. | Diego Elio Pettenò | 2018-12-12 | 5 | -13/+38 |
| | | | | | This cannot currently be added to CI because the lack of `construct` stubs, which cause "unsupported left operands" for /-constructed structs. | ||||
* | otverio2015: fix one remaining entry referencing the now-gone COMMAND_SUCCESS constant. | Diego Elio Pettenò | 2018-12-12 | 1 | -1/+1 |
| | |||||
* | Use [attrs](http://www.attrs.org/) instead of namedtuple for MeterInfo. | Diego Elio Pettenò | 2018-12-12 | 2 | -18/+21 |
| | | | | This avoids having the separate _MeterInfoBase class, and reads much nicer. | ||||
* | sdcodefree: allows an arbitrary number of null-bytes before challenge. | Diego Elio Pettenò | 2018-12-09 | 1 | -6/+9 |
| | | | | This appears to be quite variable, and this should make it more reliable. | ||||
* | Travis: make dist xenial for python 3.7 support | Diego Elio Pettenò | 2018-11-16 | 1 | -0/+2 |
| | | | | CC travis-ci/travis-ci#9815 | ||||
* | Travis: add Python 3.7 support. | Diego Elio Pettenò | 2018-11-16 | 1 | -0/+1 |
| | |||||
* | tests: simplify and cleanup. | Diego Elio Pettenò | 2018-11-16 | 6 | -41/+26 |
| | | | | | | | | | | * Remove the __main__ blocks as the tests should not be executable by themselves. * Use absltest everywhere instead of a mixture of unittest/absltest (via parameterized). * Only modify import path once. * Cleanup pylint warnings, by disabling those that are not useful, and fixing those that are. | ||||
* | otultraeasy: factor out the packet creation, and add tests. | Diego Elio Pettenò | 2018-11-16 | 2 | -10/+49 |
| | | | | | This would have caught the bug fixed with the previous commit, which is a strict improvement. | ||||
* | Don't fold the command prefix into the LifeScanPacket. | Diego Elio Pettenò | 2018-11-16 | 4 | -53/+53 |
| | | | | | | | For the otultraeasy, there is no prefix provided in the acks at all, so the previous change broke the otultraeasy. Partial revert of b5784bb35b9968bf977d1319c3301958d671f45c. | ||||
* | test-requirements: add some minimum version specifications. | Diego Elio Pettenò | 2018-07-24 | 1 | -3/+3 |
| | |||||
* | Fix sdcodefree driver, the same as the lifescan changes. | Diego Elio Pettenò | 2018-07-24 | 1 | -1/+1 |
| | | | | Thanks to Noel Cragg for reporting this. | ||||
* | fix invalid self-reference | Noel Cragg | 2018-07-24 | 1 | -1/+1 |
| | | | | | | | During the structure rebuild, the 'message' key is removed before its callback is invoked, causing 'this.message' to raise a nonexistent key error. This change reverts the line in question to its pre-84aad729 logic (but leaving the variable name substitutions in place). | ||||
* | change 999 to inf | Wesley T. Honeycutt | 2018-05-23 | 1 | -1/+1 |
| | |||||
* | Fix for non-integer errors | Wesley T. Honeycutt | 2018-05-23 | 1 | -1/+5 |
| | | | This is a quick fix I used to address an error for "HI" readings on my unit. This comes up when testing inhuman blood. There may be a "LO", but I have not encountered it, so I do not know how the specifics of it. This error may come up on other units, but I have just done something about the hardware I have access to. | ||||
* | Add double quotes according to @arvchristos suggestion on 'Example Usage' section | Naokazu Terada | 2018-04-17 | 1 | -1/+1 |
| | |||||
* | freestyle support: add debug logging of commands sent and received. | Diego Elio Pettenò | 2018-03-17 | 1 | -0/+4 |
| | |||||
* | fsoptium: add debug logging when sending commands. | Diego Elio Pettenò | 2018-03-17 | 1 | -0/+4 |
| | |||||
* | Update lifescan_binary_protocol.py | Arkadiusz Bulski | 2018-03-17 | 1 | -2/+2 |
| | | | lambdafied this expression | ||||
* | Update sdcodefree.py | Arkadiusz Bulski | 2018-03-17 | 1 | -2/+2 |
| | | | lambdafied this expression | ||||
* | CString supports UTF-16/32-LE/BE | Arkadiusz Bulski | 2018-03-17 | 1 | -2/+1 |
| | |||||
* | SymmetricMapping was renamed to Mapping | Arkadiusz Bulski | 2018-03-17 | 4 | -5/+5 |
| | |||||
* | corected timestamp comment | Arkadiusz Bulski | 2018-03-17 | 1 | -1/+1 |
| | |||||
* | construct code fixed improper embedding | Arkadiusz Bulski | 2018-03-17 | 4 | -15/+13 |
| | |||||
* | construct-code is (almost) uptodate | Arkadiusz Bulski | 2018-03-17 | 6 | -16/+17 |
| | |||||
* | construct: the construct API is significantly unstable, fix to 2.8.22 only. | Diego Elio Pettenò | 2018-02-11 | 3 | -9/+9 |
| | | | | | This still is required to fix Issue #38, but luckily it's just a test failure for now. | ||||
* | Until Issue #38 is fixed, expect construct 2.8, and not 2.9. | Diego Elio Pettenò | 2018-02-11 | 2 | -8/+8 |
| | | | | | | The API changed in slightly incompatible ways so I'll have some work to make sure this works on both versions (and that there is some test around it, possibly). | ||||
* | otverioiq: remove untested marking and list supported features. | Diego Elio Pettenò | 2018-01-07 | 2 | -4/+10 |
| | | | | This closes Issue #30 as I actually tested this and it works perfectly fine. | ||||
* | otverioiq: zero log is tested, it works. | Diego Elio Pettenò | 2018-01-07 | 1 | -1/+1 |
| | |||||
* | otverioiq: fix up set_datetime method. | Diego Elio Pettenò | 2018-01-07 | 1 | -2/+4 |
| | |||||
* | otverioiq: fix definition of the reading response, fix get_reading_count method. | Diego Elio Pettenò | 2018-01-07 | 1 | -5/+3 |
| | |||||
* | otverioiq: fix up a couple of syntax errors, and update baud rate. | Diego Elio Pettenò | 2018-01-07 | 1 | -3/+3 |
| | |||||
* | otverioiq: fix up syntax. | Diego Elio Pettenò | 2018-01-07 | 1 | -6/+4 |
| | |||||
* | otverioiq: fix typo. | Diego Elio Pettenò | 2018-01-07 | 1 | -1/+1 |
| | |||||
* | otverioiq: add to the list and to the dependency file. | Diego Elio Pettenò | 2018-01-07 | 2 | -0/+2 |
| | | | | | As noted in Issue #30, this is currently untested, but I'm confident it won't take much to get it to working state. | ||||
* | otverioiq: implement full parsing of the response structure. | Diego Elio Pettenò | 2018-01-07 | 1 | -3/+19 |
| | | | | | | The TidePool driver does not implement meal comment and it does not validate the full message. I checked the flags with the trace and they match the values in otverio2015. | ||||
* | otverioiq: link-control is not used. | Diego Elio Pettenò | 2018-01-07 | 1 | -1/+1 |
| | |||||
* | lifescan binary protocol: factor out _COMMAND_SUCCESS. | Diego Elio Pettenò | 2018-01-07 | 4 | -26/+27 |
| | | | | The success status is always %x06 if there is a message at all. | ||||
* | otverioiq: update version and serial number requests. | Diego Elio Pettenò | 2018-01-06 | 1 | -2/+4 |
| | | | | | These are now coming from the software trace. The version response is funny though. | ||||
* | lifescan binary protocol: make the packet generator a function. | Diego Elio Pettenò | 2018-01-06 | 4 | -56/+65 |
| | | | | | | | | | | | | | | This ensures that the command prefix is added directly into the packet structure, simplifying the rest of the code. Per driver changes: - otverio2015: command prefix is changed from 0x04 to 0x03; this ensures that all the responses share the same prefix (READ RECORD COUNT does not repeat the selected command prefix). - otverioiq: command prefix is changed from 0x04 to 0x03, to align with the otverio2015 driver and the trace from OneTouch Diabetes Management Software. | ||||
* | otultraeasy: fix AttributeErrors after factoring out link_control struct. | Diego Elio Pettenò | 2018-01-06 | 1 | -4/+5 |
| | |||||
* | otverioiq: add totally untested driver. | Diego Elio Pettenò | 2018-01-06 | 1 | -0/+194 |
| | | | | | | | | | | This is the first commit to support OneTouch Verio IQ (Issue #30). It's untested despite me having the device because it needs a new kernel I have not planned to build yet. Most of the protocol has been reverse engineered from the Tidepool driver (https://github.com/tidepool-org/chrome-uploader/blob/master/lib/drivers/onetouch/oneTouchVerioIQ.js) with a few assumption brought in from the UltraEasy and Verio 2015. | ||||
* | lifescan_binary_protocol: factor out glucose unit mappings. | Diego Elio Pettenò | 2018-01-06 | 3 | -13/+11 |
| | | | | | The values are the same between all models sharing this protocol, even though the full reply message isn't. | ||||
* | lifescan_binary_protocol: create a new module to support LifeScan drivers. | Diego Elio Pettenò | 2018-01-06 | 3 | -60/+73 |
| | | | | | | | | | | Both the UltraEasy and Verio 2015 use a similar protocol, with the same base packet serialised to the device. Factor the packet definition out (and make it a bit more generic). Verio IQ (Issue #30) also shares the same base protocol. Also move the definition of VERIO_TIMESTAMP to this common module as it's also shared with the Verio IQ. | ||||
* | tests: improve code quality by passing the linter. | Diego Elio Pettenò | 2018-01-01 | 3 | -6/+7 |
| | |||||
* | test_lifescan: rename from test_otultraeasy, and cleanup. | Diego Elio Pettenò | 2018-01-01 | 1 | -12/+1 |
| | | | | | This test was actually only testing the CRC CCITT implementation now that otultraeasy uses construct. | ||||
* | otverio2015: reorder functions to match otultraeasy. | Diego Elio Pettenò | 2018-01-01 | 1 | -5/+5 |
| | |||||
* | otultraeasy: merge _send_request and _read_response and match otverio2015. | Diego Elio Pettenò | 2018-01-01 | 1 | -41/+35 |
| | | | | | | | | | There was always a 1-to-1 mapping between these two functions, so merge them into a single function that knows both the request and response format. It also includes some refactoring of the actual record reading, to match the same structure of functions in otverio2015. | ||||
* | otultraeasy: rename _ZERO_LOG_REQUEST to _MEMORY_ERASE_REQUEST. | Diego Elio Pettenò | 2018-01-01 | 1 | -2/+2 |
| | | | | This makes it the same as the otverio2015. | ||||
* | otultraeasy: wrap around construct exceptions to MalformedCommand. | Diego Elio Pettenò | 2018-01-01 | 1 | -11/+20 |
| | |||||
* | otverio2015: rewrite using construct. | Diego Elio Pettenò | 2018-01-01 | 3 | -236/+232 |
| | | | | | | | This simplifies the code a bit here and there, making sure that the structures are all define at the top of the file. It also align the structure of the driver a bit more with otultraeasy, making it easier to spot the similitudes. | ||||
* | otultraeasy: factor out the construct Timestamp implementation. | Diego Elio Pettenò | 2018-01-01 | 4 | -13/+115 |
| | | | | | | | This adds tests to ensure this works right in the general case, so that it can be used with different parameters. The adapter will be reused in the otverio2015 driver. | ||||
* | otultraeasy: rewrite using construct for parsing. | Diego Elio Pettenò | 2018-01-01 | 4 | -277/+201 |
| | | | | | | | | | This removes the wholly complicated _Packet() object and replace it with more readable construct. Unfortunately this appears to reduce performance because of the serial stream buffering, needed to calculate the checksum. It's unfortunate, but it at least avoids a significant amount of custom code. | ||||
* | sdcodefree: rewrite using construct and improve readability. | Diego Elio Pettenò | 2017-12-31 | 3 | -103/+94 |
| | | | | | | | This replaces the use of manual structures with well-defined construct entries; it also give consistency to packet vs message. Log input and output messages, to be clearer. | ||||
* | serial devices: disable xonxoff by default. | Diego Elio Pettenò | 2017-12-31 | 1 | -1/+1 |
| | | | | | | | | | | With 2a825fb889735fa881566d1764cc48d2814447d2 the parameters to open the serial device were lifted from the fsoptium driver, which was the only one passing xonxoff=True. The Optium device has no problem with disabling this feature, but the codefree driver hangs if this is set to True. So instead set it to False and get rid of it. | ||||
* | freestyle: rename miscopied constant name. | Diego Elio Pettenò | 2017-12-30 | 1 | -2/+2 |
| | |||||
* | Run test and build on Travis CI | Muhammad Kaisar Arkhan | 2017-12-30 | 2 | -0/+16 |
| | | | | Closes https://github.com/Flameeyes/glucometerutils/issues/35 | ||||
* | Use pytest to run tests | Muhammad Kaisar Arkhan | 2017-12-30 | 4 | -1/+41 |
| | | | | Closes https://github.com/Flameeyes/glucometerutils/issues/34 | ||||
* | Add more tests to cover the basic translation of objects to strings. | Diego Elio Pettenò | 2017-12-29 | 1 | -0/+74 |
| | | | | | This would have found an extra bug that was pushed unfixed after enum conversion, and two bugs that I did find during the conversion. | ||||
* | Fix error in meter info output, after conversion of Unit to enum. | Diego Elio Pettenò | 2017-12-29 | 1 | -1/+1 |
| | |||||
* | Fix dependency name for absl-py. | Diego Elio Pettenò | 2017-12-28 | 1 | -1/+1 |
| | |||||
* | freestyle: replace the custom struct and bytemangling with construct. | Diego Elio Pettenò | 2017-12-28 | 3 | -26/+30 |
| | | | | | | | | This simplifies the code and enforces the validation within the format documentation too. construct can handle the full package verification, including dealing with padding. | ||||
* | deps: correct dependency for fsoptium. | Diego Elio Pettenò | 2017-12-28 | 1 | -1/+1 |
| | |||||
* | Add driver dependencies to setup.py, and document how to install this. | Diego Elio Pettenò | 2017-12-28 | 2 | -0/+25 |
| | | | | | | | | This should address Issue 5 (theoretically some of the dependencies are OS-specific but that's a longer problem). Also partially addresses Issue 9 because now we have an easy to understand "install and try out" option. | ||||
* | Rewrite setup.py to use setuptools. | Diego Elio Pettenò | 2017-12-28 | 1 | -22/+33 |
| | | | | This should make it easier to add dependencies and so on. | ||||
* | Rename the shim to match the old name. | Diego Elio Pettenò | 2017-12-28 | 1 | -0/+0 |
| | |||||
* | Move the binary script to glucometerutils/ and create a starting shim. | Diego Elio Pettenò | 2017-12-28 | 2 | -3/+7 |
| | | | | The shim needs to be renamed, but this makes the history simpler to read. | ||||
* | Remove misleading MANIFEST template. | Diego Elio Pettenò | 2017-12-28 | 1 | -1/+0 |
| | |||||
* | Update Python version target in the README as well. | Diego Elio Pettenò | 2017-12-28 | 1 | -1/+1 |
| | |||||
* | Update documentation to be more useful. | Diego Elio Pettenò | 2017-12-28 | 1 | -13/+21 |
| | |||||
* | test: use byte constants instead of encoding on the fly. | Diego Elio Pettenò | 2017-12-28 | 1 | -2/+2 |
| | |||||
* | tests: fix OneTouch tests to use Python's own mock, and leverage absl-py. | Diego Elio Pettenò | 2017-12-28 | 2 | -53/+26 |
| | | | | | | Since I've increased the minimum Python version to 3.4, mock is now available within Python. And since I already used absl-py parameterized for test_common, make use of it to avoid boilerplate. | ||||
* | Fix up link to the site. | Diego Elio Pettenò | 2017-12-28 | 1 | -1/+1 |
| | |||||
* | test_common: use absl-py to increase coverage, and simplify. | Diego Elio Pettenò | 2017-12-28 | 1 | -8/+23 |
| | | | | This ensures the tests run independently instead of failing at the first mistake. | ||||
* | accucheck_reports: fix bug for mg/dL native meters. | Diego Elio Pettenò | 2017-12-28 | 3 | -17/+11 |
| | | | | | This was mixing up the units in the conversion. While fixing the bug, remove the confusing two-parameter form of convert_glucose_unit. | ||||
* | Use Python3 Enum class for measurement methods. | Diego Elio Pettenò | 2017-12-28 | 2 | -10/+11 |
| | | | | This makes the code more idiomatic and less brittle. | ||||
* | Use Python3 Enum class for meal flags. | Diego Elio Pettenò | 2017-12-28 | 5 | -18/+19 |
| | | | | This makes the code more idiomatic and less brittle. | ||||
* | Use Python3 Enum class for glucose units. | Diego Elio Pettenò | 2017-12-28 | 12 | -43/+36 |
| | | | | This makes the code more idiomatic and less brittle. | ||||
* | Raise minimum Python version to 3.4, to allow using the enum module. | Diego Elio Pettenò | 2017-12-28 | 2 | -2/+3 |
| | | | | | Supporting older Python is becoming harder, and modern Python is more readable, particularly as it allows for less brittle code. | ||||
* | otultraeasy: fix wrong module name for shared lifescan code. | Diego Elio Pettenò | 2017-11-14 | 1 | -4/+4 |
| | | | | | | | This was meant to be lifescan_common, and then renamed to just lifescan, but clearly I forgot that. Addresses part of Issue #29. | ||||
* | Fix with_ketone | Leonard Lausen | 2017-10-02 | 4 | -9/+4 |
| | |||||
* | Fix ketone reading | Leonard Lausen | 2017-10-02 | 4 | -4/+9 |
| | |||||
* | Fix syntax error in fsprecisionneo.py | Leonard Lausen | 2017-10-01 | 1 | -1/+1 |
| | |||||
* | glucometer.py: add --with-ketone option to the dump action | Samuel Martin | 2017-09-25 | 1 | -0/+7 |
| | |||||
* | fsprecisionneo: add ketone reading support | Samuel Martin | 2017-09-25 | 1 | -8/+19 |
| | |||||
* | fslibre: add ketone reading support | Samuel Martin | 2017-09-25 | 1 | -4/+24 |
| | |||||
* | fslibre: set measure_method when parsing records | Samuel Martin | 2017-09-25 | 1 | -2/+7 |
| | |||||
* | common: introduce the KetoneReading class | Samuel Martin | 2017-09-25 | 1 | -3/+32 |
| | | | | | This change also remove the meal field from the _ReadingBase class and moves it only where it belongs, i.e. in the GlucoseReading class. | ||||
* | common: rename Reading class into GlucoseReading class | Samuel Martin | 2017-09-25 | 10 | -12/+12 |
| | | | | This renaming prepares for the ketone class introduction. | ||||
* | glucometer.py: restrict sorting choices to the common reading fields | Samuel Martin | 2017-09-25 | 1 | -1/+1 |
| | | | | | This change mainly aims to avoid breaking the glucometer.py script when introducing the ketone reading in the following patches. | ||||
* | common: add measure_method field to _ReadingBase class | Samuel Martin | 2017-09-25 | 1 | -5/+10 |
| | | | | | This new measure_method stores origin of the measure (either blood sample or from a CGM sensor). | ||||
* | common: add constants for measure methods | Samuel Martin | 2017-09-25 | 1 | -0/+4 |
| | |||||
* | fslibre: fix reading-type comment | Samuel Martin | 2017-09-25 | 1 | -1/+1 |
| | |||||
* | add udev rules | Samuel Martin | 2017-09-25 | 1 | -0/+30 |
| | |||||
* | fslibre: fix insulin display | Samuel Martin | 2017-09-13 | 1 | -4/+4 |
| | | | | | | | | | | | One of the professional options allows to choose the insulin increment step between 1 and 0.5 unit. This explains why the insulin dose values with no decimal part seems doubled in memory. This change adjusts the formating and computation when displaying these data. | ||||
* | otverio2015: fix _MEAL_CODES map. | Diego Elio Pettenò | 2017-09-13 | 1 | -3/+3 |
| | | | | The unpacked value is an integer, not a byte array anymore. | ||||
* | otverio2015: expose pre-/post-meal flags for Select Plus devices. | Diego Elio Pettenò | 2017-09-13 | 1 | -7/+15 |
| | | | | | While Verio 2015 does not appear to expose this information, Select Plus devices do, and the mapping is very simple. | ||||
* | otverio2015: fix readings on Select Plus readers (Issue #22). | Diego Elio Pettenò | 2017-09-13 | 1 | -3/+4 |
| | | | | | | The reading value is only 16-bit long, not 32-bit. The following byte is a meal indicator (not implemented in Verio), followed by a (likely) constant 0x00. | ||||
* | otverio2015: add debug logging to help track Issue #22. | Diego Elio Pettenò | 2017-09-13 | 1 | -2/+8 |
| | |||||
* | Remove the gdef submodule import. | Diego Elio Pettenò | 2017-09-04 | 2 | -3/+0 |
| | | | | | The gdef project should be considered deprecated. Instead we should implement the TidePool data model: http://developer.tidepool.org/data-model/device-data/ | ||||
* | Tested with FreeStyle Optium Neo | Warren Moore | 2017-07-24 | 1 | -1/+1 |
| | |||||
* | Fix typo on import statement | Ryan Jarvis | 2017-06-24 | 1 | -1/+1 |
| | |||||
* | Use python3 in the shebang to mark this as not Python 2-compatible. | Diego Elio Pettenò | 2017-06-18 | 1 | -1/+1 |
| | | | | | Thanks to DorianScholz for pointing this out in pull request #14, and pointing me at https://www.python.org/dev/peps/pep-0394/. | ||||
* | Raise an exception right away if the Python version is unsupported. | Diego Elio Pettenò | 2017-06-15 | 1 | -0/+4 |
| | | | | | | | | As suggested by @DorianScholz in pull request #14. Use 3.2 as minimum version since that's what I originally targeted. I wonder if there is an easy way to track which features the code is relying upon to keep this up to date. | ||||
* | freestyle: add some debugging information. | Diego Elio Pettenò | 2017-06-15 | 1 | -0/+3 |
| | |||||
* | hiddevice: default to no timeout, like before. | Diego Elio Pettenò | 2017-06-15 | 1 | -5/+5 |
| | | | | | This restores the original behaviour, that seems to be necessary for the FreeStyle devices. | ||||
* | fsprecisionneo: FreeStyle Optium Neo H has been tested working | Diego Elio Pettenò | 2017-06-07 | 1 | -1/+1 |
| | |||||
* | hiddevice: make hidapi calls take a timeout, default to 1 second. | Diego Elio Pettenò | 2017-06-06 | 1 | -1/+8 |
| | | | | | This is important for a meter I'm working on right now, as there is no obvious way to tell whether to wait for new packets or not. | ||||
* | Add new model name to list of supported devices. | Diego Elio Pettenò | 2017-06-05 | 1 | -0/+1 |
| | |||||
* | Update message and fix line length. | Diego Elio Pettenò | 2017-06-05 | 1 | -1/+2 |
| | |||||
* | hiddevice: add a 1-second timeout to reads. | Diego Elio Pettenò | 2017-06-05 | 1 | -1/+6 |
| | | | | This is a semantics difference between hidraw and HIDAPI, cover for it. | ||||
* | Add a ne support class for HID-based devices. | Diego Elio Pettenò | 2017-06-04 | 3 | -36/+90 |
| | | | | | I'm currently implementing a separate HID-based driver that does not use the Abbott protocol, so this makes my life easier. | ||||
* | Abbott devices: add support for using hidapi library. | Diego Elio Pettenò | 2017-06-03 | 6 | -14/+49 |
| | | | | | | | | | 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. | ||||
* | Merge pull request #13 from DorianScholz/make_dateutil_optional | Diego Elio Pettenò | 2017-05-30 | 1 | -2/+4 |
|\ | | | | | Make dateutil optional: | ||||
| * | Make dateutil optional: | Dorian Scholz | 2017-05-30 | 1 | -2/+4 |
| | | | | | | | | - import it only when user sets a date from a date string | ||||
* | | Merge pull request #12 from DorianScholz/show_import_error | Diego Elio Pettenò | 2017-05-30 | 1 | -3/+3 |
|\ \ | | | | | | | Show import error when loading driver, so the actual cause of the pro… | ||||
| * | | Show import error when loading driver, so the actual cause of the problem can be seen | Dorian Scholz | 2017-05-30 | 1 | -3/+3 |
| |/ | |||||
* | | Merge pull request #11 from DorianScholz/fix_encoding_info | Diego Elio Pettenò | 2017-05-30 | 3 | -0/+2 |
|\ \ | | | | | | | Fix encoding info and add missing __init__.py file | ||||
| * | | Fix encoding info and add missing __init__.py file | Dorian Scholz | 2017-05-30 | 3 | -0/+2 |
| |/ | |||||
* | | Merge pull request #10 from DorianScholz/fix_fslibre_parsing | Diego Elio Pettenò | 2017-05-30 | 1 | -5/+9 |
|\ \ | |/ |/| | Fix IndexError and KeyError: double-rapid-acting-insulin | ||||
| * | Fix IndexError and KeyError: | Dorian Scholz | 2017-05-30 | 1 | -5/+9 |
|/ | | | | even if rapid-acting-flag is set double-rapid-acting-insulin record does not always exist, so make it optional and provide a default value | ||||
* | Add the Optium Neo as an untested supported device. | Diego Elio Pettenò | 2017-04-17 | 1 | -1/+4 |
| | |||||
* | All drivers: move documentation of features from README to docstring. | Diego Elio Pettenò | 2017-04-17 | 9 | -44/+101 |
| | | | | | | | | This allows the drivers to keep up to date with what they support and need. Should make Issue #9 easier to solve. Also merge the dependency list with the list of supported devices, so that you don't have to join the two tables in your head. | ||||
* | Add support for a "help" action that prints the driver module's docstring. | Diego Elio Pettenò | 2017-04-17 | 2 | -1/+24 |
| | | | | | | | | This allows the drivers to provide information on what they support directly, rather than relying on the README file. It also allows to provide further information for the quirkier devices. This is again trying to resolve Issue #9. | ||||
* | Serial drivers: factor out opening of the serial port to a new base class. | Diego Elio Pettenò | 2017-04-17 | 5 | -49/+85 |
| | | | | | | This allows the serial support class to open the serial port without each driver having to pass the same long list of parameters, given that effectively all the meters use the same parameters, except few. | ||||
* | Remove unused constants. | Diego Elio Pettenò | 2017-04-15 | 1 | -4/+0 |
| | |||||
* | serial drivers: if no --device parameter is given, look for default cable. | Diego Elio Pettenò | 2017-04-15 | 4 | -21/+21 |
| | | | | | | | | pyserial makes it very easy to look for a serial port based on VID/PID pairs, so use those when possible. Unfortunately serial drivers are also the least reliable as all of the cables but Abbott's use generic IDs. This keeps in the direction of solving Issue 9. | ||||
* | fsoptium: use logging instead of writing to stderr directly. | Diego Elio Pettenò | 2017-04-15 | 1 | -3/+2 |
| | |||||
* | glucometer: make the error fatal and more clear when setting an invalid date. | Diego Elio Pettenò | 2017-04-15 | 1 | -2/+4 |
| | |||||
* | glucometer: log a better error if the driver name is not found. | Diego Elio Pettenò | 2017-04-15 | 1 | -1/+8 |
| | |||||
* | all drivers: make --device optional at the tool level. | Diego Elio Pettenò | 2017-04-15 | 9 | -2/+45 |
| | | | | | | | | This requires the drivers to validate their device, but also means they can provide a more explicit error message for the user as to what should be passed. This is a first step to help solving Issue 9. | ||||
* | Add a --vlog option to enable verbose logging. | Diego Elio Pettenò | 2017-02-25 | 1 | -0/+8 |
| | | | | | This helps adding debug information to drivers, particularly those sending encoded messages. | ||||
* | fslibre: parse and output the scan and blood tests. | Diego Elio Pettenò | 2017-02-24 | 1 | -19/+137 |
| | | | | | This adds some very free-form comments to note where the reading comes from and to convert the flags into something that the user can use. | ||||
* | fslibre: new driver for Abbott FreeStyle Libre download. | Diego Elio Pettenò | 2017-02-23 | 2 | -0/+75 |
| | | | | | | | | This is the first (draft) version of the driver, that only downloads the automatic sensor readings, marking them as (Sensor) in the comments. I'll follow up with downloading of the scans and blood tests, but wanted to have this pushed first. | ||||
* | sdcodefree: reformat and cleanup. | Diego Elio Pettenò | 2017-02-09 | 1 | -135/+138 |
| | |||||
* | Merge pull request #8 from gonzojive/master | Diego Elio Pettenò | 2017-01-20 | 1 | -1/+1 |
|\ | | | | | Include glucometerutils.support in setup.py. | ||||
| * | Include glucometerutils.support in setup.py. | Red Daly | 2017-01-20 | 1 | -1/+1 |
| | | |||||
* | | Merge pull request #7 from gonzojive/master | Diego Elio Pettenò | 2017-01-20 | 1 | -1/+1 |
|\| | | | | | Open OneTouch Verio devices in readwrite mode by default. | ||||
| * | Open OneTouch Verio devices in readwrite mode by default. | Red Daly | 2017-01-20 | 1 | -1/+1 |
|/ | | | | | | | | | Opening the device with read+write permissions is necessary to send write10 SCSI commands. The error message I was receiving was "SG_IO ioctl error; Operation not permitted" when running as non-root. http://sg.danny.cz/sg/sg_io.html describes SCSI permissions in greater depth and helped illuminate the nature of the permissions problem. | ||||
* | freestyle: error out if hidraw device does not exist. | Diego Elio Pettenò | 2017-01-17 | 1 | -0/+4 |
| | | | | This avoids creating a binary file when running the tool as root (bad Flameeyes). | ||||
* | fsinsulinx: add untested FreeStyle InsuLinx driver. | Diego Elio Pettenò | 2017-01-17 | 2 | -1/+68 |
| | | | | | | | | | | This is based off the fsprecisionneo driver, as the two share an almost identical protocol. The readings format is different between them, but otherwise the commands are compatible. There are a number of higher-level commands that differ between them, though, so it might be necessary to specialize the drivers further in the future. | ||||
* | fsprecisionneo: move the version and serial number information to the common support class. | Diego Elio Pettenò | 2017-01-17 | 2 | -10/+10 |
| | |||||
* | fsprecisionneo: fix mistake in readings dump command. | Diego Elio Pettenò | 2017-01-17 | 1 | -1/+1 |
| | |||||
* | freestyle: improve error message on command failure, fix comment. | Diego Elio Pettenò | 2017-01-17 | 1 | -2/+2 |
| | |||||
* | freestyle: raise NotImplementedError when trying to zero-log. | Diego Elio Pettenò | 2017-01-17 | 1 | -0/+4 |
| | |||||
* | fsprecisionneo: add support for setting date and time. | Diego Elio Pettenò | 2017-01-17 | 2 | -16/+30 |
| | | | | | | There are shared commands that allow settings the date and time of the device, implement those in the freestyle support module, so that they can be re-used in implementation of the same base protocol. | ||||
* | Update copyrights, cleanup whitespace where needed. | Diego Elio Pettenò | 2017-01-16 | 9 | -13/+22 |
| | |||||
* | Fix README to share the same Markdown syntax. | Diego Elio Pettenò | 2017-01-16 | 1 | -10/+6 |
| | |||||
* | Add new driver for the Abbott FreeStyle Precision Neo. | Diego Elio Pettenò | 2017-01-16 | 3 | -11/+271 |
| | | | | | This driver uses the HID-based protocol which is shared among different devices. | ||||
* | Rename freestyle_optium to fsoptium. | Diego Elio Pettenò | 2017-01-16 | 2 | -3/+3 |
| | | | | | The number of freestyle devices drivers will soon skyrocket, use the same shortening as the OneTouch ones. | ||||
* | LifeScan devices: move lifescan_common to the support directory. | Diego Elio Pettenò | 2017-01-16 | 6 | -25/+25 |
| | | | | | This makes it easier to figure out which files represent drivers, and which ones are per-vendor support modules. | ||||
* | Add an emacs local configuration file. | Diego Elio Pettenò | 2017-01-16 | 1 | -0/+4 |
| | |||||
* | Move the readings-to-csv conversion to the Reading class. | Diego Elio Pettenò | 2017-01-15 | 2 | -3/+7 |
| | |||||
* | Fetch the device information in all commands. | Diego Elio Pettenò | 2017-01-15 | 1 | -4/+6 |
| | | | | It's usually cheap and can provide assurance the device is connected and the right type. | ||||
* | Wrap the meter information to a namedtuple, instead of a string. | Diego Elio Pettenò | 2017-01-15 | 8 | -57/+78 |
| | | | | | | This matches the gdef MeterInfo message, and produces a similar (though not identical) string as before. Importantly, it allows providing semantic information. | ||||
* | Add a submodule pointing at gdef, to start implementing gdef export. | Diego Elio Pettenò | 2017-01-15 | 2 | -0/+3 |
| | | | | For now there is nothing using gdef, so this submodule does not need to be implemented. | ||||
* | Merge pull request #6 from lgp171188/map_func_call_fix | Diego Elio Pettenò | 2016-11-17 | 1 | -2/+2 |
|\ | | | | | Fix error in call to map() function | ||||
| * | Fix error in call to map() function | L. Guruprasad | 2016-11-16 | 1 | -2/+2 |
|/ | |||||
* | freestyle_optium: ignore β-ketones results from dumps. | Diego Elio Pettenò | 2016-08-31 | 1 | -4/+7 |
| | | | | | Since there is no way to expose non-glucose readings right now (I might work on that in the future), filter β-ketones results out from the dump. | ||||
* | freestyle_optium: fix reversed parameters to map(). | Diego Elio Pettenò | 2016-08-31 | 1 | -1/+1 |
| | | | | Not sure how this ever worked. | ||||
* | freestyle_optium: remove debugging print. | Diego Elio Pettenò | 2016-08-31 | 1 | -1/+0 |
| | |||||
* | sdcodefree: fix brainfart in README. | Diego Elio Pettenò | 2016-06-19 | 1 | -1/+1 |
| | |||||
* | sdcodefree: new driver. | Diego Elio Pettenò | 2016-06-19 | 2 | -0/+193 |
| | | | | | This driver supports SD Codefree readers, that are sold in the UK by HomeHealth UK. | ||||
* | otverio2015: fix date/time handling, which was broken outside of UTC. | Diego Elio Pettenò | 2016-05-21 | 1 | -1/+1 |
| | |||||
* | otverio2015: implement proper glucose unit identification. | Diego Elio Pettenò | 2016-05-21 | 1 | -3/+22 |
| | | | | | I managed to get my hands on an US-edition of the device, and I can confirm this behaves in a similar way to the otultraeasy. | ||||
* | Add backup files to .gitignore. | Diego Elio Pettenò | 2016-03-02 | 1 | -0/+1 |
| | |||||
* | Use a more Pythonic map(..., int) instead of list comprehension. | Diego Elio Pettenò | 2016-03-02 | 2 | -4/+4 |
| | |||||
* | Move the InvalidChecksum exception to the base exceptions module. | Diego Elio Pettenò | 2016-03-02 | 8 | -23/+15 |
| | | | | | Most glucometers have *some* sort of checksum, so there is no reason to implement this on a per-driver basis. | ||||
* | accuchek_reports: add a new driver for Accu-Chek Mobile meters. | Diego Elio Pettenò | 2016-02-15 | 2 | -0/+131 |
| | | | | | | | | | The default USB connection provides a USB storage device with a CSV datafile. This driver works by looking for that file and importing it. This does not support setting the time, nor reading the actual device time, but it is at least a good way to import data from different meters under the same format. | ||||
* | doc: use tables for devices, drivers, features and dependencies. | Diego Elio Pettenò | 2016-02-15 | 1 | -13/+33 |
| | | | | | This should provide more information on the devices themselves, particularly now that different levels of features are available. | ||||
* | otultra2: make the before/after meal constants in common module. | Diego Elio Pettenò | 2016-02-15 | 2 | -4/+9 |
| | | | | This will lead the way to providing meal information with future drivers. | ||||
* | otverio2015: new driver for OneTouch Verio (2015) and similar devices. | Diego Elio Pettenò | 2016-02-14 | 2 | -0/+231 |
| | | | | | | | | This should be working for OneTouch Select Plus devices, too. It currently does not support reporting in the native unit of the device. As of today, you'll also need my forked repository of python-scsi, as the current upstream one does not have working SGIO for Linux. | ||||
* | Make the ConnectionFailed exception more generic. | Diego Elio Pettenò | 2016-02-13 | 1 | -2/+2 |
| | |||||
* | otultraeasy: move the MalformedCommand exception to common. | Diego Elio Pettenò | 2016-02-13 | 2 | -11/+17 |
| | | | | | Also make the exception more general, so that it can be used in the verio2015 driver. | ||||
* | otultraeasy: move the crc function to lifescan_common. | Diego Elio Pettenò | 2016-02-13 | 3 | -16/+27 |
| | | | | | The same CRC-CCITT function is used in Verio 2015 devices, so prepare to reuse it by moving it to the common module. | ||||
* | Update documentation, reference the new glucometer-protocols repository. | Diego Elio Pettenò | 2016-02-09 | 2 | -5/+20 |
| | | | | Also update copyright year. | ||||
* | freestyle_optium: implement checksum verification on results. | Diego Elio Pettenò | 2016-02-09 | 1 | -2/+26 |
| | | | | | This should ensure more integrity of the results, and matches the behaviour on the lifescan devices. | ||||
* | Implement a basic driver for the FreeStyle Optium devices. | Diego Elio Pettenò | 2016-02-08 | 2 | -0/+256 |
| | | | | | This driver supports dumping of (glucose) readings and reading/setting the clock. | ||||
* | otultra2: avoid using connect/disconnect to wake up the device. | Diego Elio Pettenò | 2014-02-08 | 1 | -3/+2 |
| | | | | It seems like the device is very sensible to the reset command. | ||||
* | Add a note that the Ultra Easy is also known as Ultra Mini. | Diego Elio Pettenò | 2014-01-29 | 1 | -2/+3 |
| | |||||
* | otultra2: move checksum function within otultra2 driver. | Diego Elio Pettenò | 2014-01-29 | 4 | -49/+28 |
| | | | | | The function is not shared with the Ultra Easy and likely not with other devices either. | ||||
* | Initial support for OneTouch Ultra Easy glucometers. | Diego Elio Pettenò | 2014-01-29 | 3 | -3/+398 |
| | | | | | The driver is fully functional but requires proper documentation and testing. | ||||
* | common: fix namedtuple usage to allow for optional parameters. | Diego Elio Pettenò | 2014-01-29 | 1 | -3/+3 |
| | | | | The otultraeasy does not provide comments or meal indications. | ||||
* | Add connect/disconnect methods to otultra2 and send \x11\r on connection. | Diego Elio Pettenò | 2014-01-29 | 2 | -5/+12 |
| | | | | | The otultraeasy requires explicit connect/disconnect so implementing this before is helpful. | ||||
* | Merge pull request #1 from jimsiff/master | Diego Elio Pettenò | 2013-12-14 | 1 | -2/+7 |
|\ | | | | | Add confirmation prompt to zero log argument | ||||
| * | Add confirmation prompt to zero log argument | jimsiff | 2013-12-14 | 1 | -2/+7 |
|/ | | | | | I’m sure there’s a cleaner way to do this, but I wanted a confirmation when zeroing the glucometer data log. | ||||
* | Update documentation for the dump format and options. | Diego Elio Pettenò | 2013-12-11 | 1 | -0/+20 |
| | |||||
* | Clean up the code to remove methods that should be functions and imports. | Diego Elio Pettenò | 2013-12-11 | 3 | -122/+115 |
| | |||||
* | Allow sorting the dumped data; sort by date by default. | Diego Elio Pettenò | 2013-12-11 | 2 | -6/+18 |
| | | | | | This changes the dump output for otultra2 devices as they would dump data in record format, last reading first. | ||||
* | Change all the internal representations to mg/dL for compatibility with LifeScan. | Diego Elio Pettenò | 2013-12-11 | 2 | -15/+12 |
| | | | | | | While mmol/L is the international standard unit, at least LifeScan uses mg/dL in all their devices, and since they are the ones for which we have protocols for, we might as well use the same. | ||||
* | glucometer.py: if no unit is provided on command line, use the default of the meter. | Diego Elio Pettenò | 2013-12-11 | 1 | -1/+5 |
| | |||||
* | Generalise the meal/comment handling to the Reading object. | Diego Elio Pettenò | 2013-12-11 | 3 | -8/+18 |
| | | | | | While not all readers implement before/after meal notes, it's possible to implement an heuristics for that. | ||||
* | otultra2: expose the meal and comments as separate field in the CSV. | Diego Elio Pettenò | 2013-12-11 | 1 | -5/+1 |
| | | | | | Idea by Jim Sifferle, implemented in a slightly different way as I noticed I forgot to quote it properly. | ||||
* | Better error handling. | Diego Elio Pettenò | 2013-12-08 | 2 | -22/+24 |
| | | | | | If any exception is thrown by the library, print an error statement and return a non-zero exit value. | ||||
* | Add a new command to dump the identification of the glucometer. | Diego Elio Pettenò | 2013-12-08 | 2 | -4/+26 |
| | | | | This allows to get the serial number, as well as other details about the glucometer once it's installed. | ||||
* | otultra2: implement a zero log command to clear a device's memory. | Diego Elio Pettenò | 2013-12-08 | 2 | -1/+20 |
| | |||||
* | otultra2: implement decoding of meal and comment codes. | Diego Elio Pettenò | 2013-12-08 | 3 | -3/+35 |
| | | | | This also dumps the comment with the dump command. | ||||
* | Read more data out of the OTUltra2 dump lines. Return data in a Reading object. | Diego Elio Pettenò | 2013-09-29 | 3 | -12/+32 |
| | | | | | The Reading object will be extended to cater for flags, comments and other device-specific information. | ||||
* | Fix style for tests. | Diego Elio Pettenò | 2013-09-29 | 3 | -68/+60 |
| | |||||
* | test_otultra2: factor out setting of returned serial string. | Diego Elio Pettenò | 2013-08-10 | 1 | -9/+9 |
| | |||||
* | glucometer: allow providing a freeform arbitrary date to set on the meter. | Diego Elio Pettenò | 2013-08-04 | 1 | -2/+10 |
| | |||||
* | setup.py: update license specification. | Diego Elio Pettenò | 2013-08-03 | 1 | -1/+1 |
| | |||||
* | glucometer: mark executable. | Diego Elio Pettenò | 2013-08-03 | 1 | -0/+0 |
| | |||||
* | Relicense everything under MIT license. | Diego Elio Pettenò | 2013-08-03 | 10 | -684/+27 |
| | | | | | There is no reason for me to use GPLv3 now that I'm not using the CRC32-Sick code, so I'll go with the most liberal license out there. | ||||
* | Implement the correct checksum algorithm. | Diego Elio Pettenò | 2013-08-03 | 3 | -34/+13 |
| | | | | | | | Unlike what I though, OneTouch2 does not use CRC32 Sick algorithm, but a very stupid full 16-bit modulo sum of the bytes in the reply. This is very simple and does not require GPLv3 code at all. | ||||
* | Add support for checksum verification for the otultra2 driver. | Diego Elio Pettenò | 2013-08-03 | 5 | -29/+139 |
| | | | | | | | This introduced some changes in the Exception class to simplify the code, and at the same time it adds a module for multiple lifescan drivers to share code (multiple OneTouch protocols share the same checksum for instance). | ||||
* | glucometer: remove unused argv usage. | Diego Elio Pettenò | 2013-08-03 | 1 | -2/+1 |
| | |||||
* | Update function names to follow PEP8. | Diego Elio Pettenò | 2013-08-03 | 6 | -43/+54 |
| | |||||
* | Add utf-8 encoding specification to all files. | Diego Elio Pettenò | 2013-08-03 | 7 | -0/+8 |
| | |||||
* | glucometer: add support for selecting output units on dump. | Diego Elio Pettenò | 2013-08-03 | 1 | -1/+4 |
| | |||||
* | glucometer: fix script to actually work and provide actions. | Diego Elio Pettenò | 2013-08-03 | 1 | -2/+13 |
| | |||||
* | Add tests for the glucose unit conversion. | Diego Elio Pettenò | 2013-08-03 | 1 | -0/+53 |
| | |||||
* | test_otultra2: add header. | Diego Elio Pettenò | 2013-08-03 | 1 | -0/+7 |
| | |||||
* | otultra2: fix default unit handling. | Diego Elio Pettenò | 2013-08-03 | 1 | -1/+2 |
| | |||||
* | Add a link to README.md to try rendering it on GitHub. | Diego Elio Pettenò | 2013-08-03 | 1 | -0/+1 |
| | |||||
* | Initial import of the raw data. | Diego Elio Pettenò | 2013-08-03 | 12 | -0/+1142 |