pretty scaling
This commit is contained in:
parent
3050ae6466
commit
d69eda94a2
1 changed files with 14 additions and 7 deletions
|
|
@ -141,7 +141,7 @@ reconfig() {
|
||||||
|
|
||||||
function softwareinstall() {
|
function softwareinstall() {
|
||||||
echo "Installing Pre-requisite Software...This may take a few minutes!"
|
echo "Installing Pre-requisite Software...This may take a few minutes!"
|
||||||
apt-get install -y fbi git python-pip python-smbus python-spidev evtest tslib libts-bin 1> /dev/null || { warning "Apt failed to install software!" && exit 1; }
|
apt-get install -y bc fbi git python-pip python-smbus python-spidev evtest tslib libts-bin 1> /dev/null || { warning "Apt failed to install software!" && exit 1; }
|
||||||
pip install evdev 1> /dev/null || { warning "Pip failed to install software!" && exit 1; }
|
pip install evdev 1> /dev/null || { warning "Pip failed to install software!" && exit 1; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -275,7 +275,7 @@ function install_fbcp() {
|
||||||
echo "Downloading rpi-fbcp..."
|
echo "Downloading rpi-fbcp..."
|
||||||
cd /tmp
|
cd /tmp
|
||||||
#curl -sLO https://github.com/tasanakorn/rpi-fbcp/archive/master.zip
|
#curl -sLO https://github.com/tasanakorn/rpi-fbcp/archive/master.zip
|
||||||
curl -sLO https://github.com/PaintYourDragon/rpi-fbcp/archive/master.zip
|
curl -sLO https://github.com/adafruit/rpi-fbcp/archive/master.zip
|
||||||
echo "Uncompressing rpi-fbcp..."
|
echo "Uncompressing rpi-fbcp..."
|
||||||
rm -rf /tmp/rpi-fbcp-master
|
rm -rf /tmp/rpi-fbcp-master
|
||||||
unzip master.zip 1> /dev/null || { warning "Failed to uncompress fbcp!" && exit 1; }
|
unzip master.zip 1> /dev/null || { warning "Failed to uncompress fbcp!" && exit 1; }
|
||||||
|
|
@ -314,14 +314,21 @@ function install_fbcp() {
|
||||||
|
|
||||||
# if there's X11 installed...
|
# if there's X11 installed...
|
||||||
if [ -e /etc/lightdm ]; then
|
if [ -e /etc/lightdm ]; then
|
||||||
echo "Using double resolution"
|
if [ "${pitfttype}" == "35r" ]; then
|
||||||
WIDTH=$(( WIDTH_VALUES[PITFT_SELECT-1] * 2))
|
echo "Using x1.5 resolution"
|
||||||
HEIGHT=$(( HEIGHT_VALUES[PITFT_SELECT-1] * 2))
|
SCALE=1.5
|
||||||
reconfig /boot/config.txt "^.*hdmi_cvt.*$" "hdmi_cvt=${WIDTH} ${HEIGHT} 60 1 0 0 0"
|
else
|
||||||
|
echo "Using x2 resolution"
|
||||||
|
SCALE=2.0
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo "Using native resolution"
|
echo "Using native resolution"
|
||||||
reconfig /boot/config.txt "^.*hdmi_cvt.*$" "hdmi_cvt=${WIDTH_VALUES[PITFT_SELECT-1]} ${HEIGHT_VALUES[PITFT_SELECT-1]} 60 1 0 0 0"
|
SCALE=1
|
||||||
fi
|
fi
|
||||||
|
WIDTH=`python -c "print(int(${WIDTH_VALUES[PITFT_SELECT-1]} * ${SCALE}))"`
|
||||||
|
HEIGHT=`python -c "print(int(${HEIGHT_VALUES[PITFT_SELECT-1]} * ${SCALE}))"`
|
||||||
|
reconfig /boot/config.txt "^.*hdmi_cvt.*$" "hdmi_cvt=${WIDTH} ${HEIGHT} 60 1 0 0 0"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function uninstall_fbcp() {
|
function uninstall_fbcp() {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue