Sys.getSystemStats().battery value inconsistent between simulator and device

The documentation says that Sys.getSystemStats().battery is the battery life remaining in percent, but it isn't clear exactly what the value is supposed to be. In the emulator, the value appears to be fixed to 1.0f leading me to believe that the value is a Float between 0 and 1, but when I run the code on a physical device, the value is a Number between 0 and 100.

It would be nice if the documentation was more specific about the type and range of values, and if the expected type could be clarified.

Travis
  • Former Member
    Former Member over 10 years ago
    I think the value is actually between 0.0 and 100.0 on the watch and it is indeed a float. The emulator is stuck on 1.00% remaining. But I wholeheartedly agree with you that
    a) we should know what value the emulator provides
    b) what are the valid ranges for status values
    c) possibly improve the emulator to allow changing all status and sensor values
  • The simulator returns a float with a fixed value of 1.0f, which means 1%. On hardware it returns a value between 0.0f and 100.0f. I've added the other suggestions to our backlog list.