Also fixed ASCI mode
merge-requests/203/head
Tag 2022-09-28 13:41:19 -07:00
rodzic 1cf679098a
commit 21ebb3fb8c
7 zmienionych plików z 87 dodań i 96 usunięć

Wyświetl plik

@ -4,7 +4,7 @@
"AMTORFEC": false,
"AM": true,
"ARDOP": false,
"ASCII": false,
"ASCI": false,
"ATV": false,
"BPSK31": false,
"BPSK63": false,

Wyświetl plik

@ -4,7 +4,7 @@
"AMTORFEC": true,
"AM": false,
"ARDOP": true,
"ASCII": true,
"ASCI": true,
"ATV": false,
"BPSK31": true,
"BPSK63": true,

Wyświetl plik

@ -249,14 +249,18 @@ function onAdiLoadComplete(adiBuffer, saveAdifFile, adifFileName, newFile)
{
isPhone = g_modes_phone[finalMode];
}
// TODO: Revisit when we support more than one park ID
let finalPOTA = findAdiField(activeAdifArray[x], "POTA").toUpperCase();
if (finalPOTA.length == 0)
{
finalPOTA = null;
}
if (finalDXcall != "")
{
addDeDx(
finalGrid,
finalDXcall,
false,
false,
false,
finalDEcall,
finalRSTsent,
finalTime,
@ -277,7 +281,8 @@ function onAdiLoadComplete(adiBuffer, saveAdifFile, adifFileName, newFile)
isDigital,
isPhone,
finalIOTA,
finalSatName
finalSatName,
finalPOTA
);
}
}
@ -332,9 +337,6 @@ function onAdiLoadComplete(adiBuffer, saveAdifFile, adifFileName, newFile)
addDeDx(
finalMyGrid,
finalDEcall,
false,
false,
false,
finalDXcall,
null,
finalTime,
@ -357,9 +359,6 @@ function onAdiLoadComplete(adiBuffer, saveAdifFile, adifFileName, newFile)
addDeDx(
finalGrid,
finalDXcall,
false,
false,
false,
"-",
finalRSTsent,
finalTime,
@ -382,9 +381,6 @@ function onAdiLoadComplete(adiBuffer, saveAdifFile, adifFileName, newFile)
addDeDx(
finalGrid,
finalDXcall,
false,
false,
false,
finalDEcall,
finalRSTsent,
finalTime,
@ -2795,7 +2791,7 @@ function getPostJSONBuffer(
});
req.on("error", function (err) // eslint-disable-line node/handle-callback-err
{
if (typeof timeoutCallback != "undefined")
if (typeof timeoutCallback === "function")
{
timeoutCallback(
file_url,

Wyświetl plik

@ -474,6 +474,7 @@ function initQSOdata()
g_tracker.worked.px = {};
g_tracker.worked.cnty = {};
g_tracker.worked.cont = {};
g_tracker.worked.pota = {};
g_tracker.confirmed.band = {};
g_tracker.confirmed.call = {};
@ -485,6 +486,8 @@ function initQSOdata()
g_tracker.confirmed.px = {};
g_tracker.confirmed.cnty = {};
g_tracker.confirmed.cont = {};
// Not referenced but included for consistency
g_tracker.confirmed.pota = {};
}
var g_offlineLayer = null;
@ -1054,9 +1057,6 @@ function isKnownCallsignUSplus(dxcc)
function addDeDx(
finalGrid,
finalDXcall,
cq,
cqdx,
locked,
finalDEcall,
finalRSTsent,
finalTime,
@ -1077,19 +1077,22 @@ function addDeDx(
finalDigital = false,
finalPhone = false,
finalIOTA = "",
finalSatName = ""
finalSatName = "",
finalPOTA = null
)
{
var currentYear = new Date().getFullYear();
var qsoDate = new Date(1970, 0, 1); qsoDate.setSeconds(finalTime);
var isCurrentYear = (qsoDate.getFullYear() == currentYear);
var dayAsString = String(parseInt(finalTime / 86400));
var callsign = null;
var rect = null;
var worked = false;
var didConfirm = false;
var wspr = mode == "WSPR" ? parseInt(band) * 2 : null;
var hash = "";
var locked = false;
var finalMsg = ifinalMsg.trim();
if (finalMsg.length > 40) finalMsg = finalMsg.substring(0, 40) + "...";
@ -1130,6 +1133,7 @@ function addDeDx(
if (finalVucc.length > 0) details.vucc_grids = finalVucc;
if (finalIOTA.length > 0) details.IOTA = finalIOTA;
if (finalSatName.length > 0) details.satName = finalSatName;
if (finalPOTA) details.POTA = finalPOTA;
}
else
{
@ -1158,6 +1162,7 @@ function addDeDx(
details.phone = finalPhone;
details.IOTA = finalIOTA;
details.satName = finalSatName;
details.pota = finalPOTA;
}
if (finalDxcc < 1) finalDxcc = callsignToDxcc(finalDXcall);
@ -1306,6 +1311,7 @@ function addDeDx(
if (details.px)
{
g_tracker.worked.px[details.px + band + mode] = true;
// store the last one
g_tracker.worked.px[details.px] = hash;
g_tracker.worked.px[details.px + mode] = true;
g_tracker.worked.px[details.px + band] = true;
@ -1324,6 +1330,7 @@ function addDeDx(
if (details.cont)
{
g_tracker.worked.cont[details.cont + band + mode] = true;
// store the last one
g_tracker.worked.cont[details.cont] = hash;
g_tracker.worked.cont[details.cont + mode] = true;
g_tracker.worked.cont[details.cont + band] = true;
@ -1339,6 +1346,24 @@ function addDeDx(
}
}
if (finalPOTA)
{
g_tracker.worked.pota[dayAsString + finalDXcall + finalPOTA] = true;
g_tracker.worked.pota[dayAsString + finalDXcall + finalPOTA + mode] = true;
g_tracker.worked.pota[dayAsString + finalDXcall + finalPOTA + band] = true;
g_tracker.worked.pota[dayAsString + finalDXcall + finalPOTA + band + mode] = true;
if (isDigi == true)
{
g_tracker.worked.pota[dayAsString + finalDXcall + finalPOTA + "dg"] = true;
g_tracker.worked.pota[dayAsString + finalDXcall + finalPOTA + band + "dg"] = true;
}
if (isPhone == true)
{
g_tracker.worked.pota[dayAsString + finalDXcall + finalPOTA + "ph"] = true;
g_tracker.worked.pota[dayAsString + finalDXcall + finalPOTA + band + "ph"] = true;
}
}
worked = true;
locked = true;
details.worked = worked;
@ -1415,6 +1440,7 @@ function addDeDx(
if (details.px)
{
g_tracker.confirmed.px[details.px + band + mode] = true;
// store the last one
g_tracker.confirmed.px[details.px] = hash;
g_tracker.confirmed.px[details.px + mode] = true;
g_tracker.confirmed.px[details.px + band] = true;
@ -1428,6 +1454,7 @@ function addDeDx(
if (details.cont)
{
g_tracker.confirmed.cont[details.cont + band + mode] = true;
// store the last one
g_tracker.confirmed.cont[details.cont] = hash;
g_tracker.confirmed.cont[details.cont + mode] = true;
g_tracker.confirmed.cont[details.cont + band] = true;
@ -1438,6 +1465,20 @@ function addDeDx(
}
}
// we don't need confirmations, worked is enough
/* if (finalPOTA)
{
g_tracker.confirmed.pota[dayAsString + finalDXcall + finalPOTA] = true;
g_tracker.confirmed.pota[dayAsString + finalDXcall + finalPOTA + mode] = true;
g_tracker.confirmed.pota[dayAsString + finalDXcall + finalPOTA + band] = true;
g_tracker.confirmed.pota[dayAsString + finalDXcall + finalPOTA + band + mode] = true;
if (isDigi == true)
{
g_tracker.confirmed.pota[dayAsString + finalDXcall + finalPOTA + "dg"] = true;
g_tracker.confirmed.pota[dayAsString + finalDXcall + finalPOTA + band + "dg"] = true;
}
} */
g_tracker.confirmed.call[finalDXcall + band + mode] = true;
g_tracker.confirmed.call[finalDXcall] = true;
g_tracker.confirmed.call[finalDXcall + mode] = true;
@ -1466,8 +1507,6 @@ function addDeDx(
details.rect = qthToQsoBox(
finalGrid,
hash,
cq,
cqdx,
locked,
finalDEcall,
worked,
@ -1488,8 +1527,7 @@ function addDeDx(
rect = qthToBox(
finalGrid,
finalDXcall,
cq,
cqdx,
false,
locked,
finalDEcall,
band,
@ -4156,8 +4194,6 @@ function iconFeature(center, iconObj, zIndex)
function qthToQsoBox(
iQTH,
iHash,
iCQ,
iNew,
locked,
DE,
worked,
@ -4340,7 +4376,7 @@ function qthToQsoBox(
return returnRectangle;
}
function qthToBox(iQTH, iDEcallsign, iCQ, iNew, locked, DE, band, wspr, hash)
function qthToBox(iQTH, iDEcallsign, iCQ, locked, DE, band, wspr, hash)
{
if (g_appSettings.gridViewMode == 2) return null;
@ -6045,7 +6081,6 @@ function setHomeGridsquare()
myDEGrid,
myDEcall,
false,
false,
true,
"",
myBand,
@ -6963,7 +6998,6 @@ function handleWsjtxDecode(newMessage)
theirQTH,
msgDEcallsign,
CQ,
newMessage.NW,
false,
msgDXcallsign,
newMessage.OB,
@ -7080,7 +7114,6 @@ function handleWsjtxDecode(newMessage)
theirQTH,
msgDEcallsign,
CQ,
newMessage.NW,
false,
msgDXcallsign,
newMessage.OB,
@ -10530,8 +10563,6 @@ function redrawGrids()
g_QSOhash[i].grid,
i,
false,
false,
false,
g_QSOhash[i].DXcall,
g_QSOhash[i].worked,
g_QSOhash[i].confirmed,
@ -10544,8 +10575,6 @@ function redrawGrids()
g_QSOhash[i].vucc_grids[vucc],
i,
false,
false,
false,
g_QSOhash[i].DXcall,
g_QSOhash[i].worked,
g_QSOhash[i].confirmed,
@ -10918,7 +10947,6 @@ function redrawGrids()
g_liveCallsigns[i].DEcall,
false,
false,
false,
g_liveCallsigns[i].DXcall,
g_liveCallsigns[i].band,
g_liveCallsigns[i].wspr,

Wyświetl plik

@ -21,6 +21,7 @@ var r_currentDXCCs = -1;
var r_callsignManifest = null;
var g_rosterSettings = {};
var g_day = 0;
var g_dayAsString = "0";
var g_menu = null;
var g_callMenu = null;
var g_ageMenu = null;
@ -335,12 +336,13 @@ function viewRoster()
function realtimeRoster()
{
let now = timeNowSec();
g_day = now / 86400;
g_day = parseInt(now / 86400);
g_dayAsString = String(g_day);
if (g_rosterSettings.realtime == false) return;
let timeCols = document.getElementsByClassName("timeCol");
for (let x in timeCols)
for (const x in timeCols)
{
if ((typeof timeCols[x].id != "undefined") && (typeof callRoster[timeCols[x].id.substr(2)] != "undefined"))
{
@ -349,7 +351,7 @@ function realtimeRoster()
}
}
let lifeCols = document.getElementsByClassName("lifeCol");
for (let x in lifeCols)
for (const x in lifeCols)
{
if ((typeof lifeCols[x].id != "undefined") && (typeof callRoster[lifeCols[x].id.substr(2)] != "undefined"))
{
@ -360,7 +362,7 @@ function realtimeRoster()
if (g_rosterSettings.columns.Spot)
{
let spotCols = document.getElementsByClassName("spotCol");
for (let x in spotCols)
for (const x in spotCols)
{
if ((typeof spotCols[x].id != "undefined") && (typeof callRoster[spotCols[x].id.substr(2)] != "undefined"))
{
@ -450,7 +452,7 @@ function updateInstances()
let worker = "";
let keys = Object.keys(instances).sort();
for (let key in keys)
for (const key in keys)
{
let inst = keys[key];
let sp = inst.split(" - ");
@ -546,7 +548,7 @@ function createSelectOptions(
{
obj = Object.keys(forObject).sort();
}
for (let k in obj)
for (const k in obj)
{
let opt = obj[k];
let option = document.createElement("option");
@ -624,7 +626,7 @@ function updateAwardList(target = null)
let keys = Object.keys(g_awardTracker).sort();
for (let key in keys)
for (const key in keys)
{
let award = g_awardTracker[keys[key]];
let rule = g_awards[award.sponsor].awards[award.name].rule;
@ -1012,7 +1014,7 @@ function wantedChanged(element)
{
g_rosterSettings.columns[t] = true;
for (let i = 0; i < g_menu.items.length; ++i)
for (const i in g_menu.items)
{
if (
typeof g_menu.items[i].checked != "undefined" &&
@ -1026,7 +1028,7 @@ function wantedChanged(element)
writeRosterSettings();
g_scriptReport = Object();
for (let callHash in window.opener.g_callRoster)
for (const callHash in window.opener.g_callRoster)
{
window.opener.g_callRoster[callHash].callObj.alerted = false;
}

Wyświetl plik

@ -74,6 +74,7 @@ function prepareRosterSettings()
}
else
{
console.log("Invalid/Unknown huntNeed");
rosterSettings.huntIndex = false;
rosterSettings.workedIndex = false;
rosterSettings.layeredMode = false;

Wyświetl plik

@ -20,7 +20,7 @@ function processRosterHunting(callRoster, rosterSettings, awardTracker)
// so maybe we can move this loop first, and add a check to the filtering loop?
// Second loop, hunting and highlighting
for (let callHash in callRoster)
for (const callHash in callRoster)
{
let entry = callRoster[callHash];
let callObj = entry.callObj;
@ -440,7 +440,7 @@ function processRosterHunting(callRoster, rosterSettings, awardTracker)
{
let counties = window.opener.g_zipToCounty[callObj.zipcode];
let foundHit = false;
for (let cnt in counties)
for (const cnt in counties)
{
let hh = counties[cnt] + workHash;
callObj.cnty = counties[cnt];
@ -481,58 +481,22 @@ function processRosterHunting(callRoster, rosterSettings, awardTracker)
if (potaEnabled && huntPOTA.checked == true && callObj.pota.length > 0)
{
let huntTotal = callObj.pota.length;
let huntFound = 0, layeredFound = 0, workedFound = 0, layeredWorkedFound = 0;
let workedFound = 0;
for (index in callObj.pota)
for (const index in callObj.pota)
{
let hash = callObj.pota[index] + workHashSuffix;
let layeredHash = rosterSettings.layeredMode && (callObj.pota[index] + layeredHashSuffix)
let hash = g_dayAsString + callsign + callObj.pota[index] + (rosterSettings.layeredMode ? layeredHashSuffix : workHashSuffix);
// if (rosterSettings.huntIndex && hash in rosterSettings.huntIndex.pota) layeredFound++;
// if (rosterSettings.layeredMode && layeredHash in rosterSettings.huntIndex.pota) layeredFound++;
// if (rosterSettings.workedIndex && hash in rosterSettings.workedIndex.pota) workedFound++;
// if (rosterSettings.layeredMode && layeredHash in rosterSettings.workedIndex.pota) layeredWorkedFound++;
if (rosterSettings.workedIndex && hash in rosterSettings.workedIndex.pota) workedFound++;
}
if (huntFound != huntTotal)
if (workedFound != huntTotal)
{
shouldAlert = true;
callObj.reason.push("pota");
if (rosterSettings.workedIndex && workedFound == huntTotal)
{
if (rosterSettings.layeredMode && layeredFound == huntTotal)
{
callObj.hunting.pota = "worked-and-mixed";
potaConf = `${layeredUnconf}${pota}${layeredUnconfAlpha};`;
potaBg = `${potaBg}${layeredInversionAlpha}`;
pota = bold;
}
else
{
callObj.hunting.pota = "worked";
potaConf = `${unconf}${pota}${inversionAlpha};`;
}
}
else
{
if (rosterSettings.layeredMode && layeredFound == huntTotal)
{
callObj.hunting.pota = "mixed";
potaBg = `${pota}${layeredAlpha};`;
pota = bold;
}
else if (rosterSettings.layeredMode && layeredWorkedFound == huntTotal)
{
callObj.hunting.pota = "mixed-worked";
potaConf = `${unconf}${pota}${layeredAlpha};`;
}
else
{
callObj.hunting.pota = "hunted";
potaBg = `${pota}${inversionAlpha};`;
pota = bold;
}
}
callObj.hunting.pota = "hunted";
potaBg = `${pota}${inversionAlpha};`;
pota = bold;
}
}
@ -542,7 +506,7 @@ function processRosterHunting(callRoster, rosterSettings, awardTracker)
let huntTotal = callObj.cqza.length;
let huntFound = 0, layeredFound = 0, workedFound = 0, layeredWorkedFound = 0, marathonFound = 0;
for (index in callObj.cqza)
for (const index in callObj.cqza)
{
let hash = callObj.cqza[index] + workHashSuffix;
let layeredHash = rosterSettings.layeredMode && (callObj.cqza[index] + layeredHashSuffix);
@ -600,7 +564,7 @@ function processRosterHunting(callRoster, rosterSettings, awardTracker)
}
}
callObj.cqzSuffix = null
callObj.cqzSuffix = null;
if (huntMarathon.checked && callObj.hunting.cqz != "hunted" && callObj.hunting.cqz != "worked")
{
if (marathonFound != huntTotal)
@ -624,7 +588,7 @@ function processRosterHunting(callRoster, rosterSettings, awardTracker)
let huntTotal = callObj.ituza.length;
let huntFound = 0, layeredFound = 0, workedFound = 0, layeredWorkedFound = 0;
for (index in callObj.ituza)
for (const index in callObj.ituza)
{
let hash = callObj.ituza[index] + workHashSuffix;
let layeredHash = rosterSettings.layeredMode && (callObj.ituza[index] + layeredHashSuffix)