kopia lustrzana https://gitlab.com/gridtracker.org/gridtracker
fixed alert script call
rodzic
2226f707bd
commit
cb73f21a93
|
@ -6,52 +6,57 @@ function sendAlerts(callRoster, rosterSettings)
|
||||||
|
|
||||||
var shouldAlert = 0;
|
var shouldAlert = 0;
|
||||||
|
|
||||||
for (callObj in callRoster)
|
for (entry in callRoster)
|
||||||
{ if (!callObj.tx) continue }
|
|
||||||
|
|
||||||
// TODO: Get rid of realtime
|
|
||||||
if (g_rosterSettings.realtime == false)
|
|
||||||
{
|
{
|
||||||
var call = callObj.DEcall;
|
var callObj = callRoster[entry].callObj;
|
||||||
g_scriptReport[call] = Object.assign({}, callObj);
|
|
||||||
g_scriptReport[call].dxccName =
|
|
||||||
window.opener.g_dxccToAltName[callObj.dxcc];
|
|
||||||
g_scriptReport[call].distance = parseInt(
|
|
||||||
callObj.distance *
|
|
||||||
MyCircle.validateRadius(window.opener.distanceUnit.value)
|
|
||||||
);
|
|
||||||
|
|
||||||
delete g_scriptReport[call].DEcall;
|
// chrbayer: what does the tx field mean? no alerts are generated (at all) if this is in place...
|
||||||
g_scriptReport[call].rect = null;
|
// if (!callObj.tx) continue;
|
||||||
delete g_scriptReport[call].rect;
|
|
||||||
delete g_scriptReport[call].style;
|
|
||||||
delete g_scriptReport[call].wspr;
|
|
||||||
delete g_scriptReport[call].qso;
|
|
||||||
delete g_scriptReport[call].instance;
|
|
||||||
|
|
||||||
if (rosterSettings.callMode != "all")
|
// TODO: Get rid of realtime
|
||||||
|
if (g_rosterSettings.realtime == false)
|
||||||
{
|
{
|
||||||
g_scriptReport[call].shouldAlert = true;
|
var call = callObj.DEcall;
|
||||||
g_scriptReport[call].reason.push(g_rosterSettings.hunting);
|
g_scriptReport[call] = Object.assign({}, callObj);
|
||||||
|
g_scriptReport[call].dxccName =
|
||||||
|
window.opener.g_dxccToAltName[callObj.dxcc];
|
||||||
|
g_scriptReport[call].distance = parseInt(
|
||||||
|
callObj.distance *
|
||||||
|
MyCircle.validateRadius(window.opener.distanceUnit.value)
|
||||||
|
);
|
||||||
|
|
||||||
|
delete g_scriptReport[call].DEcall;
|
||||||
|
g_scriptReport[call].rect = null;
|
||||||
|
delete g_scriptReport[call].rect;
|
||||||
|
delete g_scriptReport[call].style;
|
||||||
|
delete g_scriptReport[call].wspr;
|
||||||
|
delete g_scriptReport[call].qso;
|
||||||
|
delete g_scriptReport[call].instance;
|
||||||
|
|
||||||
|
if (rosterSettings.callMode != "all")
|
||||||
|
{
|
||||||
|
g_scriptReport[call].shouldAlert = true;
|
||||||
|
g_scriptReport[call].reason.push(g_rosterSettings.hunting);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (
|
if (
|
||||||
callObj.alerted == false &&
|
callObj.alerted == false &&
|
||||||
rosterSettings.callMode == "all" &&
|
rosterSettings.callMode == "all" &&
|
||||||
callObj.shouldAlert == true
|
callObj.shouldAlert == true
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
callObj.alerted = true;
|
callObj.alerted = true;
|
||||||
shouldAlert++;
|
shouldAlert++;
|
||||||
}
|
}
|
||||||
else if (callObj.alerted == false && callMode != "all")
|
else if (callObj.alerted == false && rosterSettings.callMode != "all")
|
||||||
{
|
{
|
||||||
callObj.alerted = true;
|
callObj.alerted = true;
|
||||||
shouldAlert++;
|
shouldAlert++;
|
||||||
}
|
}
|
||||||
|
|
||||||
callObj.shouldAlert = false;
|
callObj.shouldAlert = false;
|
||||||
|
}
|
||||||
|
|
||||||
// NOTE: Ring alerts if needed
|
// NOTE: Ring alerts if needed
|
||||||
try
|
try
|
||||||
|
|
Ładowanie…
Reference in New Issue