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:
14
web/index.js
14
web/index.js
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user