I understand that we should always follow APIs, not Datasheet, and that calculation formulae are different between integer and float. Still there is a discrepancy between the results of integer and float APIs. Below is an example. Assumption: par_g1=-22, par_g2=-4829, par_g3=18, res_heat_range=1, res_heat_val=47 which are taken from a real device sample, and target temp=200. Integer " calc_heater_res" results: 87 for amb_temp=20, 30, 40, and 50. Float "calc_heater_res" results: 88 for amb_temp=20 and 30, and 89 for amb_temp=40 and 50. I understand the differences are minor, but if I change "var1=(amb_temp*par_g3/1000)*256" to "var1=(amb_temp*par_g3*10)*256" in the integer calculation as I wrote earlier, the results become identical. So I still believe there is inconsistency between integer and float calculations in the API.
... View more