Change defaults

merge-requests/237/merge
Tag 2023-01-10 14:29:49 -08:00
rodzic c8b2f52282
commit 2438832aa6
3 zmienionych plików z 64 dodań i 56 usunięć

Wyświetl plik

@ -1143,8 +1143,8 @@ function loadLoTWLogFile()
else else
{ {
// We have no history, so our dates are not valid any more // We have no history, so our dates are not valid any more
g_adifLogSettings.lastFetch.lotw_qso = "1940-01-01"; g_adifLogSettings.lastFetch.lotw_qso = "1970-01-01";
g_adifLogSettings.lastFetch.lotw_qsl = "1940-01-01"; g_adifLogSettings.lastFetch.lotw_qsl = "1970-01-01";
} }
} }

Wyświetl plik

@ -43,9 +43,9 @@ var def_appSettings = {
gridViewMode: 3, gridViewMode: 3,
gridsquareDecayTime: 300, gridsquareDecayTime: 300,
gtAgree: "", gtAgree: "",
gtBandFilter: "", gtBandFilter: "auto",
gtFlagImgSrc: 0, gtFlagImgSrc: 0,
gtModeFilter: "", gtModeFilter: "auto",
gtPropFilter: "mixed", gtPropFilter: "mixed",
gtMsgEnable: true, gtMsgEnable: true,
gtShareEnable: true, gtShareEnable: true,
@ -145,7 +145,7 @@ var def_adifLogSettings = {
buttonClubCheckBox: false, buttonClubCheckBox: false,
buttonLOTWCheckBox: false, buttonLOTWCheckBox: false,
buttonQRZCheckBox: false, buttonQRZCheckBox: false,
buttonPsk24CheckBox: true buttonPsk24CheckBox: false
}, },
startup: { startup: {
loadAdifCheckBox: false, loadAdifCheckBox: false,
@ -187,8 +187,8 @@ var def_adifLogSettings = {
}, },
downloads: {}, downloads: {},
lastFetch: { lastFetch: {
lotw_qso: "1940-01-01", lotw_qso: "1970-01-01",
lotw_qsl: "1940-01-01" lotw_qsl: "1970-01-01"
} }
}; };

Wyświetl plik

