Start a new topic

Battery status display on desktop pannel

Right now you can type "pt-status" in a console window, but there is no continuous battery status display while you are on the desktop.


I have therefore created a little program to display the pi-top battery status on the desktop. It displays a small icon on the task bar.


To download, use the browser and navigate to github.com

Then search in github for pi-top-battery-status


Installation instructions are there.


Questions and suggestions for improvement are most welcome.


I run pi-top's i2c clock at 50,000. At about that number I get the least i2c errors. 30,000 and lower, or 70,000 and higher, give me an unreliable pi-top. The window of low i2c failure rate is much wider when using bqStudio (by Texas Instruments) compared to Rpi 3. Did anyone try an i2c repeater? There's a Technical Note on TI's web site about using an i2c repeater.

 

Many thanks to all the supporters and users of the battery status indicator at github.com/rricharz/pi-top-battery-status and all the positive feedback. More than 1000 downloads last year!

2 people like this

The battery status program (link above) works well with pi-topOS Polaris.

Rene I reported this issue about 2 weeks ago with a fully charged battery showing an error message until the power cord was disconnected - it appears to be a binary assumption in the code ie its either charging with time left to full or discharging with time left for use with no logical outcome provided for fully charged. I'd love to know of course...

I will look into this right away.
Alexandra, the estimated life time is calculated by the intelligent battery controller based on the actual discharging current and the actual charge. Unfortunately the intelligent battery controller cannot provide an estimated life time if it is not discharging, because under these circumstances it is not known how much current will be drawn from the battery once discharging starts. You need therefore to pull the plug if you need an estimated life time.
But given the methodology, the Pi-Top code has not provided a solution. At least the coding standard is high enough to not crash the whole OS as I would have. I am concerned also that suddenly topics are being removed from the community forum without any prior agreement with the participants of said discussion! The battery charging topic is a prime example of a model of cooperation, mutual support and indignity by those who were injured by their experiences, but later encouraged to join in. This is as a model fit for future reference? My reference to the loss of Capsllock function during sign-in is a major disadvantage to Disabled users who will because of the restricted environment struggle to recognise the cause of their being unable to sign-in and will suffer great loss of time while they negotiate resetting their password and probably like myself suffer the indignity of being again refused access to their account with heir new password! These changes appear random and as yet I have seen no listing of the changes implemented with the new Polaris OS. I felt the mouse focus was correctly set during sign-in with the previous version, this has now gone, instead the keyboard is king. There is an international standard for both mouse and keyboard shortcuts and focus shifts agreed to enable the efficient use of both mouse and cursor and to enable keyboard operatives full navigation and control as much as GUI users. But this is not so that they are in competition with each other. I believe my declaration of the battery level error is also now gone! Overall chaos, instability and inconvenience.
Link to the battery display: github.com/rricharz/pi-top-battery-status

Thank you Rene.

Alexandra

A general principle of GUI could be that items critical to the good running of a device are self explanatory rather than a celebration of the cryptic for an exclusively well informed clique. 


Regardless of the ubiquitous power of the Internet, it cannot be ignored that a portable device may be carried to an environment where communications with a well informed group of likewise device users is not possible for a duration that renders the device unusable or permanently damaged. For a professional user just as for anybody who has paid good money, this is not a positive result.


We are learning by example how to improve our own as well as others experience of a technical and well appreciated product. Hoping for a commercial success for all contributors in future?


I do hope this helps?

Mine says that the battery status is unknown. Is there a fix to this? BTW I'm to to Pi-Top

How do i delete this?

Hi!


m_access-4 : pi-top test application


ScreenDump.txt : result


m_access-4.c : source Code


makefile : "make" command


- console window


- cd Downloads


- put all files into the "Downloads" folder


- sudo m_access-4


Success!


Please pi-top Team, do not simply delete this entry, At the very least tell me why you have objections me placing this onto the forum.

(98 Bytes)
(11.2 KB)
txt
(2.31 KB)
c
(18.8 KB)

I've been trying to get this app working in my account instead of needing to login as 'pi'. I edited the Install and Uninstall scripts, and gtk_battery.c files. Making the app succeeds, and when I run the Install script it succeeds and the icon appears in the Panel with the battery level. But when I reboot the Pi-Top and login the app won't autostart, and the only way I've found so far to get it running is to rerun Install.


What have I missed? How do I go about getting this app to run in my non-pi account? Thanks!

Bruce, sorry that it took a few days to modify and test pi-top-battery-status to work for any user with the proper privileges. You should now be able to install it for other users than pi. Please see the comment at the bottom of the readme.md file about adding the necessary privileges for other users. Please let us know whether it works now for you.


The link to the program is github.com/rricharz/pi-top-battery-status

Login or Signup to post a comment