(self, data)
| 244 | self.annotate("Interrupt bits", ' '.join(out)) |
| 245 | |
| 246 | def ad_readout(self, data): |
| 247 | cnt_idx = self.cnt - len(data) + 1 |
| 248 | idx = 0 |
| 249 | while idx < 14: |
| 250 | if idx == 2: |
| 251 | # Skip over reserved field |
| 252 | idx += 2 |
| 253 | value = (data[idx] << 8) | data[idx + 1] |
| 254 | name = AD_READOUTS.get(idx, "...") |
| 255 | if value != 0: |
| 256 | if idx == 0: |
| 257 | self.annotate(name, self.to_temp(value), |
| 258 | cnt_idx + idx, cnt_idx + idx + 1) |
| 259 | elif idx == 4: |
| 260 | self.annotate(name, self.to_current(value), |
| 261 | cnt_idx + idx, cnt_idx + idx + 1) |
| 262 | elif idx in (6, 8): |
| 263 | self.annotate(name, self.to_power(value), |
| 264 | cnt_idx + idx, cnt_idx + idx + 1) |
| 265 | else: |
| 266 | self.annotate(name, str(value), cnt_idx + idx, |
| 267 | cnt_idx + idx + 1) |
| 268 | idx += 2 |
| 269 | |
| 270 | def gcs(self, data): |
| 271 | allbits = (data[0] << 8) | data[1] |
nothing calls this directly
no test coverage detected