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
|
||||
- Fixed CPU usage issue with messaging
|
||||
- Fixed Logging -> Local File(s) not showing files selected
|
||||
|
|
|
@ -40,6 +40,13 @@ DESTDIR=${RPM_BUILD_ROOT} make clean
|
|||
%license %{_docdir}/%{name}/
|
||||
|
||||
%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
|
||||
- Fixed CPU usage issue with messaging
|
||||
- Fixed Logging -> Local File(s) not showing files selected
|
||||
|
|
|
@ -83,7 +83,7 @@
|
|||
if (event.key === "Enter")
|
||||
{
|
||||
// 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)
|
||||
{
|
||||
var worker = "";
|
||||
|
|
|
@ -52,15 +52,14 @@
|
|||
event.preventDefault();
|
||||
});
|
||||
|
||||
function lockNewWindows() {
|
||||
if (typeof nw != "undefined") {
|
||||
var gui = require("nw.gui");
|
||||
var win = gui.Window.get();
|
||||
win.on("new-win-policy", function (frame, url, policy) {
|
||||
gui.Shell.openExternal(url);
|
||||
policy.ignore();
|
||||
});
|
||||
}
|
||||
function lockNewWindows()
|
||||
{
|
||||
var gui = require("nw.gui");
|
||||
var win = gui.Window.get();
|
||||
win.on("new-win-policy", function (frame, url, policy) {
|
||||
gui.Shell.openExternal(url);
|
||||
policy.ignore();
|
||||
});
|
||||
}
|
||||
|
||||
function timeNowSec() {
|
||||
|
|
|
@ -37,34 +37,39 @@
|
|||
}
|
||||
</style>
|
||||
<script>
|
||||
function startLookup(call, grid) {
|
||||
function startLookup(call, grid)
|
||||
{
|
||||
window.opener.startLookup(call, grid);
|
||||
window.opener.focus();
|
||||
}
|
||||
|
||||
function lockNewWindows() {
|
||||
if (typeof nw != "undefined") {
|
||||
var gui = require("nw.gui");
|
||||
var win = gui.Window.get();
|
||||
win.on("new-win-policy", function (frame, url, policy) {
|
||||
gui.Shell.openExternal(url);
|
||||
policy.ignore();
|
||||
});
|
||||
}
|
||||
function lockNewWindows()
|
||||
{
|
||||
var gui = require("nw.gui");
|
||||
var win = gui.Window.get();
|
||||
win.on("new-win-policy", function (frame, url, policy)
|
||||
{
|
||||
gui.Shell.openExternal(url);
|
||||
policy.ignore();
|
||||
});
|
||||
}
|
||||
|
||||
function init() {
|
||||
function init()
|
||||
{
|
||||
lockNewWindows();
|
||||
|
||||
document.addEventListener("keydown", onMyKeyDown, false);
|
||||
}
|
||||
|
||||
function onMyKeyDown(event) {
|
||||
function onMyKeyDown(event)
|
||||
{
|
||||
window.opener.onMyKeyDown(event);
|
||||
}
|
||||
|
||||
document.oncontextmenu = function (event) {
|
||||
if (process.versions["nw-flavor"] != "sdk") {
|
||||
document.oncontextmenu = function (event)
|
||||
{
|
||||
if (process.versions["nw-flavor"] != "sdk")
|
||||
{
|
||||
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
|
||||
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 test = filename.toLowerCase();
|
||||
|
@ -121,7 +121,11 @@ function onAdiLoadComplete(adiBuffer, saveAdifFile, adifFileName, newFile)
|
|||
var dLastLOTW_QSO = Date.parse(g_adifLogSettings.lastFetch.lotw_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;
|
||||
}
|
||||
}
|
||||
|
@ -133,7 +137,11 @@ function onAdiLoadComplete(adiBuffer, saveAdifFile, adifFileName, newFile)
|
|||
var dLastLOTW_QSL = Date.parse(g_adifLogSettings.lastFetch.lotw_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;
|
||||
}
|
||||
}
|
||||
|
@ -602,44 +610,46 @@ function lotwCallback(buffer, flag)
|
|||
var rawAdiBuffer = String(buffer);
|
||||
if (rawAdiBuffer.indexOf("password incorrect") > -1)
|
||||
{
|
||||
if (flag) lotwTestResult.innerHTML = "Invalid";
|
||||
if (flag)
|
||||
{
|
||||
lotwTestResult.innerHTML = "Invalid";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (flag) lotwTestResult.innerHTML = "Passed";
|
||||
if (flag)
|
||||
{
|
||||
lotwTestResult.innerHTML = "Passed";
|
||||
}
|
||||
else
|
||||
{
|
||||
var shouldAppend = false;
|
||||
var shouldAppend = true;
|
||||
var adiFileName = "LogbookOfTheWorld.adif";
|
||||
g_fromDirectCallNoFileDialog = true;
|
||||
|
||||
// Extract header showing last fetched date from 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);
|
||||
if (lotwQSHeader !== null)
|
||||
// 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);
|
||||
|
||||
if (rawAdiBuffer.indexOf("QSL ONLY: YES") == -1)
|
||||
{
|
||||
if (lotwQSHeader[1].toUpperCase() == "QSORX")
|
||||
{
|
||||
g_adifLogSettings.lastFetch.lotw_qso = lotwQSHeader[2]
|
||||
}
|
||||
else if (lotwQSHeader[1].toUpperCase() == "QSL")
|
||||
{
|
||||
g_adifLogSettings.lastFetch.lotw_qsl = lotwQSHeader[2];
|
||||
}
|
||||
// This is the QSO download, fire the QSL download now
|
||||
nodeTimers.setTimeout(grabLoTWQSL, 500);
|
||||
}
|
||||
|
||||
rawAdiBuffer = cleanAndPrepADIF(
|
||||
"lotw.adif",
|
||||
adiFileName,
|
||||
rawAdiBuffer,
|
||||
true,
|
||||
shouldAppend
|
||||
);
|
||||
|
||||
rawAdiBuffer = tryToWriteAdifToDocFolder(
|
||||
"lotw.adif",
|
||||
adiFileName,
|
||||
rawAdiBuffer,
|
||||
shouldAppend
|
||||
);
|
||||
|
||||
onAdiLoadComplete(rawAdiBuffer, true, "lotw.adif", true);
|
||||
onAdiLoadComplete(rawAdiBuffer, true, adiFileName, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -705,8 +715,8 @@ function grabLOtWLog(test)
|
|||
|
||||
if (test == false)
|
||||
{
|
||||
loadLoTWLogFile();
|
||||
nodeTimers.setTimeout(grabLoTWQSO, 500);
|
||||
nodeTimers.setTimeout(grabLoTWQSL, 10000);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -739,9 +749,10 @@ function grabLoTWQSO()
|
|||
|
||||
function grabLoTWQSL()
|
||||
{
|
||||
var dLoTWQSL = Date.parse(dateToISO8601(g_adifLogSettings.lastFetch.lotw_qsl, "Z"));
|
||||
var tmpDate = ((new Date().getTime()) - 300);
|
||||
var dLoTWQSL = Date.parse(dateToISO8601(g_adifLogSettings.lastFetch.lotw_qsl, "Z")) / 1000;
|
||||
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)))
|
||||
{
|
||||
lastQSLDateString = "&qso_qslsince=" + g_adifLogSettings.lastFetch.lotw_qsl;
|
||||
|
@ -760,31 +771,9 @@ function grabLoTWQSL()
|
|||
"g_isGettingLOTW",
|
||||
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)
|
||||
{
|
||||
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()
|
||||
{
|
||||
var fs = require("fs");
|
||||
|
||||
if (fs.existsSync(g_LoTWLogFile))
|
||||
if (fs.existsSync(g_LoTWLogFile) && getFilesizeInBytes(g_LoTWLogFile) > 0)
|
||||
{
|
||||
g_fromDirectCallNoFileDialog = true;
|
||||
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()
|
||||
|
@ -1436,7 +1439,6 @@ function startupAdifLoadCheck()
|
|||
|
||||
if (loadLOTWCheckBox.checked == true)
|
||||
{
|
||||
loadLoTWLogFile();
|
||||
grabLOtWLog(false);
|
||||
}
|
||||
|
||||
|
@ -2620,25 +2622,22 @@ function sendQrzLogEntry(report)
|
|||
|
||||
if (logQRZqsoCheckBox.checked == true && ValidateQrzApi(qrzApiKey))
|
||||
{
|
||||
if (typeof nw != "undefined")
|
||||
{
|
||||
var postData = {
|
||||
KEY: qrzApiKey.value,
|
||||
ACTION: "INSERT",
|
||||
ADIF: report
|
||||
};
|
||||
getPostBuffer(
|
||||
"https://logbook.qrz.com/api",
|
||||
qrzSendLogResult,
|
||||
null,
|
||||
"https",
|
||||
443,
|
||||
postData,
|
||||
30000,
|
||||
postRetryErrorCallaback,
|
||||
"QRZ.com"
|
||||
);
|
||||
}
|
||||
var postData = {
|
||||
KEY: qrzApiKey.value,
|
||||
ACTION: "INSERT",
|
||||
ADIF: report
|
||||
};
|
||||
getPostBuffer(
|
||||
"https://logbook.qrz.com/api",
|
||||
qrzSendLogResult,
|
||||
null,
|
||||
"https",
|
||||
443,
|
||||
postData,
|
||||
30000,
|
||||
postRetryErrorCallaback,
|
||||
"QRZ.com"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2684,21 +2683,18 @@ function sendCloudlogEntry(report)
|
|||
|
||||
if (logCloudlogQSOCheckBox.checked == true)
|
||||
{
|
||||
if (typeof nw != "undefined")
|
||||
{
|
||||
var postData = { key: CloudlogAPI.value, station_profile_id: CloudlogStationProfileID.value, type: "adif", string: report };
|
||||
getPostJSONBuffer(
|
||||
CloudlogURL.value,
|
||||
CloudlogSendLogResult,
|
||||
null,
|
||||
"https",
|
||||
80,
|
||||
postData,
|
||||
10000,
|
||||
CloudUrlErrorCallback,
|
||||
"Failed to Send"
|
||||
);
|
||||
}
|
||||
var postData = { key: CloudlogAPI.value, station_profile_id: CloudlogStationProfileID.value, type: "adif", string: report };
|
||||
getPostJSONBuffer(
|
||||
CloudlogURL.value,
|
||||
CloudlogSendLogResult,
|
||||
null,
|
||||
"https",
|
||||
80,
|
||||
postData,
|
||||
10000,
|
||||
CloudUrlErrorCallback,
|
||||
"Failed to Send"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2758,21 +2754,18 @@ function hrdCredentialTest(test)
|
|||
{
|
||||
HRDLogTestResult.innerHTML = "Testing";
|
||||
|
||||
if (typeof nw != "undefined")
|
||||
{
|
||||
var postData = {
|
||||
Callsign: HRDLOGCallsign.value,
|
||||
Code: HRDLOGUploadCode.value
|
||||
};
|
||||
getPostBuffer(
|
||||
"https://www.hrdlog.net/NewEntry.aspx",
|
||||
hrdSendLogResult,
|
||||
test,
|
||||
"https",
|
||||
443,
|
||||
postData
|
||||
);
|
||||
}
|
||||
var postData = {
|
||||
Callsign: HRDLOGCallsign.value,
|
||||
Code: HRDLOGUploadCode.value
|
||||
};
|
||||
getPostBuffer(
|
||||
"https://www.hrdlog.net/NewEntry.aspx",
|
||||
hrdSendLogResult,
|
||||
test,
|
||||
"https",
|
||||
443,
|
||||
postData
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2782,21 +2775,18 @@ function ClublogTest(test)
|
|||
{
|
||||
CloudlogTestResult.innerHTML = "Testing";
|
||||
|
||||
if (typeof nw != "undefined")
|
||||
{
|
||||
var postData = { key: CloudlogAPI.value, type: "adif", string: "<eor>" };
|
||||
getPostJSONBuffer(
|
||||
CloudlogURL.value,
|
||||
CloudlogSendLogResult,
|
||||
test,
|
||||
"https",
|
||||
80,
|
||||
postData,
|
||||
10000,
|
||||
CloudUrlErrorCallback,
|
||||
"No Response<br/>or</br>Timeout"
|
||||
);
|
||||
}
|
||||
var postData = { key: CloudlogAPI.value, type: "adif", string: "<eor>" };
|
||||
getPostJSONBuffer(
|
||||
CloudlogURL.value,
|
||||
CloudlogSendLogResult,
|
||||
test,
|
||||
"https",
|
||||
80,
|
||||
postData,
|
||||
10000,
|
||||
CloudUrlErrorCallback,
|
||||
"No Response<br/>or</br>Timeout"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -95,21 +95,30 @@ function lotwLoadCallsigns()
|
|||
g_lotwLoadTimer = nodeTimers.setTimeout(lotwDownload, lotwWhenTimer * 1000);
|
||||
}
|
||||
|
||||
if (!fs.existsSync(g_lotwFile))
|
||||
try
|
||||
{
|
||||
g_callsignLookups.lotwLastUpdate = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
var data = fs.readFileSync(g_lotwFile);
|
||||
g_lotwCallsigns = JSON.parse(data);
|
||||
if (Object.keys(g_lotwCallsigns).length < 100)
|
||||
if (!fs.existsSync(g_lotwFile))
|
||||
{
|
||||
g_callsignLookups.lotwLastUpdate = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
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();
|
||||
}
|
||||
}
|
||||
if (g_callsignLookups.lotwLastUpdate == 0)
|
||||
catch (e)
|
||||
{
|
||||
console.log(e);
|
||||
g_callsignLookups.lotwLastUpdate = 0;
|
||||
lotwDownload();
|
||||
}
|
||||
}
|
||||
|
@ -221,17 +230,25 @@ function oqrsLoadCallsigns()
|
|||
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;
|
||||
}
|
||||
else
|
||||
{
|
||||
var data = fs.readFileSync(g_oqrsFile);
|
||||
g_oqrsCallsigns = JSON.parse(data);
|
||||
}
|
||||
if (g_callsignLookups.oqrsLastUpdate == 0)
|
||||
{
|
||||
oqrsDownload();
|
||||
}
|
||||
}
|
||||
|
@ -316,17 +333,26 @@ function eqslLoadCallsigns()
|
|||
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;
|
||||
}
|
||||
else
|
||||
{
|
||||
var data = fs.readFileSync(g_eqslFile);
|
||||
g_eqslCallsigns = JSON.parse(data);
|
||||
}
|
||||
if (g_callsignLookups.eqslLastUpdate == 0)
|
||||
{
|
||||
eqslDownload();
|
||||
}
|
||||
}
|
||||
|
@ -435,10 +461,7 @@ function updateQSO()
|
|||
var details = g_QSOhash[hash];
|
||||
var lookupCall = false;
|
||||
|
||||
if (
|
||||
(details.cnty == null || details.state == null) &&
|
||||
isKnownCallsignDXCC(details.dxcc)
|
||||
)
|
||||
if ((details.cnty == null || details.state == null) && isKnownCallsignDXCC(details.dxcc))
|
||||
{
|
||||
// Do County Lookup
|
||||
lookupCall = true;
|
||||
|
@ -450,9 +473,14 @@ function updateQSO()
|
|||
if (details.cnty.indexOf(",") == -1)
|
||||
{
|
||||
if (!(details.state + "," + details.cnty in g_cntyToCounty))
|
||||
{ lookupCall = true; }
|
||||
{
|
||||
lookupCall = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lookupCall = true;
|
||||
}
|
||||
else lookupCall = true;
|
||||
}
|
||||
}
|
||||
if (lookupCall)
|
||||
|
@ -470,13 +498,10 @@ function updateCallsignCount()
|
|||
{
|
||||
g_ulsDatabase.transaction(function (tx)
|
||||
{
|
||||
tx.executeSql(
|
||||
"SELECT count(*) as cnt FROM calls",
|
||||
[],
|
||||
tx.executeSql("SELECT count(*) as cnt FROM calls", [],
|
||||
function (tx, results)
|
||||
{
|
||||
var len = results.rows.length,
|
||||
i;
|
||||
var len = results.rows.length, i;
|
||||
if (len == 1)
|
||||
{
|
||||
g_ulsCallsignsCount = results.rows[0].cnt;
|
||||
|
@ -500,9 +525,7 @@ function ulsSettingsDisplay()
|
|||
}
|
||||
else
|
||||
{
|
||||
ulsUpdatedTd.innerHTML = userTimeString(
|
||||
g_callsignLookups.ulsLastUpdate * 1000
|
||||
);
|
||||
ulsUpdatedTd.innerHTML = userTimeString(g_callsignLookups.ulsLastUpdate * 1000);
|
||||
}
|
||||
|
||||
if (!g_callsignLookups.ulsUseEnable)
|
||||
|
@ -547,15 +570,7 @@ function ulsDownload()
|
|||
);
|
||||
}
|
||||
|
||||
function getChunkedBuffer(
|
||||
file_url,
|
||||
callback,
|
||||
flag,
|
||||
mode,
|
||||
port,
|
||||
cookie,
|
||||
errorHandler
|
||||
)
|
||||
function getChunkedBuffer(file_url, callback, flag, mode, port, cookie, errorHandler)
|
||||
{
|
||||
var url = require("url");
|
||||
var http = require(mode);
|
||||
|
@ -588,7 +603,9 @@ function getChunkedBuffer(
|
|||
var fread = 0;
|
||||
var cookies = null;
|
||||
if (typeof res.headers["set-cookie"] != "undefined")
|
||||
{ cookies = res.headers["set-cookie"]; }
|
||||
{
|
||||
cookies = res.headers["set-cookie"];
|
||||
}
|
||||
res
|
||||
.on("data", function (data)
|
||||
{
|
||||
|
@ -621,9 +638,7 @@ var g_ulsDatabase = openDatabase(
|
|||
|
||||
g_ulsDatabase.transaction(function (tx)
|
||||
{
|
||||
tx.executeSql(
|
||||
"CREATE TABLE IF NOT EXISTS calls ( callsign TEXT PRIMARY KEY, zip, state)"
|
||||
);
|
||||
tx.executeSql("CREATE TABLE IF NOT EXISTS calls (callsign TEXT PRIMARY KEY, zip, state)");
|
||||
});
|
||||
|
||||
function resetULSDatabase()
|
||||
|
@ -658,7 +673,10 @@ function processulsCallsigns(data, flag, cookies, starting, finished)
|
|||
{
|
||||
if (starting == true)
|
||||
{
|
||||
if (g_ulsLoadTimer != null) nodeTimers.clearTimeout(g_ulsLoadTimer);
|
||||
if (g_ulsLoadTimer != null)
|
||||
{
|
||||
nodeTimers.clearTimeout(g_ulsLoadTimer);
|
||||
}
|
||||
g_ulsLoadTimer = null;
|
||||
g_ulsWhenDate = 0;
|
||||
g_ulsCallsignsCount = 0;
|
||||
|
@ -670,17 +688,7 @@ function processulsCallsigns(data, flag, cookies, starting, finished)
|
|||
if (lines[x].length)
|
||||
{
|
||||
++g_ulsCallsignsCount;
|
||||
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) +
|
||||
"\")"
|
||||
);
|
||||
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) + "\")");
|
||||
if (g_ulsCallsignsCount % 10000 == 0)
|
||||
{
|
||||
tx.executeSql(
|
||||
|
@ -688,8 +696,7 @@ function processulsCallsigns(data, flag, cookies, starting, finished)
|
|||
[],
|
||||
function (rx, results)
|
||||
{
|
||||
var len = results.rows.length,
|
||||
i;
|
||||
var len = results.rows.length;
|
||||
if (len == 1)
|
||||
{
|
||||
ulsCountTd.innerHTML = results.rows[0].cnt;
|
||||
|
@ -708,7 +715,10 @@ function processulsCallsigns(data, flag, cookies, starting, finished)
|
|||
{
|
||||
var now = timeNowSec();
|
||||
|
||||
if (g_ulsLoadTimer != null) nodeTimers.clearTimeout(g_ulsLoadTimer);
|
||||
if (g_ulsLoadTimer != null)
|
||||
{
|
||||
nodeTimers.clearTimeout(g_ulsLoadTimer);
|
||||
}
|
||||
|
||||
var ulsWhenTimer = 86400 * 7;
|
||||
g_ulsWhenDate = ulsWhenTimer + now;
|
||||
|
|
|
@ -284,3 +284,38 @@ var def_pstrotatorSettings = {
|
|||
port: 12000,
|
||||
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)
|
||||
{
|
||||
var settings = {};
|
||||
if (typeof localStorage[key] != "undefined")
|
||||
if (key in localStorage)
|
||||
{
|
||||
settings = JSON.parse(localStorage[key]);
|
||||
}
|
||||
|
@ -213,7 +213,7 @@ function loadDefaultsAndMerge(key, def)
|
|||
function loadArrayIfExists(key)
|
||||
{
|
||||
var data = [];
|
||||
if (typeof localStorage[key] != "undefined")
|
||||
if (key in localStorage)
|
||||
{
|
||||
data = JSON.parse(localStorage[key]);
|
||||
}
|
||||
|
@ -223,7 +223,7 @@ function loadArrayIfExists(key)
|
|||
function loadObjectIfExists(key)
|
||||
{
|
||||
var data = {};
|
||||
if (typeof localStorage[key] != "undefined")
|
||||
if (key in localStorage)
|
||||
{
|
||||
data = JSON.parse(localStorage[key]);
|
||||
}
|
||||
|
@ -1105,7 +1105,6 @@ function addDeDx(
|
|||
)
|
||||
{
|
||||
details.grid = finalGrid;
|
||||
details.grid4 = finalGrid.substr(0, 4);
|
||||
}
|
||||
}
|
||||
if (finalRSTsent.length > 0) details.RSTsent = finalRSTsent;
|
||||
|
@ -1144,6 +1143,7 @@ function addDeDx(
|
|||
details.px = null;
|
||||
details.zone = null;
|
||||
details.cont = null;
|
||||
details.cnty = finalCnty;
|
||||
details.vucc_grids = finalVucc;
|
||||
details.propMode = finalPropMode;
|
||||
details.digital = finalDigital;
|
||||
|
@ -1732,7 +1732,7 @@ function changePathWidth()
|
|||
|
||||
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]);
|
||||
delete g_flightPaths[i];
|
||||
g_flightPaths[i] = null;
|
||||
|
@ -1748,7 +1748,7 @@ function changePathWidth()
|
|||
featureStyle.setStroke(featureStroke);
|
||||
g_flightPaths[i].setStyle(featureStyle);
|
||||
|
||||
if (typeof g_flightPaths[i].Arrow != "undefined")
|
||||
if ("Arrow" in g_flightPaths[i])
|
||||
{
|
||||
var stroke = new ol.style.Stroke({
|
||||
color: color,
|
||||
|
@ -1780,7 +1780,7 @@ function changePathWidth()
|
|||
featureStyle.setStroke(featureStroke);
|
||||
g_transmitFlightPath.setStyle(featureStyle);
|
||||
|
||||
if (typeof g_transmitFlightPath.Arrow != "undefined")
|
||||
if ("Arrow" in g_transmitFlightPath)
|
||||
{
|
||||
var stroke = new ol.style.Stroke({
|
||||
color: getQrzPathColor(),
|
||||
|
@ -5064,9 +5064,7 @@ function clearQSOs()
|
|||
|
||||
function clearLogFilesAndCounts()
|
||||
{
|
||||
tryToDeleteLog("lotw_QSL.adif");
|
||||
tryToDeleteLog("lotw_QSO.adif");
|
||||
tryToDeleteLog("lotw.adif");
|
||||
tryToDeleteLog("LogbookOfTheWorld.adif");
|
||||
tryToDeleteLog("qrz.adif");
|
||||
tryToDeleteLog("clublog.adif");
|
||||
g_adifLogSettings.downloads = {};
|
||||
|
@ -5344,8 +5342,8 @@ function handleStrike(strike)
|
|||
MyCircle.distance(
|
||||
g_myLat,
|
||||
g_myLon,
|
||||
strikes.a,
|
||||
strikes.o,
|
||||
strike.a,
|
||||
strike.o,
|
||||
distanceUnit.value
|
||||
) * MyCircle.validateRadius(distanceUnit.value)
|
||||
).toLocaleString() +
|
||||
|
@ -6486,7 +6484,7 @@ function handleWsjtxStatus(newMessage)
|
|||
else
|
||||
{
|
||||
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)) + "°";
|
||||
}
|
||||
|
||||
|
@ -15441,7 +15439,7 @@ function mediaCheck()
|
|||
g_scriptDir += g_dirSeperator;
|
||||
|
||||
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"));
|
||||
msgAlertMedia.appendChild(newOption("none", "Select File"));
|
||||
|
@ -15493,7 +15491,9 @@ function mediaCheck()
|
|||
g_QSLcount = 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");
|
||||
|
||||
try
|
||||
|
@ -15501,60 +15501,35 @@ function mediaCheck()
|
|||
if (fs.existsSync(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;
|
||||
|
||||
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++;
|
||||
}
|
||||
g_tracker.worked.px = {};
|
||||
g_tracker.confirmed.px = {};
|
||||
}
|
||||
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");
|
||||
}
|
||||
else
|
||||
{
|
||||
clearLogFilesAndCounts();
|
||||
}
|
||||
|
||||
loadReceptionReports();
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
clearLogFilesAndCounts();
|
||||
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -15676,39 +15651,28 @@ function pskSpotResults(buffer, flag)
|
|||
if (oDOM != null)
|
||||
{
|
||||
var json = XML2jsobj(oDOM.documentElement);
|
||||
if (typeof json.lastSequenceNumber != "undefined")
|
||||
if ("lastSequenceNumber" in json)
|
||||
{
|
||||
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 (
|
||||
typeof json.receptionReport[key].frequency != "undefined" &&
|
||||
typeof json.receptionReport[key].sNR != "undefined"
|
||||
)
|
||||
if (typeof json.receptionReport[key].frequency != "undefined" && typeof json.receptionReport[key].sNR != "undefined")
|
||||
{
|
||||
var report;
|
||||
var call = json.receptionReport[key].receiverCallsign;
|
||||
var mode = json.receptionReport[key].mode;
|
||||
var grid = json.receptionReport[key].receiverLocator.substr(0, 6);
|
||||
if (grid.length < 4)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
var band = Number(
|
||||
parseInt(json.receptionReport[key].frequency) / 1000000
|
||||
).formatBand();
|
||||
if (grid.length < 4) { continue; }
|
||||
var band = Number(parseInt(json.receptionReport[key].frequency) / 1000000).formatBand();
|
||||
var hash = call + mode + band + grid.substr(0, 4);
|
||||
|
||||
if (hash in g_receptionReports.spots)
|
||||
{
|
||||
report = g_receptionReports.spots[hash];
|
||||
if (
|
||||
parseInt(json.receptionReport[key].flowStartSeconds) <
|
||||
report.when
|
||||
) { continue; }
|
||||
if (parseInt(json.receptionReport[key].flowStartSeconds) < report.when) { continue; }
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -15718,13 +15682,9 @@ function pskSpotResults(buffer, flag)
|
|||
report.grid = grid.toUpperCase();
|
||||
report.mode = mode;
|
||||
}
|
||||
if (
|
||||
typeof json.receptionReport[key].receiverCallsign != "undefined"
|
||||
)
|
||||
if (typeof json.receptionReport[key].receiverCallsign != "undefined")
|
||||
{
|
||||
report.dxcc = callsignToDxcc(
|
||||
json.receptionReport[key].receiverCallsign
|
||||
);
|
||||
report.dxcc = callsignToDxcc(json.receptionReport[key].receiverCallsign);
|
||||
}
|
||||
else report.dxcc = -1;
|
||||
report.when = parseInt(json.receptionReport[key].flowStartSeconds);
|
||||
|
|
|
@ -97,7 +97,7 @@ function gtConnectChat()
|
|||
g_gtState = ChatState.error;
|
||||
return;
|
||||
}
|
||||
if (typeof jsmesg.type == "undefined")
|
||||
if (!("type" in jsmesg))
|
||||
{
|
||||
g_gtState = ChatState.error;
|
||||
return;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "GridTracker",
|
||||
"product_string_do_not_use": "gridtracker",
|
||||
"version": "1.22.1204",
|
||||
"version": "1.22.1226",
|
||||
"betaVersion": "",
|
||||
"description": "GridTracker, an amateur radio companion",
|
||||
"author": "GridTracker.org",
|
||||
|
|
Ładowanie…
Reference in New Issue