Updated thermocouple code to the in-use version