Auto-adapt HDMI resolution
This commit is contained in:
@@ -1,32 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
if [ $# != 3 ]; then
|
|
||||||
echo "Usage: $0 <width> <height> <rotation>"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
WIDTH="$1"
|
|
||||||
HEIGHT="$2"
|
|
||||||
ROTATION="$3"
|
|
||||||
|
|
||||||
if [[ ! "$WIDTH" =~ ^[0-9]+$ ]]; then
|
|
||||||
echo "Invalid width '$WIDTH'."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ! "$HEIGHT" =~ ^[0-9]+$ ]]; then
|
|
||||||
echo "Invalid height '$HEIGHT'."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ! "$ROTATION" =~ ^[0-3]$ ]]; then
|
|
||||||
echo "Invalid rotation '$ROTATION'."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
OPTIONS="framebuffer_width=$WIDTH "
|
|
||||||
OPTIONS+="framebuffer_height=$HEIGHT "
|
|
||||||
OPTIONS+="display_rotate=$ROTATION"
|
|
||||||
|
|
||||||
edit-boot-config $OPTIONS
|
|
||||||
@@ -29,8 +29,7 @@ if $UPDATE_AVR; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Update config.txt
|
# Update config.txt
|
||||||
./scripts/edit-boot-config max_usb_current=1
|
./scripts/edit-boot-config max_usb_current=1 config_hdmi_boost=8 hdmi_force_hotplug=1 hdmi_group=2 hdmi_mode=82
|
||||||
./scripts/edit-boot-config config_hdmi_boost=8
|
|
||||||
|
|
||||||
# TODO Enable GPU
|
# TODO Enable GPU
|
||||||
#./scripts/edit-boot-config dtoverlay=vc4-kms-v3d
|
#./scripts/edit-boot-config dtoverlay=vc4-kms-v3d
|
||||||
|
|||||||
1
setup.py
1
setup.py
@@ -34,7 +34,6 @@ setup(
|
|||||||
'scripts/sethostname',
|
'scripts/sethostname',
|
||||||
'scripts/reset-video',
|
'scripts/reset-video',
|
||||||
'scripts/config-wifi',
|
'scripts/config-wifi',
|
||||||
'scripts/config-screen',
|
|
||||||
'scripts/edit-config',
|
'scripts/edit-config',
|
||||||
'scripts/edit-boot-config',
|
'scripts/edit-boot-config',
|
||||||
'scripts/browser',
|
'scripts/browser',
|
||||||
|
|||||||
Reference in New Issue
Block a user