Search code examples
c++windows-mobilewindows-cebatterytemperature

How to represent the Battery Temperature value in Wince using GetSystemPowerStatusEx2 API?


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.


Solution

  • 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.