kopia lustrzana https://gitlab.com/gridtracker.org/gridtracker
Squashed commits '${title}'
rodzic
e71e5c76c3
commit
a079c295f6
|
@ -1,3 +1,12 @@
|
||||||
|
gridtracker (1.22.1226) unstable; urgency=low
|
||||||
|
- Fixed lightning strikes not showing on map
|
||||||
|
- Fixed distance in status panel
|
||||||
|
- Fixed chat window text entry
|
||||||
|
- Fixed Logbook of The World loading
|
||||||
|
- No longer clear data on new versions
|
||||||
|
- More code clean up
|
||||||
|
-- Tag Loomis <n0ttl@gridtracker.org> Mon, 26 Dec 2022 00:00:00 -0000
|
||||||
|
|
||||||
gridtracker (1.22.1204) unstable; urgency=low
|
gridtracker (1.22.1204) unstable; urgency=low
|
||||||
- Fixed CPU usage issue with messaging
|
- Fixed CPU usage issue with messaging
|
||||||
- Fixed Logging -> Local File(s) not showing files selected
|
- Fixed Logging -> Local File(s) not showing files selected
|
||||||
|
|
|
@ -40,6 +40,13 @@ DESTDIR=${RPM_BUILD_ROOT} make clean
|
||||||
%license %{_docdir}/%{name}/
|
%license %{_docdir}/%{name}/
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Dec 26 2022 Tag Loomis <n0ttl@gridtracker.org> - 1.22.1226-1
|
||||||
|
- Fixed lightning strikes not showing on map
|
||||||
|
- Fixed distance in status panel
|
||||||
|
- Fixed chat window text entry
|
||||||
|
- Fixed Logbook of The World loading
|
||||||
|
- No longer clear data on new versions
|
||||||
|
- More code clean up
|
||||||
* Sun Dec 04 2022 Tag Loomis <n0ttl@gridtracker.org> - 1.22.1204-1
|
* Sun Dec 04 2022 Tag Loomis <n0ttl@gridtracker.org> - 1.22.1204-1
|
||||||
- Fixed CPU usage issue with messaging
|
- Fixed CPU usage issue with messaging
|
||||||
- Fixed Logging -> Local File(s) not showing files selected
|
- Fixed Logging -> Local File(s) not showing files selected
|
||||||
|
|
|
@ -83,7 +83,7 @@
|
||||||
if (event.key === "Enter")
|
if (event.key === "Enter")
|
||||||
{
|
{
|
||||||
// Do work
|
// Do work
|
||||||
var msg = messageInput.value.trim();
|
var msg = messageInput.value.replace(/[\n\r]/g, '');
|
||||||
if (msg.length > 0 && g_currentId != 0 && g_currentId in window.opener.g_gtFlagPins && window.opener.g_gtFlagPins[g_currentId].canmsg == true)
|
if (msg.length > 0 && g_currentId != 0 && g_currentId in window.opener.g_gtFlagPins && window.opener.g_gtFlagPins[g_currentId].canmsg == true)
|
||||||
{
|
{
|
||||||
var worker = "";
|
var worker = "";
|
||||||
|
|
|
@ -52,15 +52,14 @@
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
});
|
});
|
||||||
|
|
||||||
function lockNewWindows() {
|
function lockNewWindows()
|
||||||
if (typeof nw != "undefined") {
|
{
|
||||||
var gui = require("nw.gui");
|
var gui = require("nw.gui");
|
||||||
var win = gui.Window.get();
|
var win = gui.Window.get();
|
||||||
win.on("new-win-policy", function (frame, url, policy) {
|
win.on("new-win-policy", function (frame, url, policy) {
|
||||||
gui.Shell.openExternal(url);
|
gui.Shell.openExternal(url);
|
||||||
policy.ignore();
|
policy.ignore();
|
||||||
});
|
});
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function timeNowSec() {
|
function timeNowSec() {
|
||||||
|
|
|
@ -37,34 +37,39 @@
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
function startLookup(call, grid) {
|
function startLookup(call, grid)
|
||||||
|
{
|
||||||
window.opener.startLookup(call, grid);
|
window.opener.startLookup(call, grid);
|
||||||
window.opener.focus();
|
window.opener.focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
function lockNewWindows() {
|
function lockNewWindows()
|
||||||
if (typeof nw != "undefined") {
|
{
|
||||||
var gui = require("nw.gui");
|
var gui = require("nw.gui");
|
||||||
var win = gui.Window.get();
|
var win = gui.Window.get();
|
||||||
win.on("new-win-policy", function (frame, url, policy) {
|
win.on("new-win-policy", function (frame, url, policy)
|
||||||
gui.Shell.openExternal(url);
|
{
|
||||||
policy.ignore();
|
gui.Shell.openExternal(url);
|
||||||
});
|
policy.ignore();
|
||||||
}
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function init() {
|
function init()
|
||||||
|
{
|
||||||
lockNewWindows();
|
lockNewWindows();
|
||||||
|
|
||||||
document.addEventListener("keydown", onMyKeyDown, false);
|
document.addEventListener("keydown", onMyKeyDown, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
function onMyKeyDown(event) {
|
function onMyKeyDown(event)
|
||||||
|
{
|
||||||
window.opener.onMyKeyDown(event);
|
window.opener.onMyKeyDown(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
document.oncontextmenu = function (event) {
|
document.oncontextmenu = function (event)
|
||||||
if (process.versions["nw-flavor"] != "sdk") {
|
{
|
||||||
|
if (process.versions["nw-flavor"] != "sdk")
|
||||||
|
{
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Plik binarny nie jest wyświetlany.
Plik binarny nie jest wyświetlany.
|
@ -21,7 +21,7 @@ function dropHandler(ev)
|
||||||
{
|
{
|
||||||
// If dropped items aren't files, reject them
|
// If dropped items aren't files, reject them
|
||||||
Entry = ev.dataTransfer.items[i].webkitGetAsEntry();
|
Entry = ev.dataTransfer.items[i].webkitGetAsEntry();
|
||||||
if (Entry && typeof Entry.isFile != "undefined" && Entry.isFile == true)
|
if (Entry && "isFile" in Entry && Entry.isFile === true)
|
||||||
{
|
{
|
||||||
var filename = ev.dataTransfer.items[i].getAsFile().path;
|
var filename = ev.dataTransfer.items[i].getAsFile().path;
|
||||||
var test = filename.toLowerCase();
|
var test = filename.toLowerCase();
|
||||||
|
@ -121,7 +121,11 @@ function onAdiLoadComplete(adiBuffer, saveAdifFile, adifFileName, newFile)
|
||||||
var dLastLOTW_QSO = Date.parse(g_adifLogSettings.lastFetch.lotw_qso);
|
var dLastLOTW_QSO = Date.parse(g_adifLogSettings.lastFetch.lotw_qso);
|
||||||
if ((isNaN(dRXQSO) == false) && (isNaN(dLastLOTW_QSO) == false) && (dRXQSO > dLastLOTW_QSO))
|
if ((isNaN(dRXQSO) == false) && (isNaN(dLastLOTW_QSO) == false) && (dRXQSO > dLastLOTW_QSO))
|
||||||
{
|
{
|
||||||
g_adifLogSettings.lastFetch.lotw_qso = appLoTW_RXQSO;
|
// add a second
|
||||||
|
dRXQSO += 1000;
|
||||||
|
var date = new Date(dRXQSO); // create Date object
|
||||||
|
var timestring = date.toISOString();
|
||||||
|
g_adifLogSettings.lastFetch.lotw_qso = timestring.slice(0, 10) + " " + timestring.slice(11, 19);
|
||||||
lotwTimestampUpdated = true;
|
lotwTimestampUpdated = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -133,7 +137,11 @@ function onAdiLoadComplete(adiBuffer, saveAdifFile, adifFileName, newFile)
|
||||||
var dLastLOTW_QSL = Date.parse(g_adifLogSettings.lastFetch.lotw_qsl);
|
var dLastLOTW_QSL = Date.parse(g_adifLogSettings.lastFetch.lotw_qsl);
|
||||||
if ((isNaN(dRXQSL) == false) && (isNaN(dLastLOTW_QSL) == false) && (dRXQSL > dLastLOTW_QSL))
|
if ((isNaN(dRXQSL) == false) && (isNaN(dLastLOTW_QSL) == false) && (dRXQSL > dLastLOTW_QSL))
|
||||||
{
|
{
|
||||||
g_adifLogSettings.lastFetch.lotw_qsl = appLoTW_RXQSL;
|
// add a second
|
||||||
|
dRXQSL += 1000;
|
||||||
|
var date = new Date(dRXQSL); // create Date object
|
||||||
|
var timestring = date.toISOString();
|
||||||
|
g_adifLogSettings.lastFetch.lotw_qsl = timestring.slice(0, 10) + " " + timestring.slice(11, 19);
|
||||||
lotwTimestampUpdated = true;
|
lotwTimestampUpdated = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -602,44 +610,46 @@ function lotwCallback(buffer, flag)
|
||||||
var rawAdiBuffer = String(buffer);
|
var rawAdiBuffer = String(buffer);
|
||||||
if (rawAdiBuffer.indexOf("password incorrect") > -1)
|
if (rawAdiBuffer.indexOf("password incorrect") > -1)
|
||||||
{
|
{
|
||||||
if (flag) lotwTestResult.innerHTML = "Invalid";
|
if (flag)
|
||||||
|
{
|
||||||
|
lotwTestResult.innerHTML = "Invalid";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (flag) lotwTestResult.innerHTML = "Passed";
|
if (flag)
|
||||||
|
{
|
||||||
|
lotwTestResult.innerHTML = "Passed";
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var shouldAppend = false;
|
var shouldAppend = true;
|
||||||
|
var adiFileName = "LogbookOfTheWorld.adif";
|
||||||
g_fromDirectCallNoFileDialog = true;
|
g_fromDirectCallNoFileDialog = true;
|
||||||
|
|
||||||
// Extract header showing last fetched date from call
|
// Extract header showing type of call
|
||||||
var lotwQSHeader = rawAdiBuffer.match(/^<APP_LoTW_LAST(QSL|QSORX):\d+>(\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2}:\d{2})/m);
|
// var lotwQSHeader = rawAdiBuffer.match(/^<APP_LoTW_LAST(QSL|QSORX):\d+>(\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2}:\d{2})/m);
|
||||||
if (lotwQSHeader !== null)
|
|
||||||
|
if (rawAdiBuffer.indexOf("QSL ONLY: YES") == -1)
|
||||||
{
|
{
|
||||||
if (lotwQSHeader[1].toUpperCase() == "QSORX")
|
// This is the QSO download, fire the QSL download now
|
||||||
{
|
nodeTimers.setTimeout(grabLoTWQSL, 500);
|
||||||
g_adifLogSettings.lastFetch.lotw_qso = lotwQSHeader[2]
|
|
||||||
}
|
|
||||||
else if (lotwQSHeader[1].toUpperCase() == "QSL")
|
|
||||||
{
|
|
||||||
g_adifLogSettings.lastFetch.lotw_qsl = lotwQSHeader[2];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
rawAdiBuffer = cleanAndPrepADIF(
|
rawAdiBuffer = cleanAndPrepADIF(
|
||||||
"lotw.adif",
|
adiFileName,
|
||||||
rawAdiBuffer,
|
rawAdiBuffer,
|
||||||
true,
|
true,
|
||||||
shouldAppend
|
shouldAppend
|
||||||
);
|
);
|
||||||
|
|
||||||
rawAdiBuffer = tryToWriteAdifToDocFolder(
|
rawAdiBuffer = tryToWriteAdifToDocFolder(
|
||||||
"lotw.adif",
|
adiFileName,
|
||||||
rawAdiBuffer,
|
rawAdiBuffer,
|
||||||
shouldAppend
|
shouldAppend
|
||||||
);
|
);
|
||||||
|
|
||||||
onAdiLoadComplete(rawAdiBuffer, true, "lotw.adif", true);
|
onAdiLoadComplete(rawAdiBuffer, true, adiFileName, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -705,8 +715,8 @@ function grabLOtWLog(test)
|
||||||
|
|
||||||
if (test == false)
|
if (test == false)
|
||||||
{
|
{
|
||||||
|
loadLoTWLogFile();
|
||||||
nodeTimers.setTimeout(grabLoTWQSO, 500);
|
nodeTimers.setTimeout(grabLoTWQSO, 500);
|
||||||
nodeTimers.setTimeout(grabLoTWQSL, 10000);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -739,9 +749,10 @@ function grabLoTWQSO()
|
||||||
|
|
||||||
function grabLoTWQSL()
|
function grabLoTWQSL()
|
||||||
{
|
{
|
||||||
var dLoTWQSL = Date.parse(dateToISO8601(g_adifLogSettings.lastFetch.lotw_qsl, "Z"));
|
var dLoTWQSL = Date.parse(dateToISO8601(g_adifLogSettings.lastFetch.lotw_qsl, "Z")) / 1000;
|
||||||
var tmpDate = ((new Date().getTime()) - 300);
|
var tmpDate = timeNowSec() - 300;
|
||||||
|
|
||||||
|
// Don't grab if the last QSL was less than 5 minutes ago
|
||||||
if ((g_isGettingLOTW == false) && ((isNaN(dLoTWQSL) == false) && (dLoTWQSL < tmpDate)))
|
if ((g_isGettingLOTW == false) && ((isNaN(dLoTWQSL) == false) && (dLoTWQSL < tmpDate)))
|
||||||
{
|
{
|
||||||
lastQSLDateString = "&qso_qslsince=" + g_adifLogSettings.lastFetch.lotw_qsl;
|
lastQSLDateString = "&qso_qslsince=" + g_adifLogSettings.lastFetch.lotw_qsl;
|
||||||
|
@ -760,31 +771,9 @@ function grabLoTWQSL()
|
||||||
"g_isGettingLOTW",
|
"g_isGettingLOTW",
|
||||||
120000
|
120000
|
||||||
);
|
);
|
||||||
|
|
||||||
// Fetch QSLs
|
|
||||||
nodeTimers.setTimeout(downloadLoTWQSL, 10000);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function downloadLoTWQSL()
|
|
||||||
{
|
|
||||||
getABuffer(
|
|
||||||
"https://lotw.arrl.org/lotwuser/lotwreport.adi?login=" +
|
|
||||||
lotwLogin.value +
|
|
||||||
"&password=" +
|
|
||||||
encodeURIComponent(lotwPassword.value) +
|
|
||||||
"&qso_query=1&qso_qsl=yes&qso_qsldetail=yes&qso_withown=yes" +
|
|
||||||
lastQSLDateString,
|
|
||||||
lotwCallback,
|
|
||||||
null,
|
|
||||||
"https",
|
|
||||||
443,
|
|
||||||
lotwLogImg,
|
|
||||||
"g_isGettingLOTW",
|
|
||||||
120000
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
function qrzCallback(buffer, flag)
|
function qrzCallback(buffer, flag)
|
||||||
{
|
{
|
||||||
if (buffer.indexOf("invalid api key") > -1)
|
if (buffer.indexOf("invalid api key") > -1)
|
||||||
|
@ -1134,15 +1123,29 @@ function loadGtQSOLogFile()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getFilesizeInBytes(filename)
|
||||||
|
{
|
||||||
|
var fs = require("fs");
|
||||||
|
var stats = fs.statSync(filename);
|
||||||
|
var fileSizeInBytes = stats.size;
|
||||||
|
return fileSizeInBytes;
|
||||||
|
}
|
||||||
|
|
||||||
function loadLoTWLogFile()
|
function loadLoTWLogFile()
|
||||||
{
|
{
|
||||||
var fs = require("fs");
|
var fs = require("fs");
|
||||||
|
|
||||||
if (fs.existsSync(g_LoTWLogFile))
|
if (fs.existsSync(g_LoTWLogFile) && getFilesizeInBytes(g_LoTWLogFile) > 0)
|
||||||
{
|
{
|
||||||
g_fromDirectCallNoFileDialog = true;
|
g_fromDirectCallNoFileDialog = true;
|
||||||
onAdiLoadComplete(fs.readFileSync(g_LoTWLogFile), false);
|
onAdiLoadComplete(fs.readFileSync(g_LoTWLogFile), false);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// We have no history, so our dates are not valid any more
|
||||||
|
g_adifLogSettings.lastFetch.lotw_qso = "1940-01-01";
|
||||||
|
g_adifLogSettings.lastFetch.lotw_qsl = "1940-01-01";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadWsjtLogFile()
|
function loadWsjtLogFile()
|
||||||
|
@ -1436,7 +1439,6 @@ function startupAdifLoadCheck()
|
||||||
|
|
||||||
if (loadLOTWCheckBox.checked == true)
|
if (loadLOTWCheckBox.checked == true)
|
||||||
{
|
{
|
||||||
loadLoTWLogFile();
|
|
||||||
grabLOtWLog(false);
|
grabLOtWLog(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2620,25 +2622,22 @@ function sendQrzLogEntry(report)
|
||||||
|
|
||||||
if (logQRZqsoCheckBox.checked == true && ValidateQrzApi(qrzApiKey))
|
if (logQRZqsoCheckBox.checked == true && ValidateQrzApi(qrzApiKey))
|
||||||
{
|
{
|
||||||
if (typeof nw != "undefined")
|
var postData = {
|
||||||
{
|
KEY: qrzApiKey.value,
|
||||||
var postData = {
|
ACTION: "INSERT",
|
||||||
KEY: qrzApiKey.value,
|
ADIF: report
|
||||||
ACTION: "INSERT",
|
};
|
||||||
ADIF: report
|
getPostBuffer(
|
||||||
};
|
"https://logbook.qrz.com/api",
|
||||||
getPostBuffer(
|
qrzSendLogResult,
|
||||||
"https://logbook.qrz.com/api",
|
null,
|
||||||
qrzSendLogResult,
|
"https",
|
||||||
null,
|
443,
|
||||||
"https",
|
postData,
|
||||||
443,
|
30000,
|
||||||
postData,
|
postRetryErrorCallaback,
|
||||||
30000,
|
"QRZ.com"
|
||||||
postRetryErrorCallaback,
|
);
|
||||||
"QRZ.com"
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2684,21 +2683,18 @@ function sendCloudlogEntry(report)
|
||||||
|
|
||||||
if (logCloudlogQSOCheckBox.checked == true)
|
if (logCloudlogQSOCheckBox.checked == true)
|
||||||
{
|
{
|
||||||
if (typeof nw != "undefined")
|
var postData = { key: CloudlogAPI.value, station_profile_id: CloudlogStationProfileID.value, type: "adif", string: report };
|
||||||
{
|
getPostJSONBuffer(
|
||||||
var postData = { key: CloudlogAPI.value, station_profile_id: CloudlogStationProfileID.value, type: "adif", string: report };
|
CloudlogURL.value,
|
||||||
getPostJSONBuffer(
|
CloudlogSendLogResult,
|
||||||
CloudlogURL.value,
|
null,
|
||||||
CloudlogSendLogResult,
|
"https",
|
||||||
null,
|
80,
|
||||||
"https",
|
postData,
|
||||||
80,
|
10000,
|
||||||
postData,
|
CloudUrlErrorCallback,
|
||||||
10000,
|
"Failed to Send"
|
||||||
CloudUrlErrorCallback,
|
);
|
||||||
"Failed to Send"
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2758,21 +2754,18 @@ function hrdCredentialTest(test)
|
||||||
{
|
{
|
||||||
HRDLogTestResult.innerHTML = "Testing";
|
HRDLogTestResult.innerHTML = "Testing";
|
||||||
|
|
||||||
if (typeof nw != "undefined")
|
var postData = {
|
||||||
{
|
Callsign: HRDLOGCallsign.value,
|
||||||
var postData = {
|
Code: HRDLOGUploadCode.value
|
||||||
Callsign: HRDLOGCallsign.value,
|
};
|
||||||
Code: HRDLOGUploadCode.value
|
getPostBuffer(
|
||||||
};
|
"https://www.hrdlog.net/NewEntry.aspx",
|
||||||
getPostBuffer(
|
hrdSendLogResult,
|
||||||
"https://www.hrdlog.net/NewEntry.aspx",
|
test,
|
||||||
hrdSendLogResult,
|
"https",
|
||||||
test,
|
443,
|
||||||
"https",
|
postData
|
||||||
443,
|
);
|
||||||
postData
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2782,21 +2775,18 @@ function ClublogTest(test)
|
||||||
{
|
{
|
||||||
CloudlogTestResult.innerHTML = "Testing";
|
CloudlogTestResult.innerHTML = "Testing";
|
||||||
|
|
||||||
if (typeof nw != "undefined")
|
var postData = { key: CloudlogAPI.value, type: "adif", string: "<eor>" };
|
||||||
{
|
getPostJSONBuffer(
|
||||||
var postData = { key: CloudlogAPI.value, type: "adif", string: "<eor>" };
|
CloudlogURL.value,
|
||||||
getPostJSONBuffer(
|
CloudlogSendLogResult,
|
||||||
CloudlogURL.value,
|
test,
|
||||||
CloudlogSendLogResult,
|
"https",
|
||||||
test,
|
80,
|
||||||
"https",
|
postData,
|
||||||
80,
|
10000,
|
||||||
postData,
|
CloudUrlErrorCallback,
|
||||||
10000,
|
"No Response<br/>or</br>Timeout"
|
||||||
CloudUrlErrorCallback,
|
);
|
||||||
"No Response<br/>or</br>Timeout"
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -95,21 +95,30 @@ function lotwLoadCallsigns()
|
||||||
g_lotwLoadTimer = nodeTimers.setTimeout(lotwDownload, lotwWhenTimer * 1000);
|
g_lotwLoadTimer = nodeTimers.setTimeout(lotwDownload, lotwWhenTimer * 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!fs.existsSync(g_lotwFile))
|
try
|
||||||
{
|
{
|
||||||
g_callsignLookups.lotwLastUpdate = 0;
|
if (!fs.existsSync(g_lotwFile))
|
||||||
}
|
{
|
||||||
else
|
g_callsignLookups.lotwLastUpdate = 0;
|
||||||
{
|
}
|
||||||
var data = fs.readFileSync(g_lotwFile);
|
else
|
||||||
g_lotwCallsigns = JSON.parse(data);
|
{
|
||||||
if (Object.keys(g_lotwCallsigns).length < 100)
|
var data = fs.readFileSync(g_lotwFile);
|
||||||
|
g_lotwCallsigns = JSON.parse(data);
|
||||||
|
if (Object.keys(g_lotwCallsigns).length < 100)
|
||||||
|
{
|
||||||
|
lotwDownload();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (g_callsignLookups.lotwLastUpdate == 0)
|
||||||
{
|
{
|
||||||
lotwDownload();
|
lotwDownload();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (g_callsignLookups.lotwLastUpdate == 0)
|
catch (e)
|
||||||
{
|
{
|
||||||
|
console.log(e);
|
||||||
|
g_callsignLookups.lotwLastUpdate = 0;
|
||||||
lotwDownload();
|
lotwDownload();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -221,17 +230,25 @@ function oqrsLoadCallsigns()
|
||||||
g_oqrsLoadTimer = nodeTimers.setTimeout(oqrsDownload, oqrsWhenTimer * 1000);
|
g_oqrsLoadTimer = nodeTimers.setTimeout(oqrsDownload, oqrsWhenTimer * 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!fs.existsSync(g_oqrsFile))
|
try
|
||||||
|
{
|
||||||
|
if (!fs.existsSync(g_oqrsFile))
|
||||||
|
{
|
||||||
|
g_callsignLookups.oqrsLastUpdate = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var data = fs.readFileSync(g_oqrsFile);
|
||||||
|
g_oqrsCallsigns = JSON.parse(data);
|
||||||
|
}
|
||||||
|
if (g_callsignLookups.oqrsLastUpdate == 0)
|
||||||
|
{
|
||||||
|
oqrsDownload();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (e)
|
||||||
{
|
{
|
||||||
g_callsignLookups.oqrsLastUpdate = 0;
|
g_callsignLookups.oqrsLastUpdate = 0;
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var data = fs.readFileSync(g_oqrsFile);
|
|
||||||
g_oqrsCallsigns = JSON.parse(data);
|
|
||||||
}
|
|
||||||
if (g_callsignLookups.oqrsLastUpdate == 0)
|
|
||||||
{
|
|
||||||
oqrsDownload();
|
oqrsDownload();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -316,17 +333,26 @@ function eqslLoadCallsigns()
|
||||||
g_eqslLoadTimer = nodeTimers.setTimeout(eqslDownload, eqslWhenTimer * 1000);
|
g_eqslLoadTimer = nodeTimers.setTimeout(eqslDownload, eqslWhenTimer * 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!fs.existsSync(g_eqslFile))
|
try
|
||||||
{
|
{
|
||||||
|
if (!fs.existsSync(g_eqslFile))
|
||||||
|
{
|
||||||
|
g_callsignLookups.eqslLastUpdate = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var data = fs.readFileSync(g_eqslFile);
|
||||||
|
g_eqslCallsigns = JSON.parse(data);
|
||||||
|
}
|
||||||
|
if (g_callsignLookups.eqslLastUpdate == 0)
|
||||||
|
{
|
||||||
|
eqslDownload();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (e)
|
||||||
|
{
|
||||||
|
console.log(e);
|
||||||
g_callsignLookups.eqslLastUpdate = 0;
|
g_callsignLookups.eqslLastUpdate = 0;
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var data = fs.readFileSync(g_eqslFile);
|
|
||||||
g_eqslCallsigns = JSON.parse(data);
|
|
||||||
}
|
|
||||||
if (g_callsignLookups.eqslLastUpdate == 0)
|
|
||||||
{
|
|
||||||
eqslDownload();
|
eqslDownload();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -435,10 +461,7 @@ function updateQSO()
|
||||||
var details = g_QSOhash[hash];
|
var details = g_QSOhash[hash];
|
||||||
var lookupCall = false;
|
var lookupCall = false;
|
||||||
|
|
||||||
if (
|
if ((details.cnty == null || details.state == null) && isKnownCallsignDXCC(details.dxcc))
|
||||||
(details.cnty == null || details.state == null) &&
|
|
||||||
isKnownCallsignDXCC(details.dxcc)
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
// Do County Lookup
|
// Do County Lookup
|
||||||
lookupCall = true;
|
lookupCall = true;
|
||||||
|
@ -450,9 +473,14 @@ function updateQSO()
|
||||||
if (details.cnty.indexOf(",") == -1)
|
if (details.cnty.indexOf(",") == -1)
|
||||||
{
|
{
|
||||||
if (!(details.state + "," + details.cnty in g_cntyToCounty))
|
if (!(details.state + "," + details.cnty in g_cntyToCounty))
|
||||||
{ lookupCall = true; }
|
{
|
||||||
|
lookupCall = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
lookupCall = true;
|
||||||
}
|
}
|
||||||
else lookupCall = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (lookupCall)
|
if (lookupCall)
|
||||||
|
@ -470,13 +498,10 @@ function updateCallsignCount()
|
||||||
{
|
{
|
||||||
g_ulsDatabase.transaction(function (tx)
|
g_ulsDatabase.transaction(function (tx)
|
||||||
{
|
{
|
||||||
tx.executeSql(
|
tx.executeSql("SELECT count(*) as cnt FROM calls", [],
|
||||||
"SELECT count(*) as cnt FROM calls",
|
|
||||||
[],
|
|
||||||
function (tx, results)
|
function (tx, results)
|
||||||
{
|
{
|
||||||
var len = results.rows.length,
|
var len = results.rows.length, i;
|
||||||
i;
|
|
||||||
if (len == 1)
|
if (len == 1)
|
||||||
{
|
{
|
||||||
g_ulsCallsignsCount = results.rows[0].cnt;
|
g_ulsCallsignsCount = results.rows[0].cnt;
|
||||||
|
@ -500,9 +525,7 @@ function ulsSettingsDisplay()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ulsUpdatedTd.innerHTML = userTimeString(
|
ulsUpdatedTd.innerHTML = userTimeString(g_callsignLookups.ulsLastUpdate * 1000);
|
||||||
g_callsignLookups.ulsLastUpdate * 1000
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!g_callsignLookups.ulsUseEnable)
|
if (!g_callsignLookups.ulsUseEnable)
|
||||||
|
@ -547,15 +570,7 @@ function ulsDownload()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getChunkedBuffer(
|
function getChunkedBuffer(file_url, callback, flag, mode, port, cookie, errorHandler)
|
||||||
file_url,
|
|
||||||
callback,
|
|
||||||
flag,
|
|
||||||
mode,
|
|
||||||
port,
|
|
||||||
cookie,
|
|
||||||
errorHandler
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
var url = require("url");
|
var url = require("url");
|
||||||
var http = require(mode);
|
var http = require(mode);
|
||||||
|
@ -588,7 +603,9 @@ function getChunkedBuffer(
|
||||||
var fread = 0;
|
var fread = 0;
|
||||||
var cookies = null;
|
var cookies = null;
|
||||||
if (typeof res.headers["set-cookie"] != "undefined")
|
if (typeof res.headers["set-cookie"] != "undefined")
|
||||||
{ cookies = res.headers["set-cookie"]; }
|
{
|
||||||
|
cookies = res.headers["set-cookie"];
|
||||||
|
}
|
||||||
res
|
res
|
||||||
.on("data", function (data)
|
.on("data", function (data)
|
||||||
{
|
{
|
||||||
|
@ -621,9 +638,7 @@ var g_ulsDatabase = openDatabase(
|
||||||
|
|
||||||
g_ulsDatabase.transaction(function (tx)
|
g_ulsDatabase.transaction(function (tx)
|
||||||
{
|
{
|
||||||
tx.executeSql(
|
tx.executeSql("CREATE TABLE IF NOT EXISTS calls (callsign TEXT PRIMARY KEY, zip, state)");
|
||||||
"CREATE TABLE IF NOT EXISTS calls ( callsign TEXT PRIMARY KEY, zip, state)"
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
function resetULSDatabase()
|
function resetULSDatabase()
|
||||||
|
@ -658,7 +673,10 @@ function processulsCallsigns(data, flag, cookies, starting, finished)
|
||||||
{
|
{
|
||||||
if (starting == true)
|
if (starting == true)
|
||||||
{
|
{
|
||||||
if (g_ulsLoadTimer != null) nodeTimers.clearTimeout(g_ulsLoadTimer);
|
if (g_ulsLoadTimer != null)
|
||||||
|
{
|
||||||
|
nodeTimers.clearTimeout(g_ulsLoadTimer);
|
||||||
|
}
|
||||||
g_ulsLoadTimer = null;
|
g_ulsLoadTimer = null;
|
||||||
g_ulsWhenDate = 0;
|
g_ulsWhenDate = 0;
|
||||||
g_ulsCallsignsCount = 0;
|
g_ulsCallsignsCount = 0;
|
||||||
|
@ -670,17 +688,7 @@ function processulsCallsigns(data, flag, cookies, starting, finished)
|
||||||
if (lines[x].length)
|
if (lines[x].length)
|
||||||
{
|
{
|
||||||
++g_ulsCallsignsCount;
|
++g_ulsCallsignsCount;
|
||||||
tx.executeSql(
|
tx.executeSql("INSERT INTO calls (rowid, callsign, zip, state) VALUES (" + g_ulsCallsignsCount + ",\"" + lines[x].substr(7) + "\",\"" + lines[x].substr(0, 5) + "\",\"" + lines[x].substr(5, 2) + "\")");
|
||||||
"INSERT INTO calls (rowid, callsign, zip, state) VALUES (" +
|
|
||||||
g_ulsCallsignsCount +
|
|
||||||
",\"" +
|
|
||||||
lines[x].substr(7) +
|
|
||||||
"\",\"" +
|
|
||||||
lines[x].substr(0, 5) +
|
|
||||||
"\",\"" +
|
|
||||||
lines[x].substr(5, 2) +
|
|
||||||
"\")"
|
|
||||||
);
|
|
||||||
if (g_ulsCallsignsCount % 10000 == 0)
|
if (g_ulsCallsignsCount % 10000 == 0)
|
||||||
{
|
{
|
||||||
tx.executeSql(
|
tx.executeSql(
|
||||||
|
@ -688,8 +696,7 @@ function processulsCallsigns(data, flag, cookies, starting, finished)
|
||||||
[],
|
[],
|
||||||
function (rx, results)
|
function (rx, results)
|
||||||
{
|
{
|
||||||
var len = results.rows.length,
|
var len = results.rows.length;
|
||||||
i;
|
|
||||||
if (len == 1)
|
if (len == 1)
|
||||||
{
|
{
|
||||||
ulsCountTd.innerHTML = results.rows[0].cnt;
|
ulsCountTd.innerHTML = results.rows[0].cnt;
|
||||||
|
@ -708,7 +715,10 @@ function processulsCallsigns(data, flag, cookies, starting, finished)
|
||||||
{
|
{
|
||||||
var now = timeNowSec();
|
var now = timeNowSec();
|
||||||
|
|
||||||
if (g_ulsLoadTimer != null) nodeTimers.clearTimeout(g_ulsLoadTimer);
|
if (g_ulsLoadTimer != null)
|
||||||
|
{
|
||||||
|
nodeTimers.clearTimeout(g_ulsLoadTimer);
|
||||||
|
}
|
||||||
|
|
||||||
var ulsWhenTimer = 86400 * 7;
|
var ulsWhenTimer = 86400 * 7;
|
||||||
g_ulsWhenDate = ulsWhenTimer + now;
|
g_ulsWhenDate = ulsWhenTimer + now;
|
||||||
|
|
|
@ -284,3 +284,38 @@ var def_pstrotatorSettings = {
|
||||||
port: 12000,
|
port: 12000,
|
||||||
ip: "127.0.0.1"
|
ip: "127.0.0.1"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var def_qso = {
|
||||||
|
band: "",
|
||||||
|
cnty: null,
|
||||||
|
confirmed: false,
|
||||||
|
cont: null,
|
||||||
|
cqz: "",
|
||||||
|
DEcall: "",
|
||||||
|
delta: -1,
|
||||||
|
digital: false,
|
||||||
|
DXcall: "",
|
||||||
|
dxcc: -1,
|
||||||
|
grid: "",
|
||||||
|
IOTA: "",
|
||||||
|
ituz: "",
|
||||||
|
mode: "",
|
||||||
|
msg: "-",
|
||||||
|
phone: false,
|
||||||
|
pota: null,
|
||||||
|
propMode: "",
|
||||||
|
px: null,
|
||||||
|
qso: true,
|
||||||
|
qual: false,
|
||||||
|
rect: null,
|
||||||
|
RSTrecv: "",
|
||||||
|
RSTsent: "",
|
||||||
|
satName: "",
|
||||||
|
state: null,
|
||||||
|
time: 0,
|
||||||
|
vucc_grids: [],
|
||||||
|
worked: false,
|
||||||
|
wspr: null,
|
||||||
|
zipcode: null,
|
||||||
|
zone: null
|
||||||
|
};
|
||||||
|
|
|
@ -194,7 +194,7 @@ var g_myLon = g_mapSettings.longitude;
|
||||||
function loadDefaultsAndMerge(key, def)
|
function loadDefaultsAndMerge(key, def)
|
||||||
{
|
{
|
||||||
var settings = {};
|
var settings = {};
|
||||||
if (typeof localStorage[key] != "undefined")
|
if (key in localStorage)
|
||||||
{
|
{
|
||||||
settings = JSON.parse(localStorage[key]);
|
settings = JSON.parse(localStorage[key]);
|
||||||
}
|
}
|
||||||
|
@ -213,7 +213,7 @@ function loadDefaultsAndMerge(key, def)
|
||||||
function loadArrayIfExists(key)
|
function loadArrayIfExists(key)
|
||||||
{
|
{
|
||||||
var data = [];
|
var data = [];
|
||||||
if (typeof localStorage[key] != "undefined")
|
if (key in localStorage)
|
||||||
{
|
{
|
||||||
data = JSON.parse(localStorage[key]);
|
data = JSON.parse(localStorage[key]);
|
||||||
}
|
}
|
||||||
|
@ -223,7 +223,7 @@ function loadArrayIfExists(key)
|
||||||
function loadObjectIfExists(key)
|
function loadObjectIfExists(key)
|
||||||
{
|
{
|
||||||
var data = {};
|
var data = {};
|
||||||
if (typeof localStorage[key] != "undefined")
|
if (key in localStorage)
|
||||||
{
|
{
|
||||||
data = JSON.parse(localStorage[key]);
|
data = JSON.parse(localStorage[key]);
|
||||||
}
|
}
|
||||||
|
@ -1105,7 +1105,6 @@ function addDeDx(
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
details.grid = finalGrid;
|
details.grid = finalGrid;
|
||||||
details.grid4 = finalGrid.substr(0, 4);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (finalRSTsent.length > 0) details.RSTsent = finalRSTsent;
|
if (finalRSTsent.length > 0) details.RSTsent = finalRSTsent;
|
||||||
|
@ -1144,6 +1143,7 @@ function addDeDx(
|
||||||
details.px = null;
|
details.px = null;
|
||||||
details.zone = null;
|
details.zone = null;
|
||||||
details.cont = null;
|
details.cont = null;
|
||||||
|
details.cnty = finalCnty;
|
||||||
details.vucc_grids = finalVucc;
|
details.vucc_grids = finalVucc;
|
||||||
details.propMode = finalPropMode;
|
details.propMode = finalPropMode;
|
||||||
details.digital = finalDigital;
|
details.digital = finalDigital;
|
||||||
|
@ -1732,7 +1732,7 @@ function changePathWidth()
|
||||||
|
|
||||||
if (width == 0)
|
if (width == 0)
|
||||||
{
|
{
|
||||||
if (typeof g_flightPaths[i].Arrow != "undefined") { g_layerSources.flight.removeFeature(g_flightPaths[i].Arrow); }
|
if ("Arrow" in g_flightPaths[i]) { g_layerSources.flight.removeFeature(g_flightPaths[i].Arrow); }
|
||||||
g_layerSources.flight.removeFeature(g_flightPaths[i]);
|
g_layerSources.flight.removeFeature(g_flightPaths[i]);
|
||||||
delete g_flightPaths[i];
|
delete g_flightPaths[i];
|
||||||
g_flightPaths[i] = null;
|
g_flightPaths[i] = null;
|
||||||
|
@ -1748,7 +1748,7 @@ function changePathWidth()
|
||||||
featureStyle.setStroke(featureStroke);
|
featureStyle.setStroke(featureStroke);
|
||||||
g_flightPaths[i].setStyle(featureStyle);
|
g_flightPaths[i].setStyle(featureStyle);
|
||||||
|
|
||||||
if (typeof g_flightPaths[i].Arrow != "undefined")
|
if ("Arrow" in g_flightPaths[i])
|
||||||
{
|
{
|
||||||
var stroke = new ol.style.Stroke({
|
var stroke = new ol.style.Stroke({
|
||||||
color: color,
|
color: color,
|
||||||
|
@ -1780,7 +1780,7 @@ function changePathWidth()
|
||||||
featureStyle.setStroke(featureStroke);
|
featureStyle.setStroke(featureStroke);
|
||||||
g_transmitFlightPath.setStyle(featureStyle);
|
g_transmitFlightPath.setStyle(featureStyle);
|
||||||
|
|
||||||
if (typeof g_transmitFlightPath.Arrow != "undefined")
|
if ("Arrow" in g_transmitFlightPath)
|
||||||
{
|
{
|
||||||
var stroke = new ol.style.Stroke({
|
var stroke = new ol.style.Stroke({
|
||||||
color: getQrzPathColor(),
|
color: getQrzPathColor(),
|
||||||
|
@ -5064,9 +5064,7 @@ function clearQSOs()
|
||||||
|
|
||||||
function clearLogFilesAndCounts()
|
function clearLogFilesAndCounts()
|
||||||
{
|
{
|
||||||
tryToDeleteLog("lotw_QSL.adif");
|
tryToDeleteLog("LogbookOfTheWorld.adif");
|
||||||
tryToDeleteLog("lotw_QSO.adif");
|
|
||||||
tryToDeleteLog("lotw.adif");
|
|
||||||
tryToDeleteLog("qrz.adif");
|
tryToDeleteLog("qrz.adif");
|
||||||
tryToDeleteLog("clublog.adif");
|
tryToDeleteLog("clublog.adif");
|
||||||
g_adifLogSettings.downloads = {};
|
g_adifLogSettings.downloads = {};
|
||||||
|
@ -5344,8 +5342,8 @@ function handleStrike(strike)
|
||||||
MyCircle.distance(
|
MyCircle.distance(
|
||||||
g_myLat,
|
g_myLat,
|
||||||
g_myLon,
|
g_myLon,
|
||||||
strikes.a,
|
strike.a,
|
||||||
strikes.o,
|
strike.o,
|
||||||
distanceUnit.value
|
distanceUnit.value
|
||||||
) * MyCircle.validateRadius(distanceUnit.value)
|
) * MyCircle.validateRadius(distanceUnit.value)
|
||||||
).toLocaleString() +
|
).toLocaleString() +
|
||||||
|
@ -6486,7 +6484,7 @@ function handleWsjtxStatus(newMessage)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var LL = squareToCenter(myDXGrid);
|
var LL = squareToCenter(myDXGrid);
|
||||||
localDXDistance.innerHTML = parseInt(MyCircle.distance(g_myLat, g_myLon, LL.a, distanceUnit.value) * MyCircle.validateRadius(distanceUnit.value)) + distanceUnit.value.toLowerCase();
|
localDXDistance.innerHTML = parseInt(MyCircle.distance(g_myLat, g_myLon, LL.a, LL.o, distanceUnit.value) * MyCircle.validateRadius(distanceUnit.value)) + distanceUnit.value.toLowerCase();
|
||||||
localDXAzimuth.innerHTML = parseInt(MyCircle.bearing(g_myLat, g_myLon, LL.a, LL.o)) + "°";
|
localDXAzimuth.innerHTML = parseInt(MyCircle.bearing(g_myLat, g_myLon, LL.a, LL.o)) + "°";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15441,7 +15439,7 @@ function mediaCheck()
|
||||||
g_scriptDir += g_dirSeperator;
|
g_scriptDir += g_dirSeperator;
|
||||||
|
|
||||||
g_qsoLogFile = path.join(g_appData, "GridTracker_QSO.adif");
|
g_qsoLogFile = path.join(g_appData, "GridTracker_QSO.adif");
|
||||||
g_LoTWLogFile = path.join(g_appData, "lotw.adif");
|
g_LoTWLogFile = path.join(g_appData, "LogbookOfTheWorld.adif");
|
||||||
|
|
||||||
logEventMedia.appendChild(newOption("none", "None"));
|
logEventMedia.appendChild(newOption("none", "None"));
|
||||||
msgAlertMedia.appendChild(newOption("none", "Select File"));
|
msgAlertMedia.appendChild(newOption("none", "Select File"));
|
||||||
|
@ -15493,7 +15491,9 @@ function mediaCheck()
|
||||||
g_QSLcount = 0;
|
g_QSLcount = 0;
|
||||||
g_QSOcount = 0;
|
g_QSOcount = 0;
|
||||||
|
|
||||||
// Old log filename, no longer referenced
|
// Old log filenames, no longer referenced
|
||||||
|
tryToDeleteLog("lotw_QSL.adif");
|
||||||
|
tryToDeleteLog("lotw_QSO.adif");
|
||||||
tryToDeleteLog("lotw.adif");
|
tryToDeleteLog("lotw.adif");
|
||||||
|
|
||||||
try
|
try
|
||||||
|
@ -15501,60 +15501,35 @@ function mediaCheck()
|
||||||
if (fs.existsSync(g_NWappData + "internal_qso.json"))
|
if (fs.existsSync(g_NWappData + "internal_qso.json"))
|
||||||
{
|
{
|
||||||
var data = JSON.parse(fs.readFileSync(g_NWappData + "internal_qso.json"));
|
var data = JSON.parse(fs.readFileSync(g_NWappData + "internal_qso.json"));
|
||||||
|
g_tracker = data.tracker;
|
||||||
|
|
||||||
if (gtVersion == data.version)
|
if (typeof g_tracker.worked.px == "undefined")
|
||||||
{
|
{
|
||||||
g_tracker = data.tracker;
|
g_tracker.worked.px = {};
|
||||||
|
g_tracker.confirmed.px = {};
|
||||||
if (typeof g_tracker.worked.px == "undefined")
|
|
||||||
{
|
|
||||||
g_tracker.worked.px = {};
|
|
||||||
g_tracker.confirmed.px = {};
|
|
||||||
}
|
|
||||||
|
|
||||||
if (typeof g_tracker.worked.pota == "undefined")
|
|
||||||
{
|
|
||||||
g_tracker.worked.pota = {};
|
|
||||||
g_tracker.confirmed.pota = {};
|
|
||||||
}
|
|
||||||
|
|
||||||
g_QSOhash = data.g_QSOhash;
|
|
||||||
|
|
||||||
for (var i in g_QSOhash)
|
|
||||||
{
|
|
||||||
if (typeof g_QSOhash[i].px == "undefined" || g_QSOhash[i].px == null)
|
|
||||||
{
|
|
||||||
if (g_QSOhash[i].dxcc != -1)
|
|
||||||
{
|
|
||||||
g_QSOhash[i].px = getWpx(g_QSOhash[i].DEcall);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
g_QSOhash[i].px = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
g_QSOhash[i].pota = null;
|
|
||||||
|
|
||||||
g_QSOcount++;
|
|
||||||
if (g_QSOhash[i].confirmed) g_QSLcount++;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
|
if (typeof g_tracker.worked.pota == "undefined")
|
||||||
{
|
{
|
||||||
clearLogFilesAndCounts();
|
g_tracker.worked.pota = {};
|
||||||
|
g_tracker.confirmed.pota = {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (const i in data.g_QSOhash)
|
||||||
|
{
|
||||||
|
g_QSOhash[i] = fillObjectFromTemplate(def_qso, data.g_QSOhash[i]);
|
||||||
|
g_QSOcount++;
|
||||||
|
if (g_QSOhash[i].confirmed) g_QSLcount++;
|
||||||
|
}
|
||||||
|
|
||||||
fs.unlinkSync(g_NWappData + "internal_qso.json");
|
fs.unlinkSync(g_NWappData + "internal_qso.json");
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
clearLogFilesAndCounts();
|
|
||||||
}
|
|
||||||
loadReceptionReports();
|
loadReceptionReports();
|
||||||
}
|
}
|
||||||
catch (e)
|
catch (e)
|
||||||
{
|
{
|
||||||
clearLogFilesAndCounts();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -15676,39 +15651,28 @@ function pskSpotResults(buffer, flag)
|
||||||
if (oDOM != null)
|
if (oDOM != null)
|
||||||
{
|
{
|
||||||
var json = XML2jsobj(oDOM.documentElement);
|
var json = XML2jsobj(oDOM.documentElement);
|
||||||
if (typeof json.lastSequenceNumber != "undefined")
|
if ("lastSequenceNumber" in json)
|
||||||
{
|
{
|
||||||
g_receptionReports.lastSequenceNumber = json.lastSequenceNumber.value;
|
g_receptionReports.lastSequenceNumber = json.lastSequenceNumber.value;
|
||||||
|
|
||||||
if (typeof json.receptionReport != "undefined")
|
if ("receptionReport" in json)
|
||||||
{
|
{
|
||||||
for (var key in json.receptionReport)
|
for (const key in json.receptionReport)
|
||||||
{
|
{
|
||||||
if (
|
if (typeof json.receptionReport[key].frequency != "undefined" && typeof json.receptionReport[key].sNR != "undefined")
|
||||||
typeof json.receptionReport[key].frequency != "undefined" &&
|
|
||||||
typeof json.receptionReport[key].sNR != "undefined"
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
var report;
|
var report;
|
||||||
var call = json.receptionReport[key].receiverCallsign;
|
var call = json.receptionReport[key].receiverCallsign;
|
||||||
var mode = json.receptionReport[key].mode;
|
var mode = json.receptionReport[key].mode;
|
||||||
var grid = json.receptionReport[key].receiverLocator.substr(0, 6);
|
var grid = json.receptionReport[key].receiverLocator.substr(0, 6);
|
||||||
if (grid.length < 4)
|
if (grid.length < 4) { continue; }
|
||||||
{
|
var band = Number(parseInt(json.receptionReport[key].frequency) / 1000000).formatBand();
|
||||||
continue;
|
|
||||||
}
|
|
||||||
var band = Number(
|
|
||||||
parseInt(json.receptionReport[key].frequency) / 1000000
|
|
||||||
).formatBand();
|
|
||||||
var hash = call + mode + band + grid.substr(0, 4);
|
var hash = call + mode + band + grid.substr(0, 4);
|
||||||
|
|
||||||
if (hash in g_receptionReports.spots)
|
if (hash in g_receptionReports.spots)
|
||||||
{
|
{
|
||||||
report = g_receptionReports.spots[hash];
|
report = g_receptionReports.spots[hash];
|
||||||
if (
|
if (parseInt(json.receptionReport[key].flowStartSeconds) < report.when) { continue; }
|
||||||
parseInt(json.receptionReport[key].flowStartSeconds) <
|
|
||||||
report.when
|
|
||||||
) { continue; }
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -15718,13 +15682,9 @@ function pskSpotResults(buffer, flag)
|
||||||
report.grid = grid.toUpperCase();
|
report.grid = grid.toUpperCase();
|
||||||
report.mode = mode;
|
report.mode = mode;
|
||||||
}
|
}
|
||||||
if (
|
if (typeof json.receptionReport[key].receiverCallsign != "undefined")
|
||||||
typeof json.receptionReport[key].receiverCallsign != "undefined"
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
report.dxcc = callsignToDxcc(
|
report.dxcc = callsignToDxcc(json.receptionReport[key].receiverCallsign);
|
||||||
json.receptionReport[key].receiverCallsign
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
else report.dxcc = -1;
|
else report.dxcc = -1;
|
||||||
report.when = parseInt(json.receptionReport[key].flowStartSeconds);
|
report.when = parseInt(json.receptionReport[key].flowStartSeconds);
|
||||||
|
|
|
@ -97,7 +97,7 @@ function gtConnectChat()
|
||||||
g_gtState = ChatState.error;
|
g_gtState = ChatState.error;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (typeof jsmesg.type == "undefined")
|
if (!("type" in jsmesg))
|
||||||
{
|
{
|
||||||
g_gtState = ChatState.error;
|
g_gtState = ChatState.error;
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "GridTracker",
|
"name": "GridTracker",
|
||||||
"product_string_do_not_use": "gridtracker",
|
"product_string_do_not_use": "gridtracker",
|
||||||
"version": "1.22.1204",
|
"version": "1.22.1226",
|
||||||
"betaVersion": "",
|
"betaVersion": "",
|
||||||
"description": "GridTracker, an amateur radio companion",
|
"description": "GridTracker, an amateur radio companion",
|
||||||
"author": "GridTracker.org",
|
"author": "GridTracker.org",
|
||||||
|
|
Ładowanie…
Reference in New Issue