src/software/picoreflow/lib/max31855.py
def convert_tc_data(self, tc_data):
        '''Convert thermocouple data to a useful number (celsius).'''
        if tc_data & 0x2000:
            # two's compliment
            without_resolution = ~tc_data & 0x1FFF
            without_resolution += 1
            without_resolution *= -1
        else:
            without_resolution = tc_data & 0x1FFF
        return without_resolution * 0.25
Convert thermocouple data to a useful number (celsius).
Convert thermocouple data to a useful number (celsius).
Convert thermocouple data to a useful number ( celsius ) .
def convert_tc_data(self, tc_data):
        if tc_data & 0x2000:
            without_resolution = ~tc_data & 0x1FFF
            without_resolution += 1
            without_resolution *= -1
        else:
            without_resolution = tc_data & 0x1FFF
        return without_resolution * 0.25
def convert_tc_data ( self , tc_data ) : if tc_data & 0x2000 : without_resolution = ~ tc_data & 0x1FFF without_resolution += 1 without_resolution *= - 1 else : without_resolution = tc_data & 0x1FFF return without_resolution * 0.25
Convert thermocouple data to a useful number (celsius).
Convert thermocouple data to a useful number ( celsius ) .
'''Convert thermocouple data to a useful number (celsius).''' # two's compliment
self
tc_data