Update wifibroadcast

pull/1679/head
viktorxda 2025-01-23 10:54:22 +01:00
parent 54fe125e31
commit 1596118115
2 changed files with 39 additions and 27 deletions
general/package
majestic/files
wifibroadcast-ng/files

View File

@ -30,12 +30,16 @@ case "$1" in
$1 $1
;; ;;
restart|reload) restart)
stop stop
sleep 3 sleep 3
start start
;; ;;
reload)
killall -1 "$DAEMON"
;;
*) *)
echo "Usage: $0 {start|stop|restart|reload}" echo "Usage: $0 {start|stop|restart|reload}"
exit 1 exit 1

View File

@ -94,7 +94,7 @@ load_interface() {
esac esac
} }
start_wfb() { start_broadcast() {
echo "- Starting wfb_tx" echo "- Starting wfb_tx"
wfb_tx -K "$wfb_key" -M "$b_index" -B "$bandwidth" -C 8000 \ wfb_tx -K "$wfb_key" -M "$b_index" -B "$bandwidth" -C 8000 \
-k "$b_fec_k" -n "$b_fec_n" -i "$b_link_id" "$wfb_dev" &> /dev/null & -k "$b_fec_k" -n "$b_fec_n" -i "$b_link_id" "$wfb_dev" &> /dev/null &
@ -130,43 +130,51 @@ majestic_sigmastar() {
cli -s .isp.sensorConfig /etc/sensors/imx415_fpv.bin cli -s .isp.sensorConfig /etc/sensors/imx415_fpv.bin
cli -s .isp.exposure 5 cli -s .isp.exposure 5
cli -s .video0.codec h265 cli -s .video0.codec h265
cli -s .video0.size 1920x1080
cli -s .video0.fps 90 cli -s .video0.fps 90
cli -s .video0.rcMode cbr cli -s .video0.rcMode cbr
cli -s .jpeg.enabled false
cli -s .outgoing.enabled true cli -s .outgoing.enabled true
cli -s .outgoing.server udp://0.0.0.0:5600 cli -s .outgoing.server udp://0.0.0.0:5600
killall -1 majestic
}
start() {
if [ ! -e /etc/system.ok ]; then
if [ "$wfb_soc" = "ssc33x" ]; then
majestic_sigmastar
fi
touch /etc/system.ok
fi
load_config
load_modules
load_interface
start_broadcast
start_tunnel
start_telemetry
}
stop() {
killall -q wfb_rx
killall -q wfb_tx
killall -q wfb_tun
killall -q msposd
killall -q mavfwd
} }
case "$1" in case "$1" in
start) start|stop)
if [ ! -e /etc/system.ok ]; then $1
if [ "$wfb_soc" = "ssc33x" ]; then
majestic_sigmastar
fi
touch /etc/system.ok
fi
load_config
load_modules
load_interface
start_wfb
start_tunnel
start_telemetry
;; ;;
stop) restart|reload)
killall -q wfb_rx stop
killall -q wfb_tx start
killall -q wfb_tun
killall -q msposd
killall -q mavfwd
;; ;;
*) *)
echo "Usage: $0 {start|stop}" echo "Usage: $0 {start|stop|restart|reload}"
exit 1 exit 1
;; ;;
esac esac