From 43e15b2d8b041dc59572c1979d6f0dfd79ef3cf4 Mon Sep 17 00:00:00 2001 From: Kim - DG9VH Date: Sun, 8 Nov 2020 21:58:17 +0100 Subject: [PATCH] Fixed Local Heard Issue if short transmissions produced multiline replies from logtailer --- html/js/functions.js | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/html/js/functions.js b/html/js/functions.js index a66a045..e003508 100644 --- a/html/js/functions.js +++ b/html/js/functions.js @@ -259,17 +259,20 @@ function getLocalHeard(document, event) { // M: 2020-11-01 21:33:27.454 YSF, received network data from DG2MAS to DG-ID 0 at DG2MAS // M: 2020-11-01 21:33:35.025 YSF, received network end of transmission from DG2MAS to DG-ID 0, 7.7 seconds, 0% packet loss, BER: 0.0% $(document).ready(function() { - if (getSource(event.data) == "RF") { - if (getDuration(event.data) !== "") { - t_localh.row.add( [ - getTimestamp(event.data), - getMode(event.data), - getCallsign(event.data), - getTarget(event.data), - getSource(event.data), - getDuration(event.data), - getBER(event.data) - ] ).draw(); + lines = event.data.split("\n"); + lines.forEach(function(line, index, array)) { + if (getSource(line) == "RF") { + if (getDuration(line) !== "") { + t_localh.row.add( [ + getTimestamp(line), + getMode(line), + getCallsign(line), + getTarget(line), + getSource(line), + getDuration(line), + getBER(line) + ] ).draw(); + } } } });