mirror of https://github.com/OpenIPC/firmware.git
[no ci] Update wifibroadcast-ng
parent
1adb8b8f5d
commit
603fe216e6
|
@ -1,7 +1,7 @@
|
|||
wireless:
|
||||
txpower: 1
|
||||
channel: 161
|
||||
width: HT20
|
||||
width: 20
|
||||
broadcast:
|
||||
mcs_index: 2
|
||||
tun_index: 1
|
||||
|
|
|
@ -55,25 +55,26 @@ load_modules() {
|
|||
|
||||
load_interface() {
|
||||
iw "$wfb_dev" set monitor none
|
||||
iw "$wfb_dev" set channel "$channel" "$width"
|
||||
|
||||
[ "$width" = "40" ] && wfb_width=HT40+ || wfb_width=HT20
|
||||
iw "$wfb_dev" set channel "$channel" "$wfb_width"
|
||||
iw reg set 00
|
||||
|
||||
[ "$driver" = "88XXau" ] && wfb_power=$((txpower * -100)) || wfb_power=$((txpower * 50))
|
||||
iw "$wfb_dev" set txpower fixed "$wfb_power"
|
||||
[ "$width" = "HT20" ] && wfb_width=20 || wfb_width=40
|
||||
}
|
||||
|
||||
start_broadcast() {
|
||||
echo_log "Starting wfb_tx"
|
||||
wfb_tx -K "$wfb_key" -M "$mcs_index" -B "$wfb_width" -k "$fec_k" -n "$fec_n" \
|
||||
wfb_tx -K "$wfb_key" -M "$mcs_index" -B "$width" -k "$fec_k" -n "$fec_n" \
|
||||
-S "$stbc" -L "$ldpc" -i "$link_id" -C 8000 -G short "$wfb_dev" &> /dev/null &
|
||||
}
|
||||
|
||||
start_tunnel() {
|
||||
echo_log "Starting wfb_tun"
|
||||
wfb_rx -p 160 -u 5800 -K "$wfb_key" -i "$link_id" "$wfb_dev" &> /dev/null &
|
||||
wfb_tx -p 32 -u 5801 -K "$wfb_key" -M "$tun_index" -k "$fec_k" -n "$fec_n" \
|
||||
-S "$stbc" -L "$ldpc" -i "$link_id" "$wfb_dev" &> /dev/null &
|
||||
wfb_rx -K "$wfb_key" -i "$link_id" -p 160 -u 5800 "$wfb_dev" &> /dev/null &
|
||||
wfb_tx -K "$wfb_key" -M "$tun_index" -B "$width" -k "$fec_k" -n "$fec_n" \
|
||||
-S "$stbc" -L "$ldpc" -i "$link_id" -p 32 -u 5801 "$wfb_dev" &> /dev/null &
|
||||
wfb_tun -a 10.5.0.10/24 > /dev/null &
|
||||
}
|
||||
|
||||
|
|
|
@ -117,8 +117,8 @@
|
|||
|
||||
<h3>Broadcast</h3>
|
||||
<div class="row">
|
||||
<label for="wfb_index">MCS Index:</label>
|
||||
<select id="wfb_index" name="wfb.broadcast.mcs_index"></select>
|
||||
<label for="mcs_index">MCS Index:</label>
|
||||
<select id="mcs_index" name="wfb.broadcast.mcs_index"></select>
|
||||
</div>
|
||||
|
||||
<hr class="divider">
|
||||
|
|
|
@ -35,10 +35,9 @@ function syncForm(data, formPrefix, mode) {
|
|||
}
|
||||
|
||||
const isCheckbox = field.type === "checkbox";
|
||||
const value = data[section][key];
|
||||
|
||||
if (mode === "setup") {
|
||||
isCheckbox ? field.checked = value === true : field.value = value;
|
||||
isCheckbox ?
|
||||
field.checked = data[section][key] === true : field.value = data[section][key];
|
||||
} else if (mode === "update") {
|
||||
data[section][key] = isCheckbox ?
|
||||
field.checked : (isNaN(field.value) ? field.value : Number(field.value));
|
||||
|
|
|
@ -88,6 +88,7 @@ h3 {
|
|||
#preview {
|
||||
width: 100%;
|
||||
max-width: 75%;
|
||||
margin-top: 25px;
|
||||
background-color: #000;
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 2px 10px #00000080;
|
||||
|
|
Loading…
Reference in New Issue