diff options
author | Ben West <bewest@gmail.com> | 2016-03-14 19:29:17 -0700 |
---|---|---|
committer | Ben West <bewest@gmail.com> | 2016-03-14 19:29:17 -0700 |
commit | aba0b700ef44b65b7a2ecf60de81241b731927f3 (patch) | |
tree | 504f3827b5900870ae70e3e21f599e0c0e5327a0 | |
parent | 21419e7221a23f0739c595fb049d1067635ef1d2 (diff) |
add four more read commands
-rw-r--r-- | dexcom_reader/readdata.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/dexcom_reader/readdata.py b/dexcom_reader/readdata.py index 3009f37..9fa60a5 100644 --- a/dexcom_reader/readdata.py +++ b/dexcom_reader/readdata.py | |||
@@ -172,8 +172,27 @@ class Dexcom(object): | |||
172 | return CLOCK_MODE[ord(cm[0])] | 172 | return CLOCK_MODE[ord(cm[0])] |
173 | 173 | ||
174 | def ReadDeviceMode(self): | 174 | def ReadDeviceMode(self): |
175 | # ??? | ||
175 | return self.GenericReadCommand(constants.READ_DEVICE_MODE).data | 176 | return self.GenericReadCommand(constants.READ_DEVICE_MODE).data |
176 | 177 | ||
178 | def ReadBlindedMode(self): | ||
179 | MODES = { 0: False } | ||
180 | raw = self.GenericReadCommand(constants.READ_BLINDED_MODE).data | ||
181 | mode = MODES.get(bytearray(raw)[0], True) | ||
182 | return mode | ||
183 | |||
184 | def ReadHardwareBoardId(self): | ||
185 | return self.GenericReadCommand(constants.READ_HARDWARE_BOARD_ID).data | ||
186 | |||
187 | def ReadEnableSetupWizardFlag (self): | ||
188 | # ??? | ||
189 | return self.GenericReadCommand(constants.READ_ENABLE_SETUP_WIZARD_FLAG).data | ||
190 | |||
191 | def ReadSetupWizardState (self): | ||
192 | # ??? | ||
193 | return self.GenericReadCommand(constants.READ_SETUP_WIZARD_STATE).data | ||
194 | |||
195 | |||
177 | def ReadManufacturingData(self): | 196 | def ReadManufacturingData(self): |
178 | data = self.ReadRecords('MANUFACTURING_DATA')[0].xmldata | 197 | data = self.ReadRecords('MANUFACTURING_DATA')[0].xmldata |
179 | return ET.fromstring(data) | 198 | return ET.fromstring(data) |