例程里的代码是:
//Convert the raw temperature sensor measurement into temperature
degC = GetTemperatureC(temp);
又看了一下它的解释如下:
//This function uses the reference data stored in OTP to convert the raw temperature
//sensor reading into degrees K
int16 GetTemperatureK(int16 sensorSample)
{
return ((sensorSample - getTempOffset())*(int32)getTempSlope() + FP_ROUND + KELVIN_OFF)/FP_SCALE;
}
请问:
这句程序 return ((sensorSample - getTempOffset())*(int32)getTempSlope() + FP_ROUND + KELVIN_OFF)/FP_SCALE;里面的各个词语分别代表什么意思?与温度传感器本身有关的参数又是什么呢? |