„index.h“ ändern
This commit is contained in:
parent
d979c50069
commit
e88ba6a95e
33
index.h
33
index.h
@ -9,10 +9,11 @@ const char MAIN_page[] PROGMEM = R"=====(
|
||||
.box{
|
||||
max-width: 500px;
|
||||
min-width: 250px;
|
||||
min-height: 200px;
|
||||
min-height: 300px;
|
||||
background: #009879;
|
||||
padding: 30px;
|
||||
box-sizing: border-box;
|
||||
vertical-align: top;
|
||||
color: #FFF;
|
||||
margin:20px;
|
||||
box-shadow: 0px 2px 18px -4px rgba(0,0,0,0.75);
|
||||
@ -43,23 +44,17 @@ const char MAIN_page[] PROGMEM = R"=====(
|
||||
|
||||
<div id="fwd_box" class="box">
|
||||
<h1>FWD Power</h1>
|
||||
<h1><span id="FWDPower">0</span> dBm / <span id="FWDVoltage">0</span> mV</h1>
|
||||
<h1><span id="FWDWatt">0</span> W </br><span id="FWDdBm">0</span> dBm </br><span id="FWDVoltage">0</span> mV</h1>
|
||||
</div>
|
||||
|
||||
<div class="box">
|
||||
<h1>REF Power</h1>
|
||||
<h1><span id="REFPower">0</span> dBm / <span id="REFVoltage">0</span> mV</h1>
|
||||
<h1><span id="REFWatt">0</span> W </br><span id="REFdBm">0</span> dBm </br><span id="REFVoltage">0</span> mV</h1>
|
||||
</div>
|
||||
|
||||
<div class="box">
|
||||
<h1>SWR</h1>
|
||||
<h1><span id="SWRValue">0</span></h1>
|
||||
</div>
|
||||
|
||||
<div class="box redbox">
|
||||
<h1>Temperature</h1>
|
||||
<h1><span id="TEMPValue">0</span>℃</h1>
|
||||
</div>
|
||||
<h1>1:<span id="SWRValue">1.0</span></h1>
|
||||
</div>
|
||||
|
||||
<form method='post' action='config'><button class='button' value='config' name='config' type='submit'>Configuration</button></form>
|
||||
@ -75,14 +70,16 @@ function getDATA() {
|
||||
var xhttp = new XMLHttpRequest();
|
||||
xhttp.onreadystatechange = function() {
|
||||
if (this.readyState == 4 && this.status == 200) {
|
||||
const data = this.responseText.split(",");
|
||||
document.getElementById("FWDPower").innerHTML = data[0];
|
||||
document.getElementById("FWDVoltage").innerHTML = data[1];
|
||||
document.getElementById("REFPower").innerHTML = data[2];
|
||||
document.getElementById("REFVoltage").innerHTML = data[3];
|
||||
document.getElementById("SWRValue").innerHTML = data[4];
|
||||
document.getElementById("TEMPValue").innerHTML = data[5];
|
||||
document.getElementById("BANDValue").innerHTML = data[6];
|
||||
const data = this.responseText.split(";");
|
||||
document.getElementById("FWDWatt").innerHTML = data[0];
|
||||
document.getElementById("FWDdBm").innerHTML = data[1];
|
||||
document.getElementById("FWDVoltage").innerHTML = data[2];
|
||||
document.getElementById("REFWatt").innerHTML = data[3];
|
||||
document.getElementById("REFdBm").innerHTML = data[4];
|
||||
document.getElementById("REFVoltage").innerHTML = data[5];
|
||||
document.getElementById("SWRValue").innerHTML = data[6];
|
||||
//document.getElementById("TEMPValue").innerHTML = data[7];
|
||||
document.getElementById("BANDValue").innerHTML = data[7];
|
||||
if (parseInt(data[0]) > 4) {
|
||||
document.getElementById("fwd_box").className = "box redbox";
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user