POTA places loads at startup and every 86400000 ms

merge-requests/160/head
Matthew Chambers 2022-02-20 09:56:25 -06:00
rodzic ea50ff8002
commit 14c8c6ed18
2 zmienionych plików z 10 dodań i 9 usunięć

Wyświetl plik

@ -13760,7 +13760,8 @@ var g_startupTable = [
[loadLookupDetails, "Callsign Lookup Details Loaded"],
[startupEventsAndTimers, "Set Events and Timers"],
[registerHotKeys, "Registered Hotkeys"],
[gtChatSystemInit, "User System Initialized"],
[gtChatSystemInit, "Chat System Initialized"],
[getPotaPlaces, "Loading POTA Database"],
[downloadAcknowledgements, "Contributor Acknowledgements Loaded"],
[postInit, "Finalizing System"]
];

Wyświetl plik

@ -5,7 +5,7 @@
var g_potaPlaces = null;
var g_potaSpots = null;
function g_ingestPotaPlaces(buffer)
function ingestPotaPlaces(buffer)
{
try
{
@ -17,23 +17,23 @@ function g_ingestPotaPlaces(buffer)
}
}
function g_getPotaPlaces()
function getPotaPlaces()
{
if (g_mapSettings.offlineMode == false)
{
getBuffer(
"http://app.gridtracker.org/pota_parks.php",
g_ingestPotaPlaces,
ingestPotaPlaces,
null,
"http",
80
);
setTimeout(g_getPotaPlaces, 86400000)
setTimeout(getPotaPlaces, 86400000)
}
}
function g_ingestPotaSpots(buffer)
function ingestPotaSpots(buffer)
{
try
{
@ -45,19 +45,19 @@ function g_ingestPotaSpots(buffer)
}
}
function g_getPotaSpots()
function getPotaSpots()
{
if (g_mapSettings.offlineMode == false)
{
getBuffer(
"https://api.pota.app/spot/activator",
g_ingestPotaSpots,
ingestPotaSpots,
null,
"https",
443
);
setTimeout(g_getPotaSpots, 300000);
setTimeout(getPotaSpots, 300000);
}
}