„index.h“ ändern

This commit is contained in:
Michael Clemens // DK1MI 2023-04-24 12:27:35 +00:00
parent f6b7da63e3
commit 649128c479

34
index.h
View File

@ -3,7 +3,7 @@ const char MAIN_page[] PROGMEM = R"=====(
<html>
<style>
.card{
max-width: 250px;
max-width: 500px;
min-height: 200px;
background: #02b875;
padding: 30px;
@ -27,6 +27,16 @@ const char MAIN_page[] PROGMEM = R"=====(
<h1><span id="REFValue">0</span>mV</h1>
</div>
<div class="card">
<h1>DRV Voltage</h1>
<h1><span id="DRVValue">0</span>mV</h1>
</div>
<div class="card">
<h1>SWR</h1>
<h1><span id="SWRValue">0</span>mV</h1>
</div>
<div class="card">
<h1>Temperature</h1>
<h1><span id="TEMPValue">0</span>&#8451;</h1>
@ -63,6 +73,28 @@ function getREF() {
xhttp.open("GET", "readREF", true);
xhttp.send();
}
function getDRV() {
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("DRVValue").innerHTML =
this.responseText;
}
};
xhttp.open("GET", "readDRV", true);
xhttp.send();
}
function getSWR() {
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("SWRValue").innerHTML =
this.responseText;
}
};
xhttp.open("GET", "readSWR", true);
xhttp.send();
}
function getTEMP() {
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {