Active Topics

 


Reply
Thread Tools
Posts: 86 | Thanked: 8 times | Joined on May 2010
#701
Regarding the icons, I think trying to cram too much information into one icon is counterproductive. I'm unconvinced even that there should be a drain-rate indicator in the icon; being able to get to the numeric readout in a single key ought to be enough.

Also: the icon design I saw for drain-rate looks like an upward-pointing arrow. Doesn't it make more sense for the drain rate to be downward-pointing?
 
Posts: 875 | Thanked: 918 times | Joined on Sep 2010
#702
Originally Posted by mcow View Post
Regarding the icons, I think trying to cram too much information into one icon is counterproductive. I'm unconvinced even that there should be a drain-rate indicator in the icon; being able to get to the numeric readout in a single key ought to be enough.
You can turn off the drain and cpu indicators in settings. And the drain is the actual current draw and not the % per last hour value that ASUI shows.


Originally Posted by mcow View Post
Also: the icon design I saw for drain-rate looks like an upward-pointing arrow. Doesn't it make more sense for the drain rate to be downward-pointing?
Charging has an arrow pointing into the battery since power is being put into it. Drain arrows show power exiting the battery...

--

BTW, there is a bug that causes the applet to lock up the statusbar and you'll need to kill hildon-desktop to restart it. It happened when I was rapidly plugging and unplugging the charger, I'm still testing for the actual cause.

Last edited by auouymous; 2011-05-31 at 14:40.
 

The Following User Says Thank You to auouymous For This Useful Post:
Posts: 1,101 | Thanked: 1,184 times | Joined on Aug 2008 @ Spain
#703
Originally Posted by auouymous View Post
New test binaries for ASUI, settings and statusbar.

The statusbar drain indicator now reads power draw from BME and is updated every 15 seconds. Colors are: <100 mA (gray), <200 mA (yellow), <350 mA (orange), >=350 mA (red), look good? Playing a video with mplayer is about 450, playing video with media player is about 200, idle with wifi varies from 70-200 depending on brightness.
I've been doing some numbers
Since the real battery capacity is 1500 mAh, we can link an active time to a drain current (as current=capacity/time), making a little more sense of it.
So, l propose: >10h gray, 10-6 h yellow, 6-4 h orange, <4 h red
That would mean, in mA: < 150 gray, 150-250 yellow, 250-375 orange, > 375 red
But I see odd battery drops (see graph, do you see them in your device too?), so taking into account the real battery drop in the 2 hours testing period, it would mean a 1.22 (22%) correction factor.

So, my final proposal, if the battery drops are common: < 120 gray, 120-200 yellow, 200-300 orange, >300 red

What do you think?

P.S.: Some drains I've seen
Minimum: 6 mA
Idle, dimmed: 60 mA
Idle, not dimmed, dark room (15 brightness): 70 mA
Idle, not dimmed, light room (15 brightness): 120 mA
Playing mp3 (osso mediaplayer cpu/dsp=266/177), screen off: 100 mA
Playing mp3 stream, screen off: 200 mA
Browsing, far IAP without energy saving support: 350-500 mA
Maximum I've seen: 1200 mA
Using speakers: up to +40 mA
Attached Images
 

Last edited by maacruz; 2011-05-31 at 15:44.
 
Posts: 875 | Thanked: 918 times | Joined on Sep 2010
#704
Originally Posted by maacruz View Post
So, l propose: >10h gray, 10-6 h yellow, 6-4 h orange, <4 h red
Duh, I didn't think about mapping them to times. Orange should probably 7 instead of 6 as it one of the max usage times. But 4 and 10 look good for the other two, three hours between each color.

Originally Posted by maacruz View Post
But I see odd battery drops (see graph, do you see them in your device too?), so taking into account the real battery drop in the 2 hours testing period, it would mean a 1.22 (22%) correction factor.
Battery drops are random events and shouldn't be accounted for.

--

Any idea what would cause BME socket reading to block indefinitely?