@ -5079,8 +5079,8 @@ function clearLogFilesAndCounts()
tryToDeleteLog("qrz.adif"); tryToDeleteLog("qrz.adif");
tryToDeleteLog("clublog.adif"); tryToDeleteLog("clublog.adif");
g_adifLogSettings.downloads = {}; g_adifLogSettings.downloads = {};
g_adifLogSettings.lastFetch.lotw_qso = "1940-01-01"; g_adifLogSettings.lastFetch.lotw_qso = "1970-01-01";
g_adifLogSettings.lastFetch.lotw_qsl = "1940-01-01"; g_adifLogSettings.lastFetch.lotw_qsl = "1970-01-01";
saveAdifSettings(); saveAdifSettings();
} }
@ -11117,38 +11117,60 @@ function updateBasedOnIni()
{ {
var which = null; var which = null;
var count = 0; var count = 0;
if (g_wsjtxProcessRunning) count++; if (g_wsjtxProcessRunning)
if (g_jtdxProcessRunning) count++;
// UdpPortNotSet
if (g_appSettings.wsjtUdpPort == 0 && count == 1)
{ {
if (g_wsjtxProcessRunning) which = g_wsjtxIni; count++;
else if (g_jtdxProcessRunning) which = g_jtdxIni; }
if (g_jtdxProcessRunning)
{
count++;
}
// UdpPortNotSet
if (g_appSettings.wsjtUdpPort == 0 && count < 2)
{
if (g_wsjtxProcessRunning || count == 0)
{
which = g_wsjtxIni;
}
else if (g_jtdxProcessRunning)
{
which = g_jtdxIni;
}
if (which != null && which.port > -1) if (which != null && which.port > -1)
{ {
g_appSettings.wsjtUdpPort = which.port; g_appSettings.wsjtUdpPort = which.port;
g_appSettings.wsjtIP = which.ip; g_appSettings.wsjtIP = which.ip;
} }
if (which == null) if (which == null)
{ {
g_appSettings.wsjtUdpPort = 2237; g_appSettings.wsjtUdpPort = 2237;
g_appSettings.wsjtIP = ""; g_appSettings.wsjtIP = "";
} }
if (
ipToInt(g_appSettings.wsjtIP) >= ipToInt("224.0.0.0") && if (ipToInt(g_appSettings.wsjtIP) >= ipToInt("224.0.0.0") && ipToInt(g_appSettings.wsjtIP) < ipToInt("240.0.0.0"))
ipToInt(g_appSettings.wsjtIP) < ipToInt("240.0.0.0")
)
{ {
g_appSettings.multicast = true; g_appSettings.multicast = true;
} }
else g_appSettings.multicast = false; else
{
g_appSettings.multicast = false;
}
} }
// Which INI do we load? // Which INI do we load?
if (g_appSettings.wsjtUdpPort) if (g_appSettings.wsjtUdpPort)
{ {
which = null; which = null;
if (g_wsjtxIni.port == g_appSettings.wsjtUdpPort) which = g_wsjtxIni; if (g_wsjtxIni.port == g_appSettings.wsjtUdpPort)
else if (g_jtdxIni.port == g_appSettings.wsjtUdpPort) which = g_jtdxIni; {
which = g_wsjtxIni;
}
else if (g_jtdxIni.port == g_appSettings.wsjtUdpPort)
{
which = g_jtdxIni;
}
if (which != null) if (which != null)
{ {
myDEcall = which.MyCall; myDEcall = which.MyCall;
@ -11157,25 +11179,17 @@ function updateBasedOnIni()
g_lastMode = myMode; g_lastMode = myMode;
g_workingIniPath = which.IniPath; g_workingIniPath = which.IniPath;
} }
if (
which != null && if (which != null && which.BroadcastToN1MM == true && g_N1MMSettings.enable == true)
which.BroadcastToN1MM == true &&
g_N1MMSettings.enable == true
)
{ {
if ( if (which.N1MMServer == g_N1MMSettings.ip && which.N1MMServerPort == g_N1MMSettings.port)
which.N1MMServer == g_N1MMSettings.ip &&
which.N1MMServerPort == g_N1MMSettings.port
)
{ {
buttonN1MMCheckBox.checked = g_N1MMSettings.enable = false; buttonN1MMCheckBox.checked = g_N1MMSettings.enable = false;
localStorage.N1MMSettings = JSON.stringify(g_N1MMSettings); localStorage.N1MMSettings = JSON.stringify(g_N1MMSettings);
alert( alert(which.appName + " N1MM Logger+ is enabled with same settings, disabled GridTracker N1MM logger");
which.appName +
" N1MM Logger+ is enabled with same settings, disabled GridTracker N1MM logger"
);
} }
} }
if (which != null) if (which != null)
{ {
if (g_appSettings.wsjtIP == "") if (g_appSettings.wsjtIP == "")
@ -11184,37 +11198,34 @@ function updateBasedOnIni()
} }
} }
} }
if (myDEGrid.length > 0) setHomeGridsquare();
if (myDEGrid.length > 0)
{
setHomeGridsquare();
}
else else
{ {
if (typeof nw != "undefined") alert("Location not available!\nEither start WSJT-X/JTDX or enter your grid square in settings");
{
alert("Location not available!\nEither start WSJT-X/JTDX or enter your grid square in the settings ");
}
} }
} }
function CheckReceivePortIsNotForwardPort(value) function CheckReceivePortIsNotForwardPort(value)
{ {
if ( if (udpForwardIpInput.value == "127.0.0.1" && udpForwardPortInput.value == value && g_appSettings.wsjtIP == "" && udpForwardEnable.checked)
udpForwardIpInput.value == "127.0.0.1" &&
udpForwardPortInput.value == value &&
g_appSettings.wsjtIP == "" &&
udpForwardEnable.checked
)
{ {
return false; return false;
} }
return true; return true;
} }
function CheckForwardPortIsNotReceivePort(value) function CheckForwardPortIsNotReceivePort(value)
{ {
if ( if (udpForwardIpInput.value == "127.0.0.1" && udpPortInput.value == value && g_appSettings.wsjtIP == "")
udpForwardIpInput.value == "127.0.0.1" && {
udpPortInput.value == value && return false;
g_appSettings.wsjtIP == "" }
) { return false; }
return true; return true;
} }
@ -11630,13 +11641,10 @@ function applyCallsignsAndDates()
function selectElementContents(el) function selectElementContents(el)
{ {
var body = document.body,
range,
sel;
if (document.createRange && window.getSelection) if (document.createRange && window.getSelection)
{ {
range = document.createRange(); var range = document.createRange();
sel = window.getSelection(); var sel = window.getSelection();
sel.removeAllRanges(); sel.removeAllRanges();
range.selectNodeContents(el); range.selectNodeContents(el);
sel.addRange(range); sel.addRange(range);