juj / fbcp-ili9341

A blazing fast display driver for SPI-based LCD displays for Raspberry Pi A, B, 2, 3, 4 and Zero
MIT License
1.59k stars 265 forks source link

Low battery option (not GPIO dependant) #285

Open fedekrum opened 1 year ago

fedekrum commented 1 year ago

Hi, Low battery icon is cool but has one limitation. Is hardware dependant. You depend on having one GPIO for it, and probably some hardware to change the state. In my case, I have an UPS that handles all over i2c, so I have made a little control panel for it in bash. I imagine that this can be implemented too in a way that if a file is present somewhere (lets say ram disk /dev/shm/ ) the icon appears on the screen. This will let ANY custom made application put the icon there. For security reasons, we can check if root is the owner or something similar.

Sounds logical? Any other approach?