diff options
Diffstat (limited to 'dexcom_reader/database_records.py')
-rw-r--r-- | dexcom_reader/database_records.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/dexcom_reader/database_records.py b/dexcom_reader/database_records.py index 9274d24..22ba279 100644 --- a/dexcom_reader/database_records.py +++ b/dexcom_reader/database_records.py | |||
@@ -289,7 +289,7 @@ class SensorRecord(GenericTimestampedRecord): | |||
289 | class EGVRecord(GenericTimestampedRecord): | 289 | class EGVRecord(GenericTimestampedRecord): |
290 | # uint, uint, ushort, byte, ushort | 290 | # uint, uint, ushort, byte, ushort |
291 | # (system_seconds, display_seconds, glucose, trend_arrow, crc) | 291 | # (system_seconds, display_seconds, glucose, trend_arrow, crc) |
292 | FIELDS = ['glucose', 'trend_arrow'] | 292 | FIELDS = ['glucose', 'trend_arrow', 'noise'] |
293 | FORMAT = '<2IHcH' | 293 | FORMAT = '<2IHcH' |
294 | 294 | ||
295 | @property | 295 | @property |
@@ -322,6 +322,9 @@ class EGVRecord(GenericTimestampedRecord): | |||
322 | arrow_value = ord(self.full_trend) & constants.EGV_TREND_ARROW_MASK | 322 | arrow_value = ord(self.full_trend) & constants.EGV_TREND_ARROW_MASK |
323 | return constants.TREND_ARROW_VALUES[arrow_value] | 323 | return constants.TREND_ARROW_VALUES[arrow_value] |
324 | 324 | ||
325 | @property | ||
326 | def noise (self): | ||
327 | return (ord(self.data[3]) & constants.EGV_NOISE_MASK) >> 4 | ||
325 | def __repr__(self): | 328 | def __repr__(self): |
326 | if self.is_special: | 329 | if self.is_special: |
327 | return '%s: %s' % (self.display_time, self.glucose_special_meaning) | 330 | return '%s: %s' % (self.display_time, self.glucose_special_meaning) |