mirror of https://github.com/OpenIPC/firmware.git
[no ci] Package: format datalink/wifibroadcast scripts
parent
a0626194f7
commit
a992eea345
|
@ -2,9 +2,7 @@
|
|||
#
|
||||
# Start fpv datalink
|
||||
#
|
||||
|
||||
. /etc/datalink.conf
|
||||
|
||||
chip=$(ipcinfo -c)
|
||||
fw=$(grep "BUILD_OPTION" "/etc/os-release" | cut -d= -f2)
|
||||
|
||||
|
@ -15,7 +13,6 @@ case "$1" in
|
|||
fi
|
||||
|
||||
echo "Starting FPV datalink..."
|
||||
|
||||
if [ ${fw} = "lte" ]; then
|
||||
if [ ${usb_modem} = "true" ]; then
|
||||
echo "Starting lte modem configuration..."
|
||||
|
@ -40,16 +37,19 @@ case "$1" in
|
|||
wifibroadcast start
|
||||
fi
|
||||
;;
|
||||
|
||||
stop)
|
||||
echo "Stopping all services..."
|
||||
kill -9 $(pidof wfb_tx)
|
||||
kill -9 $(pidof wfb_rx)
|
||||
kill -9 $(pidof telemetry_rx)
|
||||
kill -9 $(pidof telemetry_tx)
|
||||
kill -9 $(pidof mavlink-routerd)
|
||||
kill -9 $(pidof mavfwd)
|
||||
killall -q wfb_tx
|
||||
killall -q wfb_rx
|
||||
killall -q telemetry_rx
|
||||
killall -q telemetry_tx
|
||||
killall -q mavlink-routerd
|
||||
killall -q mavfwd
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: $0 {start|stop}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
|
|
@ -113,7 +113,6 @@ finish() {
|
|||
case "$1" in
|
||||
gk7205v200 | gk7205v210 | hi3516ev200)
|
||||
echo "Preparing system tweaks for ${chip}..."
|
||||
|
||||
# set custom config
|
||||
if [ ${chip} = "gk7205v200" ] && [ ${sensor} = "imx307" ]; then
|
||||
echo "switch to custom sensor config"
|
||||
|
@ -136,6 +135,7 @@ case "$1" in
|
|||
streamer
|
||||
finish
|
||||
;;
|
||||
|
||||
gk7205v300 | hi3516ev300)
|
||||
echo "Preparing system tweaks for ${chip}..."
|
||||
|
||||
|
@ -152,27 +152,29 @@ case "$1" in
|
|||
streamer
|
||||
finish
|
||||
;;
|
||||
|
||||
t31l | t31n | t31x | t31zx)
|
||||
echo "Preparing system tweaks for ${chip}..."
|
||||
|
||||
basic
|
||||
streamer
|
||||
finish
|
||||
;;
|
||||
|
||||
hi3536dv100)
|
||||
echo "Preparing system tweaks for ${chip}..."
|
||||
|
||||
finish
|
||||
;;
|
||||
|
||||
ssc33x)
|
||||
echo "Preparing system tweaks for ${chip}..."
|
||||
|
||||
basic
|
||||
sigmastar
|
||||
streamer
|
||||
finish
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: $0 {gk7205v200|gk7205v210|gk7205v300|hi3516ev200|hi3516ev300|t31l|t31n|t31x|t31zx|hi3536dv100|ssc33x}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
|
|
@ -18,6 +18,7 @@ case "$1" in
|
|||
echo '1-1' > /sys/bus/usb/drivers/usb/bind
|
||||
echo "Loaded firmware with MCS"$1
|
||||
;;
|
||||
|
||||
"3")
|
||||
echo '1-1' > /sys/bus/usb/drivers/usb/unbind
|
||||
if [ ${vendor} = "ingenic" ]; then
|
||||
|
@ -30,6 +31,7 @@ case "$1" in
|
|||
echo '1-1' > /sys/bus/usb/drivers/usb/bind
|
||||
echo "Loaded firmware with MCS"$1
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Only MCS 1 or 3 supported!"
|
||||
;;
|
||||
|
|
|
@ -43,11 +43,6 @@ detect_wifi_card() {
|
|||
modprobe 88XXau rtw_tx_pwr_idx_override=${driver_txpower_override}
|
||||
;;
|
||||
|
||||
"0bda:f72b")
|
||||
driver="realtek"
|
||||
modprobe 8733bu
|
||||
;;
|
||||
|
||||
"0cf3:9271" | "040d:3801")
|
||||
driver="atheros"
|
||||
if ! [ ${unit} = "gs" ]; then
|
||||
|
|
Loading…
Reference in New Issue