[refactor](trx-frontend-http): rename ft8MapAddLocator to mapAddLocator

The function handles FT8, FT4, and WSPR locators so the ft8 prefix
was misleading. Updated all call sites in app.js, ft8.js, ft4.js,
and wspr.js.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Stanislaw Grams <stanislawgrams@gmail.com>
This commit is contained in:
2026-03-14 18:58:57 +01:00
parent 9b8ea37a6e
commit 708c00a84c
4 changed files with 13 additions and 13 deletions
@@ -131,8 +131,8 @@ window.onServerFt4Batch = function(messages) {
const normalized = [];
for (const msg of messages) {
const next = normalizeServerFt4Message(msg);
if (next.grids.length > 0 && window.ft8MapAddLocator) {
window.ft8MapAddLocator(next.raw, next.grids, "ft4", next.station, { ...msg, freq_hz: next.rfHz, locator_details: next.locatorDetails });
if (next.grids.length > 0 && window.mapAddLocator) {
window.mapAddLocator(next.raw, next.grids, "ft4", next.station, { ...msg, freq_hz: next.rfHz, locator_details: next.locatorDetails });
}
next.history._tsMs = Number.isFinite(next.history?.ts_ms) ? Number(next.history.ts_ms) : Date.now();
normalized.push(next.history);
@@ -182,8 +182,8 @@ document.getElementById("ft4-clear-btn")?.addEventListener("click", async () =>
window.onServerFt4 = function(msg) {
if (ft4Status) ft4Status.textContent = ft4Paused ? "Paused" : "Receiving";
const next = normalizeServerFt4Message(msg);
if (next.grids.length > 0 && window.ft8MapAddLocator) {
window.ft8MapAddLocator(next.raw, next.grids, "ft4", next.station, { ...msg, freq_hz: next.rfHz, locator_details: next.locatorDetails });
if (next.grids.length > 0 && window.mapAddLocator) {
window.mapAddLocator(next.raw, next.grids, "ft4", next.station, { ...msg, freq_hz: next.rfHz, locator_details: next.locatorDetails });
}
addFt4Message(next.history);
};