PADD
PADD copied to clipboard
PADD 3.8.0 display error with 3.5" PiTFT
After the update to padd 3.8.0 at least the first line above with the details of the versions of pihole, web and padd is missing.
Is there some real error message shown? Or only the misalignment? Could you add a screenshot or photo?
only the misalignment without real error message.
Sorry for the bad quality.
Same issue here with a Hyperpixel 4 display
Thanks I think I know where this is coming from. It's probably due to the two new lines adding model and inteface.
Maybe you can correct something there so that it fits again.
What do you want me to remove instead?
Please run stty size
and post the output. I need to see how big the terminal is.
Everything above 79x25 is considered mega
so far and assumed there are enough lines
https://github.com/pi-hole/PADD/blob/380636a96ac5a7f76291d994b901879709b9af4f/padd.sh#L926
26 - 27 - 28 in a row. I think we should go for 28.
tiny
and mini
are broken as well.
root@pihole:~# stty size 59 183
And tput cols
and tput lines
root@pihole:~# tput cols 183 root@pihole:~# tput lines 59
But then it should easily fit...
https://github.com/pi-hole/PADD/blob/380636a96ac5a7f76291d994b901879709b9af4f/padd.sh#L1108-L1109
So we get console_width=183
and console_height=59
wich passes
https://github.com/pi-hole/PADD/blob/380636a96ac5a7f76291d994b901879709b9af4f/padd.sh#L926-L934
And we should get size mega
I compared it, the code is identical, but what can I say, 1 line is missing at the top.
Is there a solution? Thanks a lot for your efforts!
I haven't figured out one yet. I don't know why it does not fit, although there are enough lines. The trivial solution would be to remove newly added lines. In the next few days I won't have time to work on this. In the meantime you could just use the previous version.
OK, we will wait, thanks! Sorry, by the way there are 2 lines that are not displayed when I look very closely...26 lines are displayed in version 3.7.1.
I have a PiTFT 3.5" and have the exact same issue with the line being cut off. Went back to previous (also because of other bug).
For reference, since the values are different than previous user.
pi@pihole:~ $ tput cols 364 pi@pihole:~ $ tput lines 89
What do you want me to remove instead?
The logical things to remove would be the two new items. For now I'm sticking with 3.7.1, so same difference, for me.
Possibly split some information out a tab or two instead of having separate lines, if possible.
fix coming soon?
@Falconcrest
root@pihole:# tput cols 183 root@pihole:# tput lines 59
@nineteenletterslong
pi@pihole:~ $ tput cols 364 pi@pihole:~ $ tput lines 89
I spend some thoughts on this today and I think I know why the numbers are so high: did you run those commands in a terminal connected via ssh
to your RPi? They certainly reflect the size of your terminal on your device accessing the Pi, but not the terminal displayed at your RPi display. Could you run those commands directly
on the Pi so we get the numbers from the actual Pi dispaly?
Great point!
Just plugged a keyboard in and ran it on the pi (again, PiTFT 3.5")
pi@pihole:~ $ tput cols 80 pi@pihole:~ $ tput lines 26
Thanks, this looks reasonable.
I would confirm the information from @nineteenletterslong. In the absence of a currently unavailable keyboard, I counted. ;-)
I fixed the issue. In "mini", IP is now shown next to hostname. In "tiny" I had to sacrifice the IPv6 address. In "regular" and "slim" I removed the device model and IPv6 address but added an IPv6 checkbox. In "mega" I combined DNS with the DHCP section.
Testing and feedback welcome. You can find this version at
https://raw.githubusercontent.com/pi-hole/PADD/0b4351c3adf2069d63a7b2c0cba890ab165802d1/padd.sh
P.S. The red "DNSSEC" on "mega" is fixed already
It works! A very, very good job! Thank you, it was worth the wait.
Works great, still have red DNSSEC though but thanks for your efforts
also you probably should probably put a space after the DHCP title line to keep it in accordance with how the other lines are. Maybe put a few spaces before it to make it look a little more separate from DNS, or whatever you feel like
In small screens you can combine a shorter uptime
text and cpu temp
on a single line.
To get a shorter uptime
you can use:
system_uptime=$(awk '{print int($1/86400)"d:"int(($1%86400)/3600)"h:"int(($1%3600)/60)"min"}' '/proc/uptime')
It will return something like this:
5d:13h:41min
You can use an even shorter string using:
system_uptime=$(awk '{print int($1/86400)"d:"int(($1%86400)/3600)"h"}' '/proc/uptime')
5d:13h