Skip to content

Conversation

@garberw
Copy link
Owner

@garberw garberw commented Nov 15, 2018

No description provided.

Flameeyes and others added 30 commits December 28, 2017 21:06
The shim needs to be renamed, but this makes the history simpler to read.
This should make it easier to add dependencies and so on.
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.
This simplifies the code and enforces the validation within the format
documentation too.

construct can handle the full package verification, including dealing with
padding.
This would have found an extra bug that was pushed unfixed after enum
conversion, and two bugs that I did find during the conversion.
With 2a825fb 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.
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.
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.
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.
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.
This makes it the same as the otverio2015.
…2015.

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.
This test was actually only testing the CRC CCITT implementation now that
otultraeasy uses construct.
…vers.

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.
The values are the same between all models sharing this protocol, even
though the full reply message isn't.
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.
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.
These are now coming from the software trace. The version response is funny
though.
The success status is always %x06 if there is a message at all.
Flameeyes and others added 28 commits January 6, 2018 23:54
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.
As noted in Issue #30, this is currently untested, but I'm confident it
won't take much to get it to working state.
This closes Issue #30 as I actually tested this and it works perfectly fine.
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).
… only.

This still is required to fix Issue #38, but luckily it's just a test
failure for now.
lambdafied this expression
lambdafied this expression
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.
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).
Thanks to Noel Cragg for reporting this.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants