diff options
author | Andrew Cady <d@jerkface.net> | 2017-01-26 09:33:51 +0000 |
---|---|---|
committer | Andrew Cady <d@jerkface.net> | 2017-01-26 13:04:13 +0000 |
commit | 896265b0b523014ea4b4105e3fe87bdc234e8b62 (patch) | |
tree | 4d1a407b7609862680f3cd58077adfa10403d14d | |
parent | e67c8d619d062c61a86f6b2014e9218c6ee5d923 (diff) |
bugfix: EGVRecord.noise() to use self.full_trend()
The method EGVRecord.full_trend() is implemented differently on the Dexcom G5.
It returns self.data[12] instead of self.data[3].
EGVRecord.noise() had used self.data[3] directly instead of calling
self.full_trend(), causing this exception when connecting to a G5
receiver:
TypeError: ord() expected string of length 1, but int found
I can only assume that this is correct.
-rw-r--r-- | dexcom_reader/database_records.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/dexcom_reader/database_records.py b/dexcom_reader/database_records.py index 22ba279..fa09bea 100644 --- a/dexcom_reader/database_records.py +++ b/dexcom_reader/database_records.py | |||
@@ -324,7 +324,7 @@ class EGVRecord(GenericTimestampedRecord): | |||
324 | 324 | ||
325 | @property | 325 | @property |
326 | def noise (self): | 326 | def noise (self): |
327 | return (ord(self.data[3]) & constants.EGV_NOISE_MASK) >> 4 | 327 | return (ord(self.full_trend) & constants.EGV_NOISE_MASK) >> 4 |
328 | def __repr__(self): | 328 | def __repr__(self): |
329 | if self.is_special: | 329 | if self.is_special: |
330 | return '%s: %s' % (self.display_time, self.glucose_special_meaning) | 330 | return '%s: %s' % (self.display_time, self.glucose_special_meaning) |