[no ci] Datalink: reduce script verbosity

pull/1403/head
Viktor 2024-04-16 14:23:16 +02:00
parent 32303b058e
commit 19d668098c
3 changed files with 3 additions and 18 deletions

View File

@ -12,9 +12,7 @@ fi
if [ ! -f /usr/bin/telemetry_rx ] && [ ! -f /usr/bin/telemetry_tx ]; then
ln -s /usr/bin/wfb_rx /usr/bin/telemetry_rx
chmod +x /usr/bin/telemetry_rx
ln -s /usr/bin/wfb_tx /usr/bin/telemetry_tx
chmod +x /usr/bin/telemetry_tx
fi
start_drone_telemetry() {
@ -47,7 +45,6 @@ case "$1" in
if [ "$fw" = "fpv" ] || [ "$fw" = "venc" ]; then
start_${unit}_telemetry
fi
echo "Done."
;;
stop)

View File

@ -110,7 +110,6 @@ streamer() {
finish() {
# complete tweaks and add flag
fw_setenv wlandev
touch /etc/system.ok
echo "Restart system to apply fpv changes..."
reboot

View File

@ -30,11 +30,7 @@ set_mcs() {
fi
}
# "0bda:8813" -> (8814) -> 8814au
# "0846:9052" -> (8811) -> 8821au
detect_wifi_card() {
echo "Detecting wifi card vendor..."
devices=$(lsusb | cut -d ' ' -f6 | sort | uniq)
for card in $devices; do
case "$card" in
@ -56,18 +52,16 @@ detect_wifi_card() {
done
if [ -z "$driver" ]; then
echo "No usb wifi card detected. Check wifi stick connection, usb power or possible bad soldering."
echo "Wireless module not detected, check the usb connection."
exit 1
else
echo "Detected: $driver"
fi
echo "Awaiting interface $wlan in system..."
local n=0
while ! ifconfig -a | grep -q "$wlan"; do
if [ "$n" -ge 5 ]; then
echo "No interface $wlan. Check wifi stick connection, usb power or possible bad soldering."
echo "No interface for $wlan, check the usb connection."
exit 1
fi
sleep 0.5
@ -116,20 +110,15 @@ case "$1" in
if [ "$daemon" -eq 1 ]; then
echo "Loading modules and wifi card driver..."
load_modules
echo "Preparing interface wlan..."
load_interface
if ! cat "$keydir/$unit.key" > /dev/null 2>&1; then
echo "Generating drone & ground station keys..."
cd $keydir && wfb_keygen
else
echo "$unit key exist..."
fi
echo "Starting Wifibroadcast service..."
start_"$unit"_wfb
echo "Done."
if [ "$telemetry" = "true" ]; then
if [ "$chip" = "gk7205v200" ]; then
@ -142,7 +131,7 @@ case "$1" in
telemetry start
fi
else
echo "Wifibroadcast service disabled in wfb.conf..."
echo "Wifibroadcast service disabled in wfb.conf."
fi
;;