1
0
mirror of https://github.com/thooge/esp32-nmea2000-obp60.git synced 2025-12-15 23:13:07 +01:00

limit tcp clients to 6

This commit is contained in:
wellenvogel
2021-12-12 12:46:17 +01:00
parent de04e5443b
commit 2f1ea8e726
4 changed files with 23 additions and 5 deletions

View File

@@ -92,6 +92,20 @@ function resetForm(ev) {
let el = document.querySelector("[name='" + k + "']");
if (el) {
let v = jsonData[k];
let def=getConfigDefition(k);
if (def.check == 'checkMinMax'){
//simple migration if the current value is outside the range
//we even "hide" this from the user
v=parseFloat(v);
if (! isNaN(v)){
if (def.min !== undefined){
if (v < parseFloat(def.min)) v=parseFloat(def.min);
}
if (def.max !== undefined){
if (v > parseFloat(def.max)) v=parseFloat(def.max);
}
}
}
el.value = v;
el.setAttribute('data-loaded', v);
let changeEvent = new Event('change');