calc_setpoint() and read_temp() now return values instead of writing to globals