mirror of
https://github.com/thooge/esp32-nmea2000-obp60.git
synced 2025-12-13 05:53:06 +01:00
#60: avoid errors in the web ui when the rx fifo overflows (strange counter ids), add an error log for serial errors
This commit is contained in:
@@ -346,11 +346,15 @@ function createCounterDisplay(parent,label,key,isEven){
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function validKey(key){
|
||||
if (! key) return;
|
||||
return key.replace(/[^a-z_:A-Z0-9-]/g,'');
|
||||
}
|
||||
function updateMsgDetails(key, details) {
|
||||
forEl('.msgDetails', function (frame) {
|
||||
if (frame.getAttribute('id') !== key) return;
|
||||
for (let k in details) {
|
||||
k=validKey(k);
|
||||
let el = frame.querySelector("[data-id=\"" + k + "\"] ");
|
||||
if (!el) {
|
||||
el = addEl('div', 'row', frame);
|
||||
|
||||
Reference in New Issue
Block a user