Author Topic: Battery Utility  (Read 13257 times)

RodrigoCard (OP)

  • *
  • Posts: 314
    • Mac Joystick Apps
Battery Utility
« on: March 06, 2011, 06:56:28 pm »
This theme-able app lets you see the battery charging progress in a fancy way. It also beeps a sound when it reaches 100%, so you know when it is time to turn it off.  ;)

I made this app because the native system battery visualisation is buggy and wanted to be notified when it reaches 100%.
I also like to do something fancy  ;D

some pics attached.

download it here:
http://dl.openhandhelds.org/cgi-bin/dingoo.cgi?0,0,0,0,116,480

v2 released:
http://dl.openhandhelds.org/cgi-bin/dingoo.cgi?0,0,0,0,116,481

changelog:
http://boards.dingoonity.org/dingux-releases/battery-utility/msg28227/#msg28227
« Last Edit: March 09, 2011, 07:35:23 am by RodrigoCard »

Meneer Jansen

  • **
  • Posts: 511
Re: Battery Utility
« Reply #1 on: March 06, 2011, 08:24:40 pm »
Love it!  ;)

P.S. It's for Dingux and you can change theme by editing config.txt.
Finally got me a new Dingoo after I Kentucky ~~::fried::~~ the other one. Yippee! [edit] And lost it!

RodrigoCard (OP)

  • *
  • Posts: 314
    • Mac Joystick Apps
Re: Battery Utility
« Reply #2 on: March 06, 2011, 10:05:20 pm »
Love it!  ;)

P.S. It's for Dingux and you can change theme by editing config.txt.

I forgot to mention this. =P
but people always read the readme.txt files, isn't it? :D

mrkingoo

  • *
  • Posts: 258
Re: Battery Utility
« Reply #3 on: March 06, 2011, 11:09:25 pm »
Cool. Looks nice!

SilverhawkBR

  • *
  • Posts: 390
Re: Battery Utility
« Reply #4 on: March 07, 2011, 01:19:59 am »
Mine crashed with 1:09:34 seconds.

Wtf?...

earphoneboy

  • Guest
Re: Battery Utility
« Reply #5 on: March 07, 2011, 12:55:12 pm »
Very good. Congratulations!

In a future version would be nice if it could calculate how long until the 100% charged.

Brodiaga

  • *
  • Posts: 21
    • Tout pour la Dingoo A320 - Le retrogaming entre vos mains
Re: Battery Utility
« Reply #6 on: March 07, 2011, 06:20:00 pm »
Thanks works very good ^^

RodrigoCard (OP)

  • *
  • Posts: 314
    • Mac Joystick Apps
Re: Battery Utility
« Reply #7 on: March 07, 2011, 08:12:28 pm »
Thanks people, I'm glad you enjoyed the app =)

I noticed that the brightness settings directly affect how much noise the speakers do...
and the brightness values of 0, 50 and 100 makes almost no noise at all... weird!

Is there someone there annoyed about the noise it does when the pulse effect is on?

----

@SilverhawkBR I discovered some small memory leaks that may makes the app crash after some time if the swap is not enabled, not acceptable for an app that is made to be running for long time, isnt it?  ;D

I aparently fixed this issue, since im charging my dingoo for about 3h30 and no signs of crash \o/
I probably will release this quick fix tonight if my dingoo do not crash.

Quote
Very good. Congratulations!

In a future version would be nice if it could calculate how long until the 100% charged.

Well, I have no idea how to estimate this thing, since there is no linear pattern of charging, and my two dingoos take different amount of time to charge to 100%, and even its "100% values" is a bit different, this is why I let the user change these values in "battinfo.txt" if it does not feel right.

Also, You can take a full charge and wait the beep, look the timer and know how much time your dingoo would take to charge the next time =P

SilverhawkBR

  • *
  • Posts: 390
Re: Battery Utility
« Reply #8 on: March 07, 2011, 10:50:36 pm »
The screen brightness variation makes the % vary sometimes, so it beeps more than one time when 100%  ;D

RodrigoCard (OP)

  • *
  • Posts: 314
    • Mac Joystick Apps
Re: Battery Utility
« Reply #9 on: March 08, 2011, 02:40:41 am »
I already fixed the memory leaks and updated the file in openhandhelds.
But it says:
Success: File Submitted. The file has been submitted. You will be notified by email when it has been processed.


Updating apps is not instantaneous like the first submission?
It still is not appearing to me =(

The screen brightness variation makes the % vary sometimes, so it beeps more than one time when 100%  ;D

the variation is not caused by the animation, you can disable it by pressing R+X and see.
not my fault :)

mate

  • *
  • Posts: 9
Re: Battery Utility
« Reply #10 on: March 08, 2011, 03:38:51 pm »
beeping with brightness setting is a bug in gmenu2x, i believe. to the app itself, yeah, it crashes every now and then for me :-/ will try the new version

SilverhawkBR

  • *
  • Posts: 390
Re: Battery Utility
« Reply #11 on: March 08, 2011, 11:12:42 pm »
I had an idea for the sugestion given. (calculating how much time is left)

Supose, my dingoo has already 50% (exactly) of charge when i start the util. The util would start a internal timer. Once i have 51% charged, the timer stops. Then, it would do the following:

100 - 51 = 49
49 x Y =  (being Y the time it takes for 1% charge)

Z (time to fully charge).  If you didnt understand, just post back and ill post in portuguese...

RodrigoCard (OP)

  • *
  • Posts: 314
    • Mac Joystick Apps
Battery Utility Updated to Version 2
« Reply #12 on: March 09, 2011, 12:45:07 am »
UPDATED VERSION:
http://dl.openhandhelds.org/cgi-bin/dingoo.cgi?0,0,0,0,116,481

I tryed to update the v1 file archive but seens that this is not working, so I uploaded a new one.

CHANGE LOG:

+ fixed memory leaks that make it crash after a hour some times. (forgot some SDL_Freesurface()s :P)
     I run it for 7h without crash! Guaranted to be stable now =)
+ added a option to set how much brightness you want when idle (and with pulse anim off),
      so you can set it to 0 and the screen will turn off automatically after 10 seconds.



RodrigoCard (OP)

  • *
  • Posts: 314
    • Mac Joystick Apps
Re: Battery Utility
« Reply #13 on: March 09, 2011, 01:01:12 am »
Here is the shortcut list:

R (or L) + X = Toggle pulse animation (when off, it just dim the brightness)
R (or L) + (A ou B ou Y) = Toggle screen info.
START = turn off the explanation message
SELECT = exit


(...) to the app itself, yeah, it crashes every now and then for me :-/ will try the new version

I fixed the crash bug, you can download it here:
http://dl.openhandhelds.org/cgi-bin/dingoo.cgi?0,0,0,0,116,481

I had an idea for the sugestion given. (calculating how much time is left)

Supose, my dingoo has already 50% (exactly) of charge when i start the util. The util would start a internal timer. Once i have 51% charged, the timer stops. Then, it would do the following:

100 - 51 = 49
49 x Y =  (being Y the time it takes for 1% charge)

Z (time to fully charge).  If you didnt understand, just post back and ill post in portuguese...

I can read english without problems man, and write somewhat okay... I have problem to talk =P
So, yes, I understood, but it wont work well...

Let me explain:
The graph of the charge function is not linear is somewhat like this:

(the red one)
I need a different equation to achieve what you are saying...
« Last Edit: March 09, 2011, 01:22:00 am by RodrigoCard »

SilverhawkBR

  • *
  • Posts: 390
Re: Battery Utility
« Reply #14 on: March 09, 2011, 01:36:04 am »
So, its not something 100% stable. But you see, that equation can loop, as soon as it increases 1%, the equation is done, it gives you a estimate, AND start the timer again, looping forever...

Of course, if variations are a way too big, it wont work. And, most dingoo's are:
3200 - Dead battery
4100 - Fully Charged

So, if you want too do 10 points calculation, be my guest, but i guess it would vary even more...
Also, we dont really need something 100% precise, even if it has a 20min error margin, its just to have some idea of how much time is left  ;)
Of course, you can try it out to see if it works.

Edit: i done a small research, the equation for that graph you posted is...

f-?(x)=1+√x

That...is somehow...strange...but it might work.
« Last Edit: March 09, 2011, 01:58:58 am by SilverhawkBR »

RodrigoCard (OP)

  • *
  • Posts: 314
    • Mac Joystick Apps
Re: Battery Utility
« Reply #15 on: March 09, 2011, 01:51:11 am »
well, I may do this in future, but not now, I'm busy making a game =)

Btw, How much time your dingoo take to charge? My Unpawned model takes 7h (!), And I think the other one takes less time, and lasts longer, needs testing to confirm...

SilverhawkBR

  • *
  • Posts: 390
Re: Battery Utility
« Reply #16 on: March 09, 2011, 02:00:09 am »
Check back, i posted a new equation (edit post)

How much? I think mine takes 3~4 hours....

Quote
Edit: i done a small research, the equation for that graph you posted is...

f-?(x)=1+√x

That...is somehow...strange...but it might work.

Cheers, and good luck.

samir

  • *
  • Posts: 344
Re: Battery Utility
« Reply #17 on: March 09, 2011, 11:19:17 pm »
Thanks for this great app, man!  ;D My Dingoo takes +-7 hours to charge via USB, and +- 4:30 hours via wall charger.

Meneer Jansen

  • **
  • Posts: 511
Re: Battery Utility
« Reply #18 on: March 10, 2011, 02:49:12 pm »
Edit: i done a small research, the equation for that graph you posted is...

f-?(x)=1+√x
That would mean that one can charge a battery to an infinite amount of Volts. It's sooner something like:

V = 100% - EXP (-t)

(or: f(x) = 1 - exp (-x)). ;)
Finally got me a new Dingoo after I Kentucky ~~::fried::~~ the other one. Yippee! [edit] And lost it!

StreaK

  • *
  • Posts: 26
Re: Battery Utility
« Reply #19 on: March 13, 2011, 04:50:27 pm »
On DT A-330 im getting wrong informations from Battery Utility:

- There always info saying "charging" even when im using it on battery :]
- Indicator informs that full charge gives 91% on percentage bar, strange.

cheers
StreaK

 

Post a new topic