My C script worked fine but the applet blocks on the fifth request read, sixth read if it you include the BMentity reply. I even placed a select call before the reads but it always shows the socket to be ready. To get around this, the applet you have opens, reads and closes the socket every time it requests a value. The charging signal calls the BME update function to change the icon and was requesting a new value every time the charger was unplugged. It seems that requesting a new value too soon after the last can cause the read to block. I've now changed the code so only the 15 second timer requests new values but it might still be possible for some random event to cause read to block and lock up the statusbar. Finding a way to prevent this would not only prevent random lock ups but also use less cpu if it didn't have to open the socket for each request.
 
Posts: 1,101 | Thanked: 1,184 times | Joined on Aug 2008 @ Spain
#705
Originally Posted by auouymous View Post
Duh, I didn't think about mapping them to times. Orange should probably 7 instead of 6 as it one of the max usage times. But 4 and 10 look good for the other two, three hours between each color.
Somehow I like more 6.5
Probably because 7 h is the life I learned to expect because of old osso battery applet.
Originally Posted by auouymous View Post
Battery drops are random events and shouldn't be accounted for.
They aren't that random for me, always seem to happen after a long constant drain, for example listening to music for some hours with the screen off, then when I stop music and leave the device for a couple of minutes the drop happens.
They could be linked to battery brand, since mine is not a Nokia original but a Mugen one. My Nokia one died of old age, so I'm unable to check with one.

Originally Posted by auouymous View Post
Any idea what would cause BME socket reading to block indefinitely?

My C script worked fine but the applet blocks on the fifth request read, sixth read if it you include the BMentity reply. I even placed a select call before the reads but it always shows the socket to be ready. To get around this, the applet you have opens, reads and closes the socket every time it requests a value. The charging signal calls the BME update function to change the icon and was requesting a new value every time the charger was unplugged. It seems that requesting a new value too soon after the last can cause the read to block. I've now changed the code so only the 15 second timer requests new values but it might still be possible for some random event to cause read to block and lock up the statusbar. Finding a way to prevent this would not only prevent random lock ups but also use less cpu if it didn't have to open the socket for each request.
I learned with the python script that BME socket behavior is quite random, sometimes it allows just one reading, other quite a few in a row, then blocks.
Just do like the python script, write the request to the socket, and try to read the result but using a 0.5 or 1 s timeout. If the reading timeouts, then close and open the socket and repeat.
 
Posts: 875 | Thanked: 918 times | Joined on Sep 2010
#706
Originally Posted by maacruz View Post
They aren't that random for me, always seem to happen after a long constant drain, for example listening to music for some hours with the screen off, then when I stop music and leave the device for a couple of minutes the drop happens.
Battery temperature and other environmental and usage patterns can cause the capacity to increase or decrease. For you it could be a 22% difference but not for someone else. The raw value is a good reference as to how much current your device is drawing at any given moment and if you want longer battery life you figure out way to keep it in the lower colors.


Originally Posted by maacruz View Post
I learned with the python script that BME socket behavior is quite random, sometimes it allows just one reading, other quite a few in a row, then blocks.
Just do like the python script, write the request to the socket, and try to read the result but using a 0.5 or 1 s timeout. If the reading timeouts, then close and open the socket and repeat.
Socket reading doesn't support timeouts, python's read is probably just a wrapper for the select/read combo. I think the problem might be BME not returning a full reply, so select sees some data but then read blocks because there isn't enough data. DSME uses a header on each message to allow variable sized messages. You read the header first, extract the length and read the rest of the message. Every BME reply has 96 bits of unknown data at the beginning which might be used to report errors or the type of reply. Wish Nokia would publish docs.
 
Posts: 86 | Thanked: 8 times | Joined on May 2010
#707
Originally Posted by auouymous View Post
You can turn off the drain and cpu indicators in settings. And the drain is the actual current draw and not the % per last hour value that ASUI shows.
OK. I was referring not only to battery drain but the WiFi+bluetooth indicators that were being discussed as integrated into the battery+CPU icon. But you guys can probably come up with a workable design.

Originally Posted by auouymous View Post
Charging has an arrow pointing into the battery since power is being put into it. Drain arrows show power exiting the battery...
I see. I guess I don't find that intuitive. You could support both your case and mine by putting the drain indicator beneath, rather than above, the battery.


Unrelated to the above: on my N800, I'm not getting the battery-charging sound (with ASUI 0.5.8). I haven't lately drained the battery enough to trigger the low-battery sound, so I don't know whether that's working.
 
Posts: 875 | Thanked: 918 times | Joined on Sep 2010
#708
New ASUI and statusbar test binaries.
  • fix: changed sound played on battery low signal
  • fix: statusbar applet plays sounds immediately without dbus lag
  • fix: screenshot plays sound immediately after taking shot without dbus lag
  • tweaked drain indicator icons (red and orange are larger than yellow and gray, yellow is brighter, gray is darker)
  • low battery notifications and sounds at 4, 10 and 16%
  • prevent signals from causing BME requests at less than 15 second intervals
  • battery graph shows total screen on time since last charge point
  • new drain indicator points: 4, 7 and 10 (375, 214 and 150)

The screenshot-tool is launched when it should based on delay, takes about 1.5 to 2 seconds to run and then the sound is played, so this works as best as it can now.

The BME lockup issue is still present...


Originally Posted by mcow View Post
OK. I was referring not only to battery drain but the WiFi+bluetooth indicators that were being discussed as integrated into the battery+CPU icon. But you guys can probably come up with a workable design.
Anything added to the applet will have a setting to disable it. I don't know if I'll use the wifi and bluetooth icons in the battery applet but others have requested it and having all the common control panel applets quickly accessible from the battery menu will be really nice.


Originally Posted by mcow View Post
I see. I guess I don't find that intuitive. You could support both your case and mine by putting the drain indicator beneath, rather than above, the battery.
But hole flow moves out of the positive end of the battery, the top.


Originally Posted by mcow View Post
Unrelated to the above: on my N800, I'm not getting the battery-charging sound (with ASUI 0.5.8). I haven't lately drained the battery enough to trigger the low-battery sound, so I don't know whether that's working.
Do you have system alert volume turned on? Its the top button on ASUI's sound button [system, keys, touch].
 
Posts: 1,101 | Thanked: 1,184 times | Joined on Aug 2008 @ Spain
#709
Originally Posted by auouymous View Post
Battery temperature and other environmental and usage patterns can cause the capacity to increase or decrease. For you it could be a 22% difference but not for someone else. The raw value is a good reference as to how much current your device is drawing at any given moment and if you want longer battery life you figure out way to keep it in the lower colors.
The battery capacity jumps are probably caused by internal resistance and internal charge redistribution, so depending on the design, material's quality and other factors the changes may be different. So, I also think that the raw values are good enough.


Socket reading doesn't support timeouts, python's read is probably just a wrapper for the select/read combo. I think the problem might be BME not returning a full reply, so select sees some data but then read blocks because there isn't enough data. DSME uses a header on each message to allow variable sized messages. You read the header first, extract the length and read the rest of the message. Every BME reply has 96 bits of unknown data at the beginning which might be used to report errors or the type of reply. Wish Nokia would publish docs.
I've been looking at the timeout socket implementation in python and it is done with select and recv with non blocking socket, so you could do the same, a recv function with timeout: wait with select, if select timeouts return timeout, if select shows data ready, read it with recv and check for error on reading, or not reading enough data. This shouldn't fail.
I've used the python script to read bme at many different time intervals for hours with no problem.

Last edited by maacruz; 2011-06-01 at 16:53.
 
tso's Avatar
Posts: 4,783 | Thanked: 1,253 times | Joined on Aug 2007 @ norway
#710
Originally Posted by mcow View Post
Regarding the icons, I think trying to cram too much information into one icon is counterproductive. I'm unconvinced even that there should be a drain-rate indicator in the icon; being able to get to the numeric readout in a single key ought to be enough.

Also: the icon design I saw for drain-rate looks like an upward-pointing arrow. Doesn't it make more sense for the drain rate to be downward-pointing?
Thing is that right now i have two icons that mostly take up space, bluetooth and wifi, as most of the controls they provide are already available via ASUI.

so if basic status of bluetooth (on, off, in use) and wifi (on, off, connected) can be added to the ASUI icon then we are looking at a 2 icon slot save (i have already abandoned advanced backlight, saving a slot there. and back before it existed, there was separate icons for volume and backlight).
__________________
Be warned, posts are often line of thoughts at highway speeds...
 
Reply

Tags
bada blows, bada rox


 
Forum Jump


All times are GMT. The time now is 10:54.