(self, value)
| 160 | # Convert 16-bit two's complement values, with each increment |
| 161 | # representing 1/256C, to degrees Celsius. |
| 162 | def to_temp(self, value): |
| 163 | if value & 0x8000: |
| 164 | value = -((value ^ 0xffff) + 1) |
| 165 | temp = value / 256.0 |
| 166 | return "%.1f C" % temp |
| 167 | |
| 168 | # TX bias current in uA. Each increment represents 0.2uA |
| 169 | def to_current(self, value): |
no outgoing calls
no test coverage detected