mirror of
https://github.com/brain-hackers/brain-config.git
synced 2024-12-23 04:30:06 +09:00
use start_x for camera enable rather than startx to reduce confusion
This commit is contained in:
parent
1f9a1c130d
commit
c6baad54c8
@ -433,13 +433,14 @@ set_camera() {
|
|||||||
[ -e /boot/config.txt ] || touch /boot/config.txt
|
[ -e /boot/config.txt ] || touch /boot/config.txt
|
||||||
|
|
||||||
if [ "$1" -eq 0 ]; then # disable camera
|
if [ "$1" -eq 0 ]; then # disable camera
|
||||||
set_config_var startx 0 /boot/config.txt
|
set_config_var start_x 0 /boot/config.txt
|
||||||
|
sed /boot/config.txt -i -e "s/^startx/#startx/"
|
||||||
sed /boot/config.txt -i -e "s/^start_file/#start_file/"
|
sed /boot/config.txt -i -e "s/^start_file/#start_file/"
|
||||||
sed /boot/config.txt -i -e "s/^fixup_file/#fixup_file/"
|
sed /boot/config.txt -i -e "s/^fixup_file/#fixup_file/"
|
||||||
else # enable camera
|
else # enable camera
|
||||||
set_config_var startx 1 /boot/config.txt
|
set_config_var start_x 1 /boot/config.txt
|
||||||
set_config_var gpu_mem 128 /boot/config.txt
|
set_config_var gpu_mem 128 /boot/config.txt
|
||||||
sed /boot/config.txt -i -e "s/^start_file/#start_file/"
|
sed /boot/config.txt -i -e "s/^startx/#startx/"
|
||||||
sed /boot/config.txt -i -e "s/^fixup_file/#fixup_file/"
|
sed /boot/config.txt -i -e "s/^fixup_file/#fixup_file/"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user