문제

I just want to get confirmation on Battery Temperature data.

I am using GetSystemPowerStatusEx2 API to get battery temperature for windows ce device using c++..

I am using the variable say "psse" of type "SYSTEM_POWER_STATUS_EX2".

On success, the value returned for battery temperature is mentioned below:-

psse.BatteryTemperature = 29 //which is of dword type.

My doubt is what is the actual battery temperature representation?

Is it 2.9 degree celsius or 29 degree celsius & why?

Plz reply. Thanks in advance.

도움이 되었습니까?

해결책

According to the documentation on MSDN

Battery temperature in degrees Celsius. This member can have a value in the range of –3,276.8 to 3,276.7; the increments are 0.1 degrees Celsius.

So a value of 29 means 2.9 degrees Celsius.

다른 팁

did you zero out the BatteryStatusEx2 struct memory to zero before calling the function?

OTOH the OEMs can, but do not need to fill all values correctly. So if the function returns 29, which is 2.9°C, I assume the OEM does not fill the value correctly. Either it is ment as 29°C, which is alos not a real value over time, as the battery temperature should go up during usage of the device.

Posibly the OEM offers a new firmware or service release for the device which corrects the wrong reading.

The accuracy of the values depends on the implementation of the driver. Possibly the battery does not expose any temperature at all and the driver always fills the struct with the value 29.

Do not trust to much in OEMs implementing all features correctl all the time.

~josef

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top