Notices


Reply
Thread Tools
Posts: 70 | Thanked: 6 times | Joined on Dec 2009
#41
In my case batlevel uses about 2-5 % of CPU constantly. But i only experienced a slightly decrease in battery life.

My question is if its only waiting to recieve the percentage and not polling it is this normal?
 
krk969's Avatar
Posts: 754 | Thanked: 630 times | Joined on Sep 2009 @ London
#42
Originally Posted by donsaibot View Post
In my case batlevel uses about 2-5 % of CPU constantly. But i only experienced a slightly decrease in battery life.

My question is if its only waiting to recieve the percentage and not polling it is this normal?
it depends, generally polling is bad, but then it depends on the interval of polling and what it takes to poll, if its running a command, checkng a file etc.
in this case I think polling would be more expensive as Ill have to
1. either run lshal command and get the value
2. get the value by registering to the dbus service.

QT mobility api's already do that and inform the app when the percentage level changes, of course its using the dbus in the background.

but either ways we cant have a "home desktop" app that takes almost zero percentage cpu to display some realtime info.
 
Posts: 64 | Thanked: 130 times | Joined on Dec 2009
#43
Try experimenting around with "hal-device bme|grep erc". It uses about 6 % of the CPU time of "lshal|grep erc". Put 'time' in front of the command to get timed result.

Also it might help to get it into a sleep state whenever the screen is off. For example you can see the desktop clock showing old time for a moment before it is updated to current time. And given the battery will last at least some 3 hours of very intensive usage, the time it takes for battery to drop a single percentage is about 2 minutes at lowest. Thus, the polling interval could be even lower if there is no way to make the program sleep when screen is off. Possibly allow user to configure it to his liking.

Also would be nice if the widget could show the battery percentage in place of the normal battery display next to the clock. Like "systeminfowidget" shows CPU and MEM usage there. Possibly make it user configurable where it is shown.

As for the 'click' for more information. The widget could add "Battery information & config" button into the menu that opens when you click the clock. Like "systeminfowidget" does few features.

If it isn't possible to get the widget to show in 'add widget' area, it can be made as automatically active when installed as many other widgets are. Like "systeminfowidget" works.
 

The Following User Says Thank You to Phantasm For This Useful Post:
krk969's Avatar
Posts: 754 | Thanked: 630 times | Joined on Sep 2009 @ London
#44
Batlevel - 2.1 is in extras testing now
This has a user configurable polling interval, and it doesnt use QT mobility anymore, so you wont need extra dependencies and I think this will be less heavy also on battery due to the configurability. The other eye candy stuff Ive kept the same
Attached Images
 

Last edited by krk969; 2010-02-07 at 19:13.
 

The Following User Says Thank You to krk969 For This Useful Post:
krk969's Avatar
Posts: 754 | Thanked: 630 times | Joined on Sep 2009 @ London
#45
Improved Batlevel - 2.1-2 is in extras-devel repository now.

2 major changes since the above update.

1. It doesnt poll now when the screen is OFF so saving battery to a large extent.
2. The settings GUI has been changed a bit for better usability, and some warnings have been included to inform the operations.

screenshot below.
Attached Images
 
__________________
Developer of :
Buddy - budget/expense manager ( website )
Showtime - a telly channel listing viewer/reminder ( website )
Travelapp - london underground status/planner ( website )
Batlevel - desktop widget for battery level ( website )

“I hear and I forget. I see and I remember. I do and I understand.”
 

The Following User Says Thank You to krk969 For This Useful Post:
Posts: 3,617 | Thanked: 2,412 times | Joined on Nov 2009 @ Cambridge, UK
#46
Originally Posted by krk969 View Post
Improved Batlevel - 2.1-2 is in extras-devel repository now.

2 major changes since the above update.

1. It doesnt poll now when the screen is OFF so saving battery to a large extent.
This seems to cause some issues here. I'm guessing that it will only update if the screen is ON and it hits the update interval. In practice this means it never updates for me. Is it possible to either always update when the screen transitions to on, or to "queue" an update if the update timer fires when the screen is off?
 

The Following User Says Thank You to Rob1n For This Useful Post:
krk969's Avatar
Posts: 754 | Thanked: 630 times | Joined on Sep 2009 @ London
#47
Originally Posted by Rob1n View Post
This seems to cause some issues here. I'm guessing that it will only update if the screen is ON and it hits the update interval. In practice this means it never updates for me. Is it possible to either always update when the screen transitions to on, or to "queue" an update if the update timer fires when the screen is off?
thanks rob. i noticed that too. have a fix already in my mind for it.
will try and upload it today in the eve.
you can tap the widget to update it on the go. i missed to say that. but that will open a window with details also
as you said what i can do is update every time the screen comes on.
ill also make the polling interval step to 30 sec to help further..
__________________
Developer of :
Buddy - budget/expense manager ( website )
Showtime - a telly channel listing viewer/reminder ( website )
Travelapp - london underground status/planner ( website )
Batlevel - desktop widget for battery level ( website )

“I hear and I forget. I see and I remember. I do and I understand.”
 

The Following User Says Thank You to krk969 For This Useful Post:
krk969's Avatar
Posts: 754 | Thanked: 630 times | Joined on Sep 2009 @ London
#48
Batlevel version 2.1-3 is now in extras-devel.

Changes as discussed above:
1. the level is updated once immediately when the screen turns on then the polling timer kicks in.
2. the polling timer now runs in seconds, didnt find any point having it in minutes as we dont have the screen on for a long time. Ive given a max 500sec polling timer default is 10 seconds, but of course this is adjustable in the settings.
__________________
Developer of :
Buddy - budget/expense manager ( website )
Showtime - a telly channel listing viewer/reminder ( website )
Travelapp - london underground status/planner ( website )
Batlevel - desktop widget for battery level ( website )

“I hear and I forget. I see and I remember. I do and I understand.”
 

The Following User Says Thank You to krk969 For This Useful Post:
eitama's Avatar
Posts: 702 | Thanked: 334 times | Joined on Feb 2010 @ Israel.
#49
Hello krk,

I'd like to write my own PyQt widget, and I didn't really find a good doc yet on how to do it.

My steps would be :
1. Use QT Desinger to design the widget and it's configuration window.
2. Use Pyuic4 to create the PY file from the UI file
3. Add functionality to the py file with some editor using py code
4. Now how do I make it run like a widget?

Thx.
Eitam.
 
krk969's Avatar
Posts: 754 | Thanked: 630 times | Joined on Sep 2009 @ London
#50
Originally Posted by eitama View Post
Hello krk,

I'd like to write my own PyQt widget, and I didn't really find a good doc yet on how to do it.

My steps would be :
1. Use QT Desinger to design the widget and it's configuration window.
2. Use Pyuic4 to create the PY file from the UI file
3. Add functionality to the py file with some editor using py code
4. Now how do I make it run like a widget?

Thx.
Eitam.
Im not an expert with Python and developing using PyQT, but in QT there was this
widget attribute(WA_QMaemo5DesktopApplet) that was available for a brief while and that had worked. This could have probably been used to set your widget as a destkop applet in python.
But this has been removed, check my post here.

Maybe you could still try using the HD_TYPE_HOME_PLUGIN_ITEM atom ive mentioned in the post. Thats what I had to revert to.
__________________
Developer of :
Buddy - budget/expense manager ( website )
Showtime - a telly channel listing viewer/reminder ( website )
Travelapp - london underground status/planner ( website )
Batlevel - desktop widget for battery level ( website )

“I hear and I forget. I see and I remember. I do and I understand.”
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 04:53.