System.BatteryLevel 0% on osx
#1
I can't get any reading for battery on OSX.

If I plug or unplug charging cable, I notice the info shows as busy, meaning something is read. But I get no result other than 0% ( or busy Wink )

CPU usage too is always 0% (but that might just be my macbook kickin' butts.)

ideas?

Image
Image Image
Did I Help? Add to my reputation
Reply
#2
For what it's worth, it does detect when the battery is about to run out, it sends a notification to XBMC. So atleast that part is working on 10.8.3.
Reply
#3
(2013-03-27, 11:58)toiva Wrote: For what it's worth, it does detect when the battery is about to run out, it sends a notification to XBMC. So atleast that part is working on 10.8.3.

Yes I noticed that, that's why i wasn't expecting it to not work... Wink

I wanted to have battery level on HomePage though...
Image Image
Did I Help? Add to my reputation
Reply
#4
maybe float is needed?

line 341 in DarwinUtils.mm

float batteryLevel = [[UIDevice currentDevice] batteryLevel];

Code:
int DarwinBatteryLevel(void)
{
  float batteryLevel = 0;
#if defined(TARGET_DARWIN_IOS)
  if(!DarwinIsAppleTV2())
     float batteryLevel = [[UIDevice currentDevice] batteryLevel];
#else

blah blah blah

#endif
  return batteryLevel * 100;  
}

just guessing. Confused
Image Image
Did I Help? Add to my reputation
Reply
#5
well even my OE/Win7 reports 0% and i don't have a battery and just use normal power cable.
Sound something that could be fixed i guess
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#6
(2013-03-27, 14:06)Martijn Wrote: well even my OE/Win7 reports 0% and i don't have a battery and just use normal power cable.
Sound something that could be fixed i guess

sweet Thanks!!

also system.CPUUsage returns.. 0%.... Angel
Image Image
Did I Help? Add to my reputation
Reply
#7
can you create a ticket for that on trac? also refer to this thread.
i tend to forget as i can't access it here at workWink
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#8
trac ticket submitted.
Image Image
Did I Help? Add to my reputation
Reply
#9
update_

it does show 100% when battery is full.
Image Image
Did I Help? Add to my reputation
Reply
#10
https://github.com/xbmc/xbmc/commit/723e...88659f4e84
Reply
#11
(2013-03-27, 14:11)fastcolors Wrote:
(2013-03-27, 14:06)Martijn Wrote: well even my OE/Win7 reports 0% and i don't have a battery and just use normal power cable.
Sound something that could be fixed i guess

sweet Thanks!!

also system.CPUUsage returns.. 0%.... Angel

https://github.com/xbmc/xbmc/commit/981c...5c291cba34
Reply

Logout Mark Read Team Forum Stats Members Help
System.BatteryLevel 0% on osx0