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

stub out dev area post 0.1.10 release #11

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions dexcom_reader/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ class CrcError(Error):
EGV_VALUE_MASK = 1023
EGV_DISPLAY_ONLY_MASK = 32768
EGV_TREND_ARROW_MASK = 15
EGV_NOISE_MASK = 112

BATTERY_STATES = [None, 'CHARGING', 'NOT_CHARGING', 'NTC_FAULT', 'BAD_BATTERY']

Expand Down
5 changes: 4 additions & 1 deletion dexcom_reader/database_records.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ def rssi(self):
class EGVRecord(GenericTimestampedRecord):
# uint, uint, ushort, byte, ushort
# (system_seconds, display_seconds, glucose, trend_arrow, crc)
FIELDS = ['glucose', 'trend_arrow']
FIELDS = ['glucose', 'trend_arrow', 'noise']
FORMAT = '<2IHcH'

@property
Expand Down Expand Up @@ -322,6 +322,9 @@ def trend_arrow(self):
arrow_value = ord(self.full_trend) & constants.EGV_TREND_ARROW_MASK
return constants.TREND_ARROW_VALUES[arrow_value]

@property
def noise (self):
return (ord(self.data[3]) & constants.EGV_NOISE_MASK) >> 4
def __repr__(self):
if self.is_special:
return '%s: %s' % (self.display_time, self.glucose_special_meaning)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def readme():
return f.read()

setup(name='dexcom_reader',
version='0.1.10', # http://semver.org/
version='0.1.11-dev', # http://semver.org/
description='Audit, and inspect data from Dexcom G4.',
long_description=readme(),
author="Will Nowak",
Expand Down