Closed Giannie closed 3 years ago
This is still not ready to be used as a library function. The caller must know how to create a socket, find the port number and loop until it gets the battery level.
My suggestion is to make a wrapper function around get existing one that only receives the MAC address and does the rest of the work by itself.
This could now be closed in favor of #66. This PR was inactive for a long time anyway.
I have changed the output of the batter level command to return just the percentage so that the the code can be used as an external library for other applications. I have also renamed the function to more accurately represent what it does.
I did this so that it could be used for example for a status bar like i3bar or polybar.