标签:i++ pmu temp pre const color mpm ret char
const unsigned int PT100_Sheet0_250[30]= { 10000,10390,10779,11167,11554,11940,12324,12707,13089,13470, //0-90 13850,14229,14606,14982,15358,15731,16104,16476,16846,17216, //100-190 17584,17951,18317,18612,19045,19407,19769,20129,20488,20845, //200-290 }; //AD_Code 根据ad值换算的阻值 unsigned int TempSwap_PT100(unsigned int AD_Code) { char i; float Tempmum; for(i=0;i<30;i++) { if(AD_Code<=PT100_Sheet0_250[i]) { Tempmum=(float)(((AD_Code-PT100_Sheet0_250[i-1])*1000)/(PT100_Sheet0_250[i]-PT100_Sheet0_250[i-1])); return (unsigned int)(Tempmum+(i-1)*1000); } } }
标签:i++ pmu temp pre const color mpm ret char
原文地址:https://www.cnblogs.com/nsss/p/11745701.html