Browse Source

fix resolution after startup

main
Hendrik Langer 6 years ago
parent
commit
741960eac2
  1. 7
      README.md
  2. 6
      raspberry-environment/display.py

7
README.md

@ -12,6 +12,7 @@
## Other features
* you can call freeze.exe with the cmdline argument "single" to just do one screenshot, save it and exit
* if HDMI is connected after USB(Power): the device will switch to 1920x1080-32
# Initial setup
@ -88,7 +89,5 @@ mount -o remount,rw /boot
## ToDo
* korrekte auflösung bei desktop-scaling
* zu viel overscan
* hdmi korrekt konfigurieren wenn nach boot erst angeschlossen
* zeit knopfdruck bis anzeige soweit möglich optimieren
* Iconwechsel wenn kein RPi angeschlossen
* Windows Installer (cpack)

6
raspberry-environment/display.py

@ -252,8 +252,10 @@ if __name__ == '__main__':
_stdout, _stderr = p.communicate()
if (len(_stdout) > 0 and _stdout == fallback_str):
subprocess.run('tvservice --explicit="CEA 16 HDMI"', shell=True, check=False)
subprocess.run(['fbset', '-fb', '/dev/fb0', '-depth', '16'], shell=False, check=False)
subprocess.run(['fbset', '-fb', '/dev/fb0', '-depth', '32'], shell=False, check=False)
#subprocess.run(['fbset', '-fb', '/dev/fb0', '-depth', '16'], shell=False, check=False)
time.sleep(0.5)
subprocess.run('fbset -fb /dev/fb0 -a -g 1920 1080 1920 1080 32', shell=True, check=False)
time.sleep(0.5)
def callback(paths):

Loading…
Cancel
Save