[no ci] wifibroadcast-ng: update version (#1697)

pull/1698/head
viktorxda 2025-02-07 13:12:34 +01:00 committed by GitHub
parent a5736f097e
commit 94543c47c7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 289 additions and 315 deletions

View File

@ -15,14 +15,11 @@ wfb_yaml() {
load_config() {
wfb_yaml /rom/etc/wfb.yaml
wfb_yaml /etc/wfb.yaml
if [ ! -e "$wfb_key" ]; then
wfb_key=/rom/etc/drone.key
fi
[ ! -e "$wfb_key" ] && wfb_key=/rom/etc/drone.key
}
load_modules() {
for card in $(lsusb | awk '{print $6}' | sort | uniq); do
for card in $(lsusb | awk '{print $6}' | uniq); do
case "$card" in
"0bda:8812" | "0bda:881a" | "0b05:17d2" | "2357:0101" | "2604:0012")
driver=88XXau
@ -59,20 +56,9 @@ load_interface() {
iw "$wfb_dev" set channel "$channel" "$mode"
iw reg set 00
if [ "$driver" = "88XXau" ]; then
iw "$wfb_dev" set txpower fixed "$((txpower * -100))"
else
iw "$wfb_dev" set txpower fixed "$((txpower * 50))"
fi
case "$mode" in
"HT20")
bandwidth=20
;;
"HT40+" | "HT40-")
bandwidth=40
;;
esac
[ "$driver" = "88XXau" ] && wfb_pwr=$((txpower * -100)) || wfb_pwr=$((txpower * 50))
iw "$wfb_dev" set txpower fixed "$wfb_pwr"
[ "$mode" = "HT20" ] && bandwidth=20 || bandwidth=40
}
start_broadcast() {
@ -90,15 +76,13 @@ start_tunnel() {
}
start_telemetry() {
if [ "$(ipcinfo -c)" = "ssc33x" ]; then
devmem 0x1F207890 16 0x8
fi
[ "$(ipcinfo -c)" = "ssc33x" ] && devmem 0x1F207890 16 0x8
if [ "$router" = "msposd" ]; then
echo "- Starting $router"
size=$(curl -s localhost/api/v1/config.json | jsonfilter -e "@.video0.size")
msposd --baudrate 115200 --channels 8 --ahi 0 -osd -r "$osd_fps" \
--master "$serial" --out 10.5.0.1:14551 --size "${size:-1280x720}" > /dev/null &
msposd -b 115200 -c 8 -d -r $osd_fps -z "${size:-1280x720}" \
-m "$serial" -o 10.5.0.1:14551 > /dev/null &
elif [ "$router" = "mavfwd" ]; then
echo "- Starting $router"
mavfwd --baudrate 115200 --channels 8 -p 100 -a 15 -t \
@ -107,9 +91,7 @@ start_telemetry() {
}
video_settings() {
if [ "$(ipcinfo -s)" = "imx415" ]; then
cli -s .isp.sensorConfig /etc/sensors/imx415_fpv.bin
fi
[ "$(ipcinfo -s)" = "imx415" ] && cli -s .isp.sensorConfig /etc/sensors/imx415_fpv.bin
cli -s .isp.exposure 5
cli -s .video0.fps 60
cli -s .video0.codec h265

View File

@ -4,7 +4,7 @@
#
################################################################################
WIFIBROADCAST_NG_VERSION = f7172e55611679d6723f39383f1359ac9ec7c64d
WIFIBROADCAST_NG_VERSION = 82fd8b2d3caa52000b51a8c750db8b8af052c079
WIFIBROADCAST_NG_SITE = $(call github,svpcom,wfb-ng,$(WIFIBROADCAST_NG_VERSION))
WIFIBROADCAST_NG_LICENSE = GPL-3.0

View File

@ -8,13 +8,13 @@
body {
font-family: Helvetica;
background-color: #1e1e1e;
margin: 0;
padding: 0;
color: #dcdcdc;
text-align: center;
}
header {
background-color: #252526;
border-radius: 4px;
box-shadow: 0 2px 10px #00000080;
color: white;
padding: 15px 0;
}
@ -28,7 +28,7 @@
}
.form-section {
background-color: #2d2d2d;
border-radius: 8px;
border-radius: 4px;
box-shadow: 0 2px 10px #00000080;
max-width: 40%;
padding: 20px;
@ -42,8 +42,8 @@
vertical-align: top;
color: #dee2e6;
}
.form-section input, select {
width: 180px;
.form-section select {
width: 120px;
padding: 10px;
margin-bottom: 15px;
border-radius: 4px;
@ -53,6 +53,10 @@
display: inline-block;
box-sizing: border-box;
}
.form-section input {
width: 120px;
height: 25px;
}
.form-section button {
background-color: #0d6efd80;
box-shadow: 0 2px 10px #00000040;
@ -69,9 +73,9 @@
#preview {
width: 100%;
max-width: 1200px;
aspect-ratio: 16/9;
border-radius: 8px;
background-color: #000;
box-shadow: 0 2px 10px #00000080;
border-radius: 4px;
}
.row {
margin-bottom: 15px;
@ -86,15 +90,15 @@
<div class="container">
<section>
<video id="preview" poster="/mjpeg" style="background:url(stream.svg); background-size:cover;"></video>
<video id="preview" poster="/mjpeg"></video>
</section>
<section class="form-section">
<h3>Video</h3>
<form id="majestic-form">
<div class="row">
<label for="video0_fps">FPS:</label>
<select id="video0_fps" name="majestic.video0.fps">
<label for="fps">FPS:</label>
<select id="fps" name="majestic.video0.fps">
<option value="30">30</option>
<option value="60">60</option>
<option value="90">90</option>
@ -102,24 +106,19 @@
</select>
</div>
<div class="row">
<label for="video0_codec">Codec:</label>
<select id="video0_codec" name="majestic.video0.codec">
<label for="codec">Codec:</label>
<select id="codec" name="majestic.video0.codec">
<option value="h264">H264</option>
<option value="h265">H265</option>
</select>
</div>
<div class="row">
<label for="video0_bitrate">Bitrate:</label>
<select id="video0_bitrate" name="majestic.video0.bitrate">
<option value="1024">1024</option>
<option value="2048">2048</option>
<option value="3072">3072</option>
<option value="4096">4096</option>
<option value="5120">5120</option>
<option value="6144">6144</option>
<option value="7168">7168</option>
<option value="8192">8192</option>
</select>
<label for="bitrate">Bitrate:</label>
<select id="bitrate" name="majestic.video0.bitrate"></select>
</div>
<div class="row">
<label for="records">Record:</label>
<input type="checkbox" id="records" name="majestic.records.enabled">
</div>
</form>
<button id="apply-majestic-button">Apply</button>
@ -130,7 +129,7 @@
<form id="wfb-form">
<div class="row">
<label for="txpower">TX Power:</label>
<input type="number" id="txpower" name="wfb.wireless.txpower">
<select id="txpower" name="wfb.wireless.txpower"></select>
</div>
<div class="row">
<label for="channel">Channel:</label>
@ -180,29 +179,11 @@
<h3>Broadcast</h3>
<div class="row">
<label for="wfb_index">WFB Index:</label>
<select id="wfb_index" name="wfb.broadcast.wfb_index">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
</select>
<select id="wfb_index" name="wfb.broadcast.wfb_index"></select>
</div>
<div class="row">
<label for="tun_index">TUN Index:</label>
<select id="tun_index" name="wfb.broadcast.tun_index">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
</select>
<select id="tun_index" name="wfb.broadcast.tun_index"></select>
</div>
<h3>Telemetry</h3>
@ -259,7 +240,7 @@
function syncForm(data, formPrefix, mode) {
Object.keys(data).forEach((section) => {
Object.keys(data[section]).forEach((key) => {
const field = document.querySelector(`[name="${formPrefix}.${section}.${key}"]`);
const field = document.getElementsByName(formPrefix + '.' + section + '.' + key)[0];
if (field) {
if (mode === "setup") {
field.value = data[section][key];
@ -280,6 +261,21 @@
}, 1000);
}
function populateSelect(id, start, end, step) {
const select = document.getElementById(id);
for (let i = start; i <= end; i += step) {
const option = document.createElement('option');
option.value = i;
option.textContent = i;
select.appendChild(option);
}
}
populateSelect('bitrate', 1024, 20480, 1024);
populateSelect('txpower', 1, 50, 1);
populateSelect('wfb_index', 0, 8, 1);
populateSelect('tun_index', 0, 8, 1);
document.getElementById('apply-majestic-button').addEventListener('click', function() {
if (configData.majestic) {
syncForm(configData.majestic, 'majestic', "update");

View File

@ -1,4 +0,0 @@
<svg width="160" height="90" viewBox="-10 -10 220 220" xmlns="http://www.w3.org/2000/svg" fill="#ddd">
<path d="M99.806 0C44.912 0 0 44.912 0 99.806s44.912 99.806 99.806 99.806S199.612 154.7 199.612 99.806 154.698 0 99.806 0m0 6.656c24.58 0 47.018 9.654 63.708 25.354l-25.47 25.264 -7.298 -18.678c-0.332 -0.998 -1.664 -1.996 -2.994 -1.996H72.526q-2 -0.002 -2.994 1.996l-8.32 21.29H42.25a11.93 11.93 0 0 0 -11.978 11.978v65.87A11.93 11.93 0 0 0 42.25 149.708h2.596L31.49 162.956c-15.394 -16.632 -24.834 -38.842 -24.834 -63.15 0 -51.232 41.918 -93.15 93.15 -93.15m23.286 93.15c0 12.974 -10.312 23.286 -23.286 23.286 -5.286 0 -10.132 -1.712 -14.02 -4.62l32.798 -32.53a23.3 23.3 0 0 1 4.506 13.862m-46.574 0c0 -12.974 10.312 -23.286 23.286 -23.286 5.33 0 10.202 1.74 14.106 4.688l-32.818 32.552a23.28 23.28 0 0 1 -4.574 -13.952m42.144 -23.314a29.86 29.86 0 0 0 -18.856 -6.628 29.82 29.82 0 0 0 -29.942 29.942c0 7.084 2.42 13.558 6.476 18.668l-24.786 24.58H41.918a5.252 5.252 0 0 1 -5.322 -5.322V71.86a5.252 5.252 0 0 1 5.322 -5.322h21.29c1.332 0 2.662 -0.998 2.994 -1.996l8.32 -21.296h50.564l7.568 19.368zm-37.626 46.694a29.86 29.86 0 0 0 18.772 6.56 29.82 29.82 0 0 0 29.942 -29.942c0 -7.044 -2.394 -13.484 -6.408 -18.58l14.81 -14.686h19.214a5.252 5.252 0 0 1 5.322 5.322v65.87a5.252 5.252 0 0 1 -5.322 5.322H61zm18.772 69.77c-24.542 0 -46.948 -9.622 -63.628 -25.278l18.116 -17.97h103.4c6.656 0 11.978 -5.322 12.308 -11.978V71.86a11.925 11.925 0 0 0 -11.978 -11.978h-13.166l23.342 -23.15c15.346 16.624 24.758 38.804 24.758 63.074 0 51.232 -41.918 93.15 -93.15 93.15"/>
<path d="M149.708 73.188c-3.662 0 -6.656 2.994 -6.656 6.656S146.046 86.5 149.708 86.5s6.656 -2.994 6.656 -6.656 -2.994 -6.656 -6.656 -6.656"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -4,7 +4,7 @@
#
################################################################################
WIFIBROADCAST_VERSION = f7172e55611679d6723f39383f1359ac9ec7c64d
WIFIBROADCAST_VERSION = 82fd8b2d3caa52000b51a8c750db8b8af052c079
WIFIBROADCAST_SITE = $(call github,svpcom,wfb-ng,$(WIFIBROADCAST_VERSION))
WIFIBROADCAST_LICENSE = GPL-2.0