„javascript.h“ ändern
This commit is contained in:
parent
6cbd947787
commit
9b58db178c
@ -1,11 +1,9 @@
|
||||
const char JAVASCRIPT[] PROGMEM = R"=====(
|
||||
<script>
|
||||
var okaytogo = true;
|
||||
var vu_meters_loaded = false;
|
||||
|
||||
// Function for drawing the LED bar graphs
|
||||
function vumeter(elem, config){
|
||||
|
||||
// Settings
|
||||
var max = config.max || 100;
|
||||
var boxCount = config.boxCount || 10;
|
||||
@ -39,7 +37,6 @@ function vumeter(elem, config){
|
||||
|
||||
// Main draw loop
|
||||
var draw = function(){
|
||||
|
||||
var targetVal = parseInt(elem.dataset.val, 10);
|
||||
|
||||
// Gradual approach
|
||||
@ -71,7 +68,6 @@ function vumeter(elem, config){
|
||||
drawBoxes(c, curVal);
|
||||
|
||||
requestAnimationFrame(draw);
|
||||
|
||||
};
|
||||
|
||||
// Draw the boxes
|
||||
@ -120,13 +116,10 @@ function vumeter(elem, config){
|
||||
var maxOn = Math.ceil((val/max) * boxCount);
|
||||
return (id <= maxOn);
|
||||
}
|
||||
|
||||
draw();
|
||||
}
|
||||
|
||||
setInterval(function() {
|
||||
// Call a function repetatively
|
||||
okaytogo = !okaytogo;
|
||||
getDATA();
|
||||
}, 500);
|
||||
|
||||
@ -154,7 +147,6 @@ function beep() {
|
||||
snd.play();
|
||||
}
|
||||
|
||||
|
||||
// Converts a String to Integer
|
||||
function strtoint(x) {
|
||||
const parsed = parseInt(x);
|
||||
@ -260,7 +252,6 @@ function getDATA() {
|
||||
}
|
||||
}
|
||||
document.getElementById("VSWRValue").innerHTML = data[6];
|
||||
//document.getElementById("RLValue").innerHTML = data[7];
|
||||
document.getElementById("BANDValue").innerHTML = data[8]; // displays the chosen band
|
||||
document.getElementById("AntennaName").innerHTML = data[10]; // displays the name of the antenna
|
||||
document.getElementById("max_led_pwr_fwd").innerHTML = data[12]; // sets the FWD LED bar max value
|
||||
|
Loading…
Reference in New Issue
Block a user