From cda7214f4bc836e2472131de914d4047eb421062 Mon Sep 17 00:00:00 2001 From: Ben West Date: Tue, 21 Jun 2016 20:03:42 -0700 Subject: [PATCH] fix parsing CRC as record CRC is not part of the data, only look at first 1022 bytes. Should help fix: * https://github.com/bewest/decoding-carelink/issues/196 Former-commit-id: 753d8af0f7f3a8f44f8611871b47ce6ec5d8e613 Former-commit-id: e0a780fe0636cdd79ed3a37c17d8a0de11338090 [formerly fa7ab4415f1e748cf72dc402338d40f6b653bee8] Former-commit-id: 19f2e61a624a9d3f64bf88488c2a49fba04efbec Former-commit-id: f9111d61da01ed5b88d36728499290ef11648b31 --- decocare/history.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/decocare/history.py b/decocare/history.py index ab6aec9..f1c21eb 100644 --- a/decocare/history.py +++ b/decocare/history.py @@ -796,7 +796,7 @@ def clean (self, data): # data.reverse( ) # self.data = self.eat_nulls(data) #self.data.reverse( ) - self.data = data[:] + self.data = data[0:1022] # XXX: under some circumstances, zero is the correct value and # eat_nulls actually eats valid data. This ugly hack restores two # nulls back ot the end.