[no ci] Package: format datalink/wifibroadcast scripts

pull/1274/head
Viktor 2024-01-22 10:28:20 +01:00
parent a0626194f7
commit a992eea345
4 changed files with 72 additions and 73 deletions

View File

@ -2,9 +2,7 @@
# #
# Start fpv datalink # Start fpv datalink
# #
. /etc/datalink.conf . /etc/datalink.conf
chip=$(ipcinfo -c) chip=$(ipcinfo -c)
fw=$(grep "BUILD_OPTION" "/etc/os-release" | cut -d= -f2) fw=$(grep "BUILD_OPTION" "/etc/os-release" | cut -d= -f2)
@ -15,7 +13,6 @@ case "$1" in
fi fi
echo "Starting FPV datalink..." echo "Starting FPV datalink..."
if [ ${fw} = "lte" ]; then if [ ${fw} = "lte" ]; then
if [ ${usb_modem} = "true" ]; then if [ ${usb_modem} = "true" ]; then
echo "Starting lte modem configuration..." echo "Starting lte modem configuration..."
@ -40,16 +37,19 @@ case "$1" in
wifibroadcast start wifibroadcast start
fi fi
;; ;;
stop) stop)
echo "Stopping all services..." echo "Stopping all services..."
kill -9 $(pidof wfb_tx) killall -q wfb_tx
kill -9 $(pidof wfb_rx) killall -q wfb_rx
kill -9 $(pidof telemetry_rx) killall -q telemetry_rx
kill -9 $(pidof telemetry_tx) killall -q telemetry_tx
kill -9 $(pidof mavlink-routerd) killall -q mavlink-routerd
kill -9 $(pidof mavfwd) killall -q mavfwd
;; ;;
*) *)
echo "Usage: $0 {start|stop}" echo "Usage: $0 {start|stop}"
exit 1 exit 1
;;
esac esac

View File

@ -113,7 +113,6 @@ finish() {
case "$1" in case "$1" in
gk7205v200 | gk7205v210 | hi3516ev200) gk7205v200 | gk7205v210 | hi3516ev200)
echo "Preparing system tweaks for ${chip}..." echo "Preparing system tweaks for ${chip}..."
# set custom config # set custom config
if [ ${chip} = "gk7205v200" ] && [ ${sensor} = "imx307" ]; then if [ ${chip} = "gk7205v200" ] && [ ${sensor} = "imx307" ]; then
echo "switch to custom sensor config" echo "switch to custom sensor config"
@ -136,6 +135,7 @@ case "$1" in
streamer streamer
finish finish
;; ;;
gk7205v300 | hi3516ev300) gk7205v300 | hi3516ev300)
echo "Preparing system tweaks for ${chip}..." echo "Preparing system tweaks for ${chip}..."
@ -152,27 +152,29 @@ case "$1" in
streamer streamer
finish finish
;; ;;
t31l | t31n | t31x | t31zx) t31l | t31n | t31x | t31zx)
echo "Preparing system tweaks for ${chip}..." echo "Preparing system tweaks for ${chip}..."
basic basic
streamer streamer
finish finish
;; ;;
hi3536dv100) hi3536dv100)
echo "Preparing system tweaks for ${chip}..." echo "Preparing system tweaks for ${chip}..."
finish finish
;; ;;
ssc33x) ssc33x)
echo "Preparing system tweaks for ${chip}..." echo "Preparing system tweaks for ${chip}..."
basic basic
sigmastar sigmastar
streamer streamer
finish finish
;; ;;
*) *)
echo "Usage: $0 {gk7205v200|gk7205v210|gk7205v300|hi3516ev200|hi3516ev300|t31l|t31n|t31x|t31zx|hi3536dv100|ssc33x}" echo "Usage: $0 {gk7205v200|gk7205v210|gk7205v300|hi3516ev200|hi3516ev300|t31l|t31n|t31x|t31zx|hi3536dv100|ssc33x}"
exit 1 exit 1
;;
esac esac

View File

@ -18,6 +18,7 @@ case "$1" in
echo '1-1' > /sys/bus/usb/drivers/usb/bind echo '1-1' > /sys/bus/usb/drivers/usb/bind
echo "Loaded firmware with MCS"$1 echo "Loaded firmware with MCS"$1
;; ;;
"3") "3")
echo '1-1' > /sys/bus/usb/drivers/usb/unbind echo '1-1' > /sys/bus/usb/drivers/usb/unbind
if [ ${vendor} = "ingenic" ]; then if [ ${vendor} = "ingenic" ]; then
@ -30,6 +31,7 @@ case "$1" in
echo '1-1' > /sys/bus/usb/drivers/usb/bind echo '1-1' > /sys/bus/usb/drivers/usb/bind
echo "Loaded firmware with MCS"$1 echo "Loaded firmware with MCS"$1
;; ;;
*) *)
echo "Only MCS 1 or 3 supported!" echo "Only MCS 1 or 3 supported!"
;; ;;

View File

@ -43,11 +43,6 @@ detect_wifi_card() {
modprobe 88XXau rtw_tx_pwr_idx_override=${driver_txpower_override} modprobe 88XXau rtw_tx_pwr_idx_override=${driver_txpower_override}
;; ;;
"0bda:f72b")
driver="realtek"
modprobe 8733bu
;;
"0cf3:9271" | "040d:3801") "0cf3:9271" | "040d:3801")
driver="atheros" driver="atheros"
if ! [ ${unit} = "gs" ]; then if ! [ ${unit} = "gs" ]; then