Optimized CW skimmer message display.

This commit is contained in:
Marat Fayzullin 2025-01-19 15:36:35 -05:00
parent 2b5051b821
commit 063a6be4e4
2 changed files with 7 additions and 3 deletions

View File

@ -919,14 +919,18 @@ CwSkimmerMessagePanel.prototype.pushMessage = function(msg) {
var j = this.texts.findIndex(function(x) { return x.freq >= msg.freq });
if (j < 0) {
// Append a new entry
this.texts.push({ freq: msg.freq, text: msg.text, ts: now });
if (msg.text.trim().length > 0) {
this.texts.push({ freq: msg.freq, text: msg.text, ts: now });
}
} else if (this.texts[j].freq == msg.freq) {
// Update existing entry
this.texts[j].text = (this.texts[j].text + msg.text).slice(-64);
this.texts[j].ts = now;
} else {
// Insert a new entry
this.texts.splice(j, 0, { freq: msg.freq, text: msg.text, ts: now });
if (msg.text.trim().length > 0) {
this.texts.splice(j, 0, { freq: msg.freq, text: msg.text, ts: now });
}
}
// Generate table body

View File

@ -27,6 +27,7 @@ modeNames = {
59: "SC2 60",
60: "Scottie 1",
63: "SC2 120",
68: "AVT 90",
76: "Scottie DX",
93: "PD 50",
94: "PD 290",
@ -51,7 +52,6 @@ modeNames = {
15: "Robot BW36B",
41: "Martin HQ1",
42: "Martin HQ2",
68: "AVT 90",
85: "FAX480",
90: "FAST FM",
100: "Proskan J120",