„index.h“ ändern
This commit is contained in:
parent
d7a5529c86
commit
b8ae319d65
32
index.h
32
index.h
@ -38,23 +38,26 @@ const char MAIN_page[] PROGMEM = R"=====(
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<div id="band_box" class="box whitebox">
|
<div id="band_box" class="box whitebox">
|
||||||
|
<h1><span id="AntennaName"></span></h1>
|
||||||
<h1>Band</h1>
|
<h1>Band</h1>
|
||||||
<h1><span id="BANDValue">0</span></h1>
|
<h2><span id="BANDValue">0</span></h2>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="fwd_box" class="box">
|
<div id="fwd_box" class="box">
|
||||||
<h1>FWD Power</h1>
|
<h1>FWD Power</h1>
|
||||||
<h1><span id="FWDWatt">0</span> </br><span id="FWDdBm">0</span> </br><span id="FWDVoltage">0</span></h1>
|
<h2><span id="FWDWatt">0</span> </br><span id="FWDdBm">0</span> </br><span id="FWDVoltage">0</span></h2>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="ref_box" class="box">
|
<div id="ref_box" class="box">
|
||||||
<h1>REF Power</h1>
|
<h1>REF Power</h1>
|
||||||
<h1><span id="REFWatt">0</span> </br><span id="REFdBm">0</span> </br><span id="REFVoltage">0</span></h1>
|
<h2><span id="REFWatt">0</span> </br><span id="REFdBm">0</span> </br><span id="REFVoltage">0</span></h2>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="vswr_box" class="box">
|
<div id="vswr_box" class="box">
|
||||||
<h1>VSWR</h1>
|
<h1>VSWR</h1>
|
||||||
<h1><span id="VSWRValue">0</span></br><span id="RLValue">0</span> dB</h1>
|
<h2><span id="VSWRValue">0</span></h2>
|
||||||
|
<h1>RL</h1>
|
||||||
|
<h2><span id="RLValue">0</span> dB</h2>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<form method='post' action='config'><button class='button' value='config' name='config' type='submit'>Configuration</button></form>
|
<form method='post' action='config'><button class='button' value='config' name='config' type='submit'>Configuration</button></form>
|
||||||
@ -66,6 +69,11 @@ setInterval(function() {
|
|||||||
getDATA();
|
getDATA();
|
||||||
}, 500); //1000mSeconds update rate
|
}, 500); //1000mSeconds update rate
|
||||||
|
|
||||||
|
function beep() {
|
||||||
|
var snd = new Audio("data:audio/wav;base64,//uQRAAAAWMSLwUIYAAsYkXgoQwAEaYLWfkWgAI0wWs/ItAAAGDgYtAgAyN+QWaAAihwMWm4G8QQRDiMcCBcH3Cc+CDv/7xA4Tvh9Rz/y8QADBwMWgQAZG/ILNAARQ4GLTcDeIIIhxGOBAuD7hOfBB3/94gcJ3w+o5/5eIAIAAAVwWgQAVQ2ORaIQwEMAJiDg95G4nQL7mQVWI6GwRcfsZAcsKkJvxgxEjzFUgfHoSQ9Qq7KNwqHwuB13MA4a1q/DmBrHgPcmjiGoh//EwC5nGPEmS4RcfkVKOhJf+WOgoxJclFz3kgn//dBA+ya1GhurNn8zb//9NNutNuhz31f////9vt///z+IdAEAAAK4LQIAKobHItEIYCGAExBwe8jcToF9zIKrEdDYIuP2MgOWFSE34wYiR5iqQPj0JIeoVdlG4VD4XA67mAcNa1fhzA1jwHuTRxDUQ//iYBczjHiTJcIuPyKlHQkv/LHQUYkuSi57yQT//uggfZNajQ3Vmz+Zt//+mm3Wm3Q576v////+32///5/EOgAAADVghQAAAAA//uQZAUAB1WI0PZugAAAAAoQwAAAEk3nRd2qAAAAACiDgAAAAAAABCqEEQRLCgwpBGMlJkIz8jKhGvj4k6jzRnqasNKIeoh5gI7BJaC1A1AoNBjJgbyApVS4IDlZgDU5WUAxEKDNmmALHzZp0Fkz1FMTmGFl1FMEyodIavcCAUHDWrKAIA4aa2oCgILEBupZgHvAhEBcZ6joQBxS76AgccrFlczBvKLC0QI2cBoCFvfTDAo7eoOQInqDPBtvrDEZBNYN5xwNwxQRfw8ZQ5wQVLvO8OYU+mHvFLlDh05Mdg7BT6YrRPpCBznMB2r//xKJjyyOh+cImr2/4doscwD6neZjuZR4AgAABYAAAABy1xcdQtxY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amcJnMW26MRPgUw6j+LkhyHGVGYjSUUKNpuJUQoOIAyDvEyG8S5yfK6dhZc0Tx1KI/gviKL6qvvFs1+bWtaz58uUNnryq6kt5RzOCkPWlVqVX2a/EEBUdU1KrXLf40GoiiFXK///qpoiDXrOgqDR38JB0bw7SoL+ZB9o1RCkQjQ2CBYZKd/+VJxZRRZlqSkKiws0WFxUyCwsKiMy7hUVFhIaCrNQsKkTIsLivwKKigsj8XYlwt/WKi2N4d//uQRCSAAjURNIHpMZBGYiaQPSYyAAABLAAAAAAAACWAAAAApUF/Mg+0aohSIRobBAsMlO//Kk4soosy1JSFRYWaLC4qZBYWFRGZdwqKiwkNBVmoWFSJkWFxX4FFRQWR+LsS4W/rFRb/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////VEFHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAU291bmRib3kuZGUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMjAwNGh0dHA6Ly93d3cuc291bmRib3kuZGUAAAAAAAAAACU=");
|
||||||
|
snd.play();
|
||||||
|
}
|
||||||
|
|
||||||
function getDATA() {
|
function getDATA() {
|
||||||
var xhttp = new XMLHttpRequest();
|
var xhttp = new XMLHttpRequest();
|
||||||
xhttp.onreadystatechange = function() {
|
xhttp.onreadystatechange = function() {
|
||||||
@ -80,17 +88,31 @@ function getDATA() {
|
|||||||
document.getElementById("VSWRValue").innerHTML = data[6];
|
document.getElementById("VSWRValue").innerHTML = data[6];
|
||||||
document.getElementById("RLValue").innerHTML = data[7];
|
document.getElementById("RLValue").innerHTML = data[7];
|
||||||
document.getElementById("BANDValue").innerHTML = data[8];
|
document.getElementById("BANDValue").innerHTML = data[8];
|
||||||
|
document.getElementById("AntennaName").innerHTML = data[10];
|
||||||
if (data[6] == "-1") {
|
if (data[6] == "-1") {
|
||||||
document.getElementById("VSWRValue").innerHTML = "0";
|
document.getElementById("VSWRValue").innerHTML = "0";
|
||||||
document.getElementById("vswr_box").className = "box redbox";
|
document.getElementById("vswr_box").className = "box redbox";
|
||||||
} else {
|
} else {
|
||||||
document.getElementById("VSWRValue").innerHTML = "1:" + data[6];
|
document.getElementById("VSWRValue").innerHTML = "1:" + data[6];
|
||||||
if (parseFloat(data[6]) >= parseFloat(data[9])) {
|
if (parseFloat(data[6]) >= parseFloat(data[9]) || data[6] == "inf") {
|
||||||
document.getElementById("vswr_box").className = "box redbox";
|
document.getElementById("vswr_box").className = "box redbox";
|
||||||
|
if (data[11] == "true") {
|
||||||
|
beep();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
document.getElementById("vswr_box").className = "box";
|
document.getElementById("vswr_box").className = "box";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (data[0].startsWith('--') || data[1].startsWith('--')){
|
||||||
|
document.getElementById("fwd_box").className = "box redbox";
|
||||||
|
} else {
|
||||||
|
document.getElementById("fwd_box").className = "box";
|
||||||
|
}
|
||||||
|
if (data[3].startsWith('--') || data[4].startsWith('--')){
|
||||||
|
document.getElementById("ref_box").className = "box redbox";
|
||||||
|
} else {
|
||||||
|
document.getElementById("ref_box").className = "box";
|
||||||
|
}
|
||||||
|
|
||||||
//if (parseFloat(vswr) >= vswr_th || data[6] == "0") {
|
//if (parseFloat(vswr) >= vswr_th || data[6] == "0") {
|
||||||
// document.getElementById("vswr_box").className = "box redbox";
|
// document.getElementById("vswr_box").className = "box redbox";
|
||||||
|
Loading…
Reference in New Issue
Block a user