Project

General

Profile

Bug #842

Updated by Hammel almost 3 years ago

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) file) 
 * 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 value in config.txt pibox-hdmi (placed there by the lcdshow package installation). build based on TFT type).    The second rereads the hardware config with tvservice. config.    In both cases the update uses sed: 

  sed -i "2s/.*/${framebuffer_width}x${framebuffer_height}/" /etc/pibox-config

Back