Skip to content

Commit

Permalink
[no ci] wifibroadcast-ng: add wfb_cli command (#1644)
Browse files Browse the repository at this point in the history
  • Loading branch information
viktorxda authored Dec 17, 2024
1 parent 2088de7 commit 488f3e5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions general/package/wifibroadcast-ng/files/wfb-cli
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
yaml-cli -i /etc/wfb.yaml "$@"
5 changes: 2 additions & 3 deletions general/package/wifibroadcast-ng/files/wifibroadcast
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
#!/bin/sh
wfb_soc=$(ipcinfo -c)
wfb_key=/etc/drone.key
wfb_cfg=/etc/wfb.yaml

wfb_yaml() {
if [ -e "$wfb_cfg" ]; then
if [ -e /etc/wfb.yaml ]; then
if [ "$1" = "b" ]; then
config=broadcast
elif [ "$1" = "t" ]; then
config=telemetry
elif [ "$1" = "w" ]; then
config=wireless
fi
value=$(yaml-cli -i "$wfb_cfg" -g ."$config"."$2")
value=$(wfb-cli -g ."$config"."$2")
fi

eval "$2"="${value:-$3}"
Expand Down
1 change: 1 addition & 0 deletions general/package/wifibroadcast-ng/wifibroadcast-ng.mk
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ define WIFIBROADCAST_NG_INSTALL_TARGET_CMDS
$(INSTALL) -m 755 -t $(TARGET_DIR)/usr/bin $(@D)/wfb_tx
$(INSTALL) -m 755 -t $(TARGET_DIR)/usr/bin $(@D)/wfb_tx_cmd
$(INSTALL) -m 755 -t $(TARGET_DIR)/usr/bin $(@D)/wfb_tun
$(INSTALL) -m 755 -t $(TARGET_DIR)/usr/bin $(WIFIBROADCAST_NG_PKGDIR)/files/wfb-cli
$(INSTALL) -m 755 -t $(TARGET_DIR)/usr/bin $(WIFIBROADCAST_NG_PKGDIR)/files/wifibroadcast
$(INSTALL) -m 755 -t $(TARGET_DIR)/usr/bin $(WIFIBROADCAST_NG_PKGDIR)/files/tweaksys
endef
Expand Down

0 comments on commit 488f3e5

Please sign in to comment.