Actions
Bug #842
closedUpdate pibox-config in pibox-hdmi
Start date:
13 Jun 2021
Due date:
% Done:
100%
Estimated time:
Severity:
01 - Critical
Description
When switching between hdmi and tft with pibox-hdmi the pibox-config file needs to be updated for the next boot so apps can know how to scale themselves. This is usually done on firstboot but now needs to be done again on each reboot.
Unfortunatley, the current method uses tvservice -s to identify screen resolution. But that doesn't work with TFT displays. So what has to happen is:
- Going to TFT
- pibox-hdmi manually updates /etc/pibox-config with display size (second line of file as WxH, no other text)
- Going to HDMI
- pibox-hdmi uses tvservice -s to update /etc/pibox-config display size
The first uses the hard coded framebuffer_width and framebuffer_height in config.txt (placed there by the lcdshow package installation). The second rereads the hardware config with tvservice. In both cases the update uses sed:
sed -i "2s/.*/${framebuffer_width}x${framebuffer_height}/" /etc/pibox-config
Actions