Author Topic: pyBattery  (Read 7319 times)

malloc (OP)

  • Posts: 11
pyBattery
« on: October 26, 2014, 09:28:07 pm »
Hello.
Here's the release pyBattery. Displays Info for battery, usb and dc.
Fast script written in python based on pyClock



Version history
0.1
Initial release
Download opk: https://www.dropbox.com/s/bneeryrkutc1aju/pyBattery-0.1.opk?dl=0
Source code: https://www.dropbox.com/s/uctpvzqgm9837jx/pyBattery.dge?dl=0
« Last Edit: October 27, 2014, 04:33:26 pm by malloc »

alexandrevicenzi

  • Posts: 46
    • My GitHub
Re: pyBattery
« Reply #1 on: October 27, 2014, 10:48:34 am »
No screenshot and source code?  ::)

pcercuei

  • Posts: 1689
    • My devblog
Re: pyBattery
« Reply #2 on: October 27, 2014, 11:28:35 am »
No screenshot and source code?  ::)
It's a Python script, so the executable is the source code.

malloc (OP)

  • Posts: 11
Re: pyBattery
« Reply #3 on: October 27, 2014, 04:00:25 pm »
added sourcecode link
added screenshot

next relase better UI  ;)

zear

  • * Moderator
  • Posts: 2381
Re: pyBattery
« Reply #4 on: October 27, 2014, 04:04:53 pm »
I'm getting error 403 on these images. Are you sure they are set for public viewing?

malloc (OP)

  • Posts: 11
Re: pyBattery
« Reply #5 on: October 27, 2014, 04:36:00 pm »
fixed

alexandrevicenzi

  • Posts: 46
    • My GitHub
Re: pyBattery
« Reply #6 on: October 29, 2014, 03:17:04 pm »
No screenshot and source code?  ::)
It's a Python script, so the executable is the source code.

I didn't know about extracting files inside an OPK (unsquashfs).   ???

alexandrevicenzi

  • Posts: 46
    • My GitHub
Re: pyBattery
« Reply #7 on: October 29, 2014, 03:18:14 pm »
I have a similar app called Baterry at https://github.com/alexandrevicenzi/gcw_battery

Eliwood_san

  • Posts: 255
Re: pyBattery
« Reply #8 on: November 04, 2014, 02:57:20 am »
Thanks for the app,but i have a question why my gcw zero its showing 92% percentage of the battery? I fully chargerd my gcw zero and its showing that number (92%) its supposed to get 100% of the battery fully charged....Do i need to calibrate my battery? if the answer its yes can anyone show me how to calibrate the battery of my gcw zero?

zear

  • * Moderator
  • Posts: 2381
Re: pyBattery
« Reply #9 on: November 04, 2014, 10:26:16 am »
That's because these numbers are highly inaccurate. The reason we don't show battery percentage in gmenu2x.

Eliwood_san

  • Posts: 255
Re: pyBattery
« Reply #10 on: November 05, 2014, 01:20:48 am »
That's because these numbers are highly inaccurate. The reason we don't show battery percentage in gmenu2x.

So tell me it cant? be fixed the battery percentage issue with a firmware update right?

zear

  • * Moderator
  • Posts: 2381
Re: pyBattery
« Reply #11 on: November 05, 2014, 02:15:14 am »
That's because these numbers are highly inaccurate. The reason we don't show battery percentage in gmenu2x.

So tell me it cant? be fixed the battery percentage issue with a firmware update right?
We simply don't know more accurate numbers. We'd need to measure the voltage of dozens of batteries when they discharge to come up with a better model.
So yes, I think that's something that could be improved with a firmware update, but it won't happen.

pcercuei

  • Posts: 1689
    • My devblog
Re: pyBattery
« Reply #12 on: November 06, 2014, 11:49:57 am »
The 100% number corresponds to POWER_SUPPLY_VOLTAGE_NOW being equal to POWER_SUPPLY_VOLTAGE_MAX_DESIGN.
Which never happens; this "max design" number is a number that we selected as being the max capacity of the battery, but it's totally arbitrary. If enough people give us their "voltage max design" number, on recent enough devices, we could adjust that value better.

malloc (OP)

  • Posts: 11
Re: pyBattery
« Reply #13 on: November 06, 2014, 07:24:58 pm »
The 100% number corresponds to POWER_SUPPLY_VOLTAGE_NOW being equal to POWER_SUPPLY_VOLTAGE_MAX_DESIGN.
Which never happens; this "max design" number is a number that we selected as being the max capacity of the battery, but it's totally arbitrary. If enough people give us their "voltage max design" number, on recent enough devices, we could adjust that value better.
good news !!! :)

I have also problems with the accuracy of the battery.

I'm thinking about making a version that users can report gcw0 value of POWER_SUPPLY_VOLTAGE_MAX_DESIGN

but I have doubts on how to do
when you say "enough on Recent devices" What gcw0 units are adequate?

on how to report the data I have thought of two:
easy:
Exporting a file from the application to the memory of gcw0. The user makes a post in the forum with the file.

nice one:
I have a NAS at home 24/7. I can prepare a PHP receive and store the values in MySQL

To do this it is necessary to identify which sends data gcw0 something like MAC, S / N ...

I would go either some advice.


sorry for my English I used google translate

Eliwood_san

  • Posts: 255
Re: pyBattery
« Reply #14 on: November 10, 2014, 12:20:10 am »
Count with me to send my battery values to improve it to the next firmware update ;)

Qubits

  • Posts: 146
Re: pyBattery
« Reply #15 on: May 25, 2016, 03:52:49 am »
How can i set a black background instead of blue ?

kaio

  • Posts: 216
    • All about GCW-Zero on Russian + Repo
Re: pyBattery
« Reply #16 on: May 25, 2016, 08:21:48 am »
How can i set a black background instead of blue ?
You must download source code (dge file) and edit line 67:
Code: [Select]
bg_color = [ 0 , 0 , 255 ]... and create a new opk file...
GCW-Zero | JXD S602

Qubits

  • Posts: 146
Re: pyBattery
« Reply #17 on: May 25, 2016, 08:55:44 am »
I've tried but it doesnt work, the opk install on my gcw but when i launch it, it shows a black screen and go back to the applications page... Here is a screenshot, any idea of what i've done wrong ?

kaio

  • Posts: 216
    • All about GCW-Zero on Russian + Repo
Re: pyBattery
« Reply #18 on: May 25, 2016, 09:07:34 am »
You must use a "Terminal" option and "unix" eol, not windows. Don't use notepad to edit a dge file.
« Last Edit: May 25, 2016, 09:10:16 am by kaio »
GCW-Zero | JXD S602

Qubits

  • Posts: 146
Re: pyBattery
« Reply #19 on: May 25, 2016, 10:18:50 am »
Thx, i've managed to customize it like i wanted.


 

Post a new topic
Post a new topic