Skip to content

Commit

Permalink
V1.2 Changes
Browse files Browse the repository at this point in the history
Updated scripts
  • Loading branch information
SilentNightx committed Feb 17, 2021
1 parent d7aba81 commit 67c298a
Show file tree
Hide file tree
Showing 13 changed files with 28 additions and 12 deletions.
3 changes: 2 additions & 1 deletion home/pi/autorun.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ sudo cp /home/pi/91-vita.rules /etc/udev/rules.d/
sudo cp /home/pi/92-dvita.rules /etc/udev/rules.d/
sudo udevadm trigger --action=change
sudo xrandr -d :0 -s 1280x720 -r 60.00
bash /home/pi/screensaveron.sh &
bash /home/pi/screensaveron.sh &
/usr/lib/notification-daemon/notification-daemon &
3 changes: 2 additions & 1 deletion home/pi/boot_txt_d.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
#!/bin/sh
sudo mv /home/pi/Templates/Disable/cmdline.txt /boot/
sudo mv /home/pi/Templates/Disable/cmdline.txt /boot/
notify-send -i /home/pi/Pictures/Icons/pspic.png "VitaDock Plus" "Boot messages disabled."
1 change: 1 addition & 0 deletions home/pi/boot_txt_e.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
#!/bin/sh
sudo mv /boot/cmdline.txt /home/pi/Templates/Disable/
notify-send -i /home/pi/Pictures/Icons/pspic.png "VitaDock Plus" "Boot messages enabled."
1 change: 1 addition & 0 deletions home/pi/format.sh
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
notify-send -i /home/pi/Pictures/Icons/pspic.png "VitaDock Plus" "Resetting first boot message..."
sudo rm 1.txt && reboot
3 changes: 2 additions & 1 deletion home/pi/fps.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
#!/bin/bash
printf "fps" | tee /home/pi/vitadock.conf
printf "fps" | tee /home/pi/vitadock.conf
notify-send -i /home/pi/Pictures/Icons/pspic.png "VitaDock Plus" "Switched to SD @ 60FPS."
10 changes: 8 additions & 2 deletions home/pi/lowlatency.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
#!/bin/bash

sudo systemctl set-default multi-user.target
sudo reboot now
MODEL="/sys/firmware/devicetree/base/model"

if grep -q "Raspberry Pi 4" "$MODEL"; then
notify-send -i /home/pi/Pictures/Icons/pspic.png "VitaDock Plus" "This feature is not supported on your Pi model."
else
sudo systemctl set-default multi-user.target
sudo reboot now
fi
3 changes: 2 additions & 1 deletion home/pi/pc.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
#!/bin/bash
printf "pc" | tee /home/pi/vitadock.conf
printf "pc" | tee /home/pi/vitadock.conf
notify-send -i /home/pi/Pictures/Icons/pspic.png "VitaDock Plus" "Switched to Plugin Controlled mode."
3 changes: 2 additions & 1 deletion home/pi/res.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
#!/bin/bash
printf "res" | tee /home/pi/vitadock.conf
printf "res" | tee /home/pi/vitadock.conf
notify-send -i /home/pi/Pictures/Icons/pspic.png "VitaDock Plus" "Switched to HD @ 30FPS."
8 changes: 4 additions & 4 deletions home/pi/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ fi
FILE="/home/pi/vitadock.conf"
if grep -q fps "$FILE"; then
v4l2-ctl -d /dev/video0 -v width=864,height=488,pixelformat=nv12 -p 60
ffmpeg -s:v copy -r:v copy -c:v h264_mmal -c:v h264_omx -pix_fmt:v nv12 -pre:v ultrafast -color_primaries smpte170m -color_trc smpte170m -colorspace smpte170m -color_range 2 -nostdin -f v4l2 /dev/video0 | ffplay -fs -autoexit -alwaysontop -fast -sws_flags lanczos -framerate 60 -fflags nobuffer -flags low_delay -framedrop -avioflags direct -fflags discardcorrupt -probesize 32 -analyzeduration 0 -sync ext /dev/video0
ffmpeg -s:v copy -r:v copy -c:v h264_mmal -c:v h264_omx -pix_fmt:v nv12 -pre:v ultrafast -color_primaries smpte170m -color_trc smpte170m -colorspace smpte170m -color_range tv -nostdin -f v4l2 /dev/video0 | ffplay -fs -autoexit -alwaysontop -fast -sws_flags lanczos -framerate 60 -fflags nobuffer -flags low_delay -framedrop -avioflags direct -fflags discardcorrupt -probesize 32 -analyzeduration 0 -sync ext /dev/video0
fi
if grep -q res "$FILE"; then
v4l2-ctl -d /dev/video0 -v width=960,height=544,pixelformat=nv12 -p 30
ffmpeg -s:v copy -r:v copy -c:v h264_mmal -c:v h264_omx -pix_fmt:v nv12 -pre:v ultrafast -color_primaries smpte170m -color_trc smpte170m -colorspace smpte170m -color_range 2 -nostdin -f v4l2 /dev/video0 | ffplay -fs -autoexit -alwaysontop -fast -sws_flags lanczos -framerate 30 -fflags nobuffer -flags low_delay -framedrop -avioflags direct -fflags discardcorrupt -probesize 32 -analyzeduration 0 -sync ext /dev/video0
ffmpeg -s:v copy -r:v copy -c:v h264_mmal -c:v h264_omx -pix_fmt:v nv12 -pre:v ultrafast -color_primaries smpte170m -color_trc smpte170m -colorspace smpte170m -color_range tv -nostdin -f v4l2 /dev/video0 | ffplay -fs -autoexit -alwaysontop -fast -sws_flags lanczos -framerate 30 -fflags nobuffer -flags low_delay -framedrop -avioflags direct -fflags discardcorrupt -probesize 32 -analyzeduration 0 -sync ext /dev/video0
fi
if grep -q sharp "$FILE"; then
v4l2-ctl -d /dev/video0 -v width=1280,height=720,pixelformat=nv12 -p 30
ffmpeg -s:v copy -r:v copy -c:v h264_mmal -c:v h264_omx -pix_fmt:v nv12 -pre:v ultrafast -color_primaries smpte170m -color_trc smpte170m -colorspace smpte170m -color_range 2 -nostdin -f v4l2 /dev/video0 | ffplay -fs -autoexit -alwaysontop -fast -framerate 30 -fflags nobuffer -flags low_delay -framedrop -avioflags direct -fflags discardcorrupt -probesize 32 -analyzeduration 0 -sync ext /dev/video0
ffmpeg -s:v copy -r:v copy -c:v h264_mmal -c:v h264_omx -pix_fmt:v nv12 -pre:v ultrafast -color_primaries smpte170m -color_trc smpte170m -colorspace smpte170m -color_range tv -nostdin -f v4l2 /dev/video0 | ffplay -fs -autoexit -alwaysontop -fast -framerate 30 -fflags nobuffer -flags low_delay -framedrop -avioflags direct -fflags discardcorrupt -probesize 32 -analyzeduration 0 -sync ext /dev/video0
fi
if grep -q pc "$FILE"; then
v4l2-ctl -d /dev/video0 -v pixelformat=nv12
ffmpeg -s:v copy -r:v copy -c:v h264_mmal -c:v h264_omx -pix_fmt:v nv12 -pre:v ultrafast -color_primaries smpte170m -color_trc smpte170m -colorspace smpte170m -color_range 2 -nostdin -f v4l2 /dev/video0 | ffplay -fs -autoexit -alwaysontop -fast -sws_flags lanczos -fflags nobuffer -flags low_delay -framedrop -avioflags direct -fflags discardcorrupt -probesize 32 -analyzeduration 0 -sync ext /dev/video0
ffmpeg -s:v copy -r:v copy -c:v h264_mmal -c:v h264_omx -pix_fmt:v nv12 -pre:v ultrafast -color_primaries smpte170m -color_trc smpte170m -colorspace smpte170m -color_range tv -nostdin -f v4l2 /dev/video0 | ffplay -fs -autoexit -alwaysontop -fast -sws_flags lanczos -fflags nobuffer -flags low_delay -framedrop -avioflags direct -fflags discardcorrupt -probesize 32 -analyzeduration 0 -sync ext /dev/video0
fi
3 changes: 2 additions & 1 deletion home/pi/sharpscale.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
#!/bin/bash
printf "sharp" | tee /home/pi/vitadock.conf
printf "sharp" | tee /home/pi/vitadock.conf
notify-send -i /home/pi/Pictures/Icons/pspic.png "VitaDock Plus" "Switched to Sharpscale mode."
Binary file added home/pi/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions home/pi/switchbt.sh
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
notify-send -i /home/pi/Pictures/Icons/pspic.png "VitaDock Plus" "Switching to Dongle Bluetooth..."
sudo mv ./blacklist-bluetooth.conf /etc/modprobe.d/ && reboot
1 change: 1 addition & 0 deletions home/pi/switchbtti.sh
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
notify-send -i /home/pi/Pictures/Icons/pspic.png "VitaDock Plus" "Switching to Internal Bluetooth..."
sudo mv /etc/modprobe.d/blacklist-bluetooth.conf ./ && reboot

0 comments on commit 67c298a

Please sign in to comment.