[fix](trx-frontend): refine map popup rendering

Co-authored-by: OpenAI Codex <codex@openai.com>
Signed-off-by: Stan Grams <sjg@haxx.space>
This commit is contained in:
2026-03-04 19:17:36 +01:00
parent 75a74d4063
commit 9e1bdf2435
2 changed files with 9 additions and 2 deletions
@@ -124,8 +124,15 @@ window.onServerWspr = function(msg) {
const raw = (msg.message || "").toString();
const grids = extractAllGrids(raw);
const station = extractLikelyCallsign(raw);
const baseHz = Number.isFinite(window.ft8BaseHz) ? Number(window.ft8BaseHz) : null;
const rfHz = Number.isFinite(msg.freq_hz) && Number.isFinite(baseHz)
? (baseHz + Number(msg.freq_hz))
: (Number.isFinite(msg.freq_hz) ? Number(msg.freq_hz) : null);
if (grids.length > 0 && window.ft8MapAddLocator) {
window.ft8MapAddLocator(raw, grids, "wspr", station, msg);
window.ft8MapAddLocator(raw, grids, "wspr", station, {
...msg,
freq_hz: rfHz,
});
}
addWsprMessage({
receiver: window.getDecodeRigMeta ? window.getDecodeRigMeta() : null,