Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

decoding page should detect crc #196

Open
bewest opened this issue Jun 22, 2016 · 5 comments
Open

decoding page should detect crc #196

bewest opened this issue Jun 22, 2016 · 5 comments

Comments

@bewest
Copy link
Owner

bewest commented Jun 22, 2016

Sometimes the decoder tries to eat the crc at the end as a record.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/35379556-decoding-page-should-detect-crc?utm_campaign=plugin&utm_content=tracker%2F522759&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F522759&utm_medium=issues&utm_source=github).
@bewest
Copy link
Owner Author

bewest commented Jun 22, 2016

pump://JSON/iter_pump_hours/settings/pumphistory-24h.json
Traceback (most recent call last):
  File "/usr/local/bin/openaps-report", line 82, in <module>
    app( )
  File "/usr/local/lib/python2.7/dist-packages/openaps/cli/__init__.py", line 51, in __call__
    self.run(self.args)
  File "/usr/local/bin/openaps-report", line 75, in run
    output = app(args, self)
  File "/usr/local/lib/python2.7/dist-packages/openaps/cli/subcommand.py", line 52, in __call__
    return self.method.main(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openaps/reports/invoke.py", line 40, in main
    output = task.method(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openaps/uses/use.py", line 45, in __call__
    output = self.main(args, app)
  File "/usr/local/lib/python2.7/dist-packages/openaps/vendors/medtronic.py", line 639, in main
    for rec in self.range( ):
  File "/usr/local/lib/python2.7/dist-packages/decocare/models/__init__.py", line 67, in __call__
    for record in page:
  File "/usr/local/lib/python2.7/dist-packages/decocare/models/__init__.py", line 46, in download_page
    for record in self.find_records(page):
  File "/usr/local/lib/python2.7/dist-packages/decocare/models/__init__.py", line 157, in find_records
    decoder = history.HistoryPage(response.data, self.inst)
  File "/usr/local/lib/python2.7/dist-packages/decocare/history.py", line 777, in __init__
    if lib.BangInt(crc) != computed:
  File "/usr/local/lib/python2.7/dist-packages/decocare/lib.py", line 235, in BangInt
    ( x, y ) = ints
ValueError: need more than 0 values to unpack

bewest added a commit to openaps/decocare that referenced this issue Jun 22, 2016
CRC is not part of the data, only look at first 1022 bytes.
Should help fix:
* bewest/decoding-carelink#196
@bewest
Copy link
Owner Author

bewest commented Jun 22, 2016

Handled in PR: openaps/decocare#1

@loudnate
Copy link
Collaborator

Oh, you moved it?

On Jun 21, 2016, at 8:06 PM, Ben West [email protected] wrote:

Handled in PR: openaps/decocare#1


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@bewest
Copy link
Owner Author

bewest commented Jun 22, 2016

I did move it over to a place where it doesn't depend on my name, in particular. I'd like to be able to consider roles in the diabetes industry, and in general this felt like a way to exercise a bit more discipline/rigor as a shared resource, or at least, that's the hope.

@loudnate
Copy link
Collaborator

👍

On Jun 21, 2016, at 11:59 PM, Ben West [email protected] wrote:

I did move it over to a place where it doesn't depend on my name, in particular. I'd like to be able to consider roles in the diabetes industry, and in general this felt like a way to exercise a bit more discipline/rigor as a shared resource, or at least, that's the hope.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

scottleibrand pushed a commit to openaps/decocare-clean that referenced this issue Nov 15, 2017
CRC is not part of the data, only look at first 1022 bytes.
Should help fix:
* bewest/decoding-carelink#196


Former-commit-id: 753d8af0f7f3a8f44f8611871b47ce6ec5d8e613
Former-commit-id: e0a780fe0636cdd79ed3a37c17d8a0de11338090 [formerly fa7ab4415f1e748cf72dc402338d40f6b653bee8]
Former-commit-id: 19f2e61a624a9d3f64bf88488c2a49fba04efbec
Former-commit-id: f9111d61da01ed5b88d36728499290ef11648b31
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

No branches or pull requests

2 participants