Merge branch 'june-24' into 'master'

June 24

See merge request gridtracker.org/gridtracker!319

If this is changing anything in the UI or operational behavior, please prepare to update the wiki!
master v1.24.0707
T Loomis 2024-07-08 14:10:29 +00:00
commit 1500847e1f
17 zmienionych plików z 505 dodań i 143 usunięć

7
debian/changelog vendored
Wyświetl plik

@ -1,3 +1,10 @@
gridtracker (1.24.0707) unstable; urgency=low
- Alerts: Fixed bug breaking audio alerts and notifications
- Network: Multicast improvements
- Logging: CloudLog improvements (thank you DF2ET)
- System: Restored PSK24h feature
- System: Removed auto-mute feature
-- Tag Loomis <n0ttl@gridtracker.org> Sun, 07 Jul 2024 00:00:00 -0000
gridtracker (1.24.0512) unstable; urgency=low
- System: Fixed bug in QSO unique hash algorithm

Wyświetl plik

@ -1,6 +1,6 @@
Name: {{{ git_name name=gridtracker }}}
Summary: GridTracker: An Amateur Radio Companion
Version: 1.24.0512
Version: 1.24.0707
Release: 1%{?dist}
BuildArch: noarch
Source0: {{{ git_dir_pack }}}
@ -40,6 +40,12 @@ DESTDIR=${RPM_BUILD_ROOT} make clean
%license %{_docdir}/%{name}/
%changelog
* Sun Jul 07 2024 Tag Loomis <n0ttl@gridtracker.org> - 1.24.0707-1
- Alerts: Fixed bug breaking audio alerts and notifications
- Network: Multicast improvements
- Logging: CloudLog improvements (thank you DF2ET)
- System: Restored PSK24h feature
- System: Removed auto-mute feature
* Sun May 12 2024 Tag Loomis <n0ttl@gridtracker.org> - 1.24.0512-1
- System: Fixed bug in QSO unique hash algorithm
* Sat May 04 2024 Tag Loomis <n0ttl@gridtracker.org> - 1.24.0504-1

Wyświetl plik

@ -571,6 +571,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<div id="lookupButton" onclick="openLookupWindow(true)" class="iconButton" title="Open Lookup Window">
<img src="./img/lookup.png" class="buttonImg" />
</div>
<div id="buttonPsk24CheckBoxDiv" onclick="grabPsk24()" class="iconButton" title="Your PSK 24hour report">
<img id="pskImg" src="./img/psk_24_32.png" class="buttonImg" />
</div>
<div id="buttonQRZCheckBoxDiv" onclick="if ( ValidateQrzApi(qrzApiKey ) ) grabQrzComLog()" class="iconButton"
title="Download log from QRZ.com">
<img id="qrzLogImg" src="./img/log_QRZ.png" class="buttonImg" />
@ -2234,6 +2237,23 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<td></td>
<td></td>
</tr>
<tr id="pskTr">
<td data-i18n="settings.logging.PSKReporter.source">PSK-Reporter</td>
<td>
<input type="checkbox" checked="false" id="buttonPsk24CheckBox"
onclick="adifMenuCheckBoxChanged(this);" />
</td>
<td>
<input type="checkbox" checked="false" id="loadPsk24CheckBox"
onclick="adifStartupCheckBoxChanged(this);" />
</td>
<td></td>
<td>
<div data-i18n="settings.logging.PSKReporter.details" id="pskDaysDiv">24 Hour History</div>
</td>
<td></td>
<td></td>
</tr>
<tr>
<td data-i18n="settings.logging.QRZcom.source">QRZ.com</td>
<td>
@ -2329,14 +2349,17 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<td>
<label data-i18n="settings.logging.CloudLog.details.URL" for="CloudlogURL">URL</label>
<input id="CloudlogURL" type="text" class="inputTextValue" size="35"
oninput="ValidateText(this); adifTextValueChange(this);" />
oninput="ValidateText(this); CloudLogValidateURL(false); adifTextValueChange(this);" />
<br />
<label data-i18n="settings.logging.CloudLog.details.API" for="CloudlogAPI">API Key</label>
<input id="CloudlogAPI" type="password" class="inputTextValue" size="12"
oninput="ValidateText(this); adifTextValueChange(this);" />
<br />
Station Profile ID<input id="CloudlogStationProfileID" type="text" class="inputTextValue" size="12"
oninput="ValidateText(this); adifTextValueChange(this);" />
<label data-i18n="settings.logging.CloudLog.details.StationProfile" for "CloudlogStationProfile">Station Profile</label>
<select id="CloudlogStationProfile" size="1"
onChange="CloudLogProfileChanged(this)" />
<option> </option>
</select>
</td>
<td>
<div data-i18n="settings.logging.CloudLog.test.button" class="button"
@ -3293,4 +3316,4 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<div id="selectNodeDiv" style="-webkit-user-select: text; user-select: text; display: block; z-index: -10000"></div>
</body>
</html>
</html>

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Wyświetl plik

@ -334,6 +334,7 @@
"settings.logging.CloudLog.source": "CloudLog",
"settings.logging.CloudLog.details.URL": "網址",
"settings.logging.CloudLog.details.API": "API密鑰",
"settings.logging.CloudLog.details.StationProfile": "車站簡介",
"settings.logging.CloudLog.test.button": "測試",
"settings.logging.eQSLcc.source": "eQSL.cc",
"settings.logging.eQSLcc.details.user": "用戶名",
@ -1078,4 +1079,4 @@
"COMMENT_sendAlerts.js": "",
"sendAlerts.scriptEnabled": "腳本已啟用",
"sendAlerts.scriptDisabled": "腳本已停用"
}
}

Wyświetl plik

@ -334,6 +334,7 @@
"settings.logging.CloudLog.source": "CloudLog",
"settings.logging.CloudLog.details.URL": "网址",
"settings.logging.CloudLog.details.API": "API密钥",
"settings.logging.CloudLog.details.StationProfile": "车站简介",
"settings.logging.CloudLog.test.button": "测试",
"settings.logging.eQSLcc.source": "eQSL.cc",
"settings.logging.eQSLcc.details.user": "用户名",
@ -1078,4 +1079,4 @@
"COMMENT_sendAlerts.js": "",
"sendAlerts.scriptEnabled": "脚本启用",
"sendAlerts.scriptDisabled": "脚本关闭"
}
}

Wyświetl plik

@ -340,6 +340,7 @@
"settings.logging.CloudLog.source": "CloudLog",
"settings.logging.CloudLog.details.URL": "URL",
"settings.logging.CloudLog.details.API": "API Schlüssel",
"settings.logging.CloudLog.details.StationProfile": "Stationsprofil",
"settings.logging.CloudLog.test.button": "Test",
"settings.logging.eQSLcc.source": "eQSL.cc",
"settings.logging.eQSLcc.details.user": "Benutzername",
@ -1102,4 +1103,4 @@
"COMMENT_sendAlerts.js": "",
"sendAlerts.scriptEnabled": "Script Ein",
"sendAlerts.scriptDisabled": "Script Aus"
}
}

Wyświetl plik

@ -333,6 +333,7 @@
"settings.logging.CloudLog.source": "CloudLog",
"settings.logging.CloudLog.details.URL": "URL",
"settings.logging.CloudLog.details.API": "API Key",
"settings.logging.CloudLog.details.StationProfile": "Station Profile",
"settings.logging.CloudLog.test.button": "Test",
"settings.logging.eQSLcc.source": "eQSL.cc",
"settings.logging.eQSLcc.details.user": "User",

Wyświetl plik

@ -333,6 +333,7 @@
"settings.logging.CloudLog.source": "CloudLog",
"settings.logging.CloudLog.details.URL": "URL",
"settings.logging.CloudLog.details.API": "Llave de API",
"settings.logging.CloudLog.details.StationProfile": "Stacia Profilo",
"settings.logging.CloudLog.test.button": "Prueba",
"settings.logging.eQSLcc.source": "eQSL.cc",
"settings.logging.eQSLcc.details.user": "Usuario",

Wyświetl plik

@ -333,6 +333,7 @@
"settings.logging.CloudLog.source": "CloudLog",
"settings.logging.CloudLog.details.URL": "URL",
"settings.logging.CloudLog.details.API": "API Key",
"settings.logging.CloudLog.details.StationProfile": "Station Profile",
"settings.logging.CloudLog.test.button": "Test",
"settings.logging.eQSLcc.source": "eQSL.cc",
"settings.logging.eQSLcc.details.user": "User",
@ -1078,4 +1079,4 @@
"COMMENT_sendAlerts.js": "",
"sendAlerts.scriptEnabled": "Script activé",
"sendAlerts.scriptDisabled": "Script désactivé"
}
}

Wyświetl plik

@ -333,6 +333,7 @@
"settings.logging.CloudLog.source": "CloudLog",
"settings.logging.CloudLog.details.URL": "URL",
"settings.logging.CloudLog.details.API": "API Key",
"settings.logging.CloudLog.details.StationProfile": "Profilo della stazione",
"settings.logging.CloudLog.test.button": "Test",
"settings.logging.eQSLcc.source": "eQSL.cc",
"settings.logging.eQSLcc.details.user": "Utente",
@ -1078,4 +1079,4 @@
"COMMENT_sendAlerts.js": "",
"sendAlerts.scriptEnabled": "Script attivato",
"sendAlerts.scriptDisabled": "Script disattivato"
}
}

Wyświetl plik

@ -2192,6 +2192,107 @@ function CloudlogSendLogResult(buffer, flag)
}
}
function CloudlogGetProfiles()
{
CloudLogValidateURL(true);
CloudlogURL.value = CloudlogURL.value.endsWith("/") ? CloudlogURL.value.slice(0, -1) : CloudlogURL.value;
if (ValidateText(CloudlogURL) && ValidateText(CloudlogAPI))
{
getPostJSONBuffer(
CloudlogURL.value + "/index.php/api/station_info/" + CloudlogAPI.value,
CloudlogFillProfiles,
true,
"https",
80,
null,
10000,
CloudUrlErrorCallback,
"No Response<br/>or</br>Timeout"
);
}
else
{
CloudlogTestResult.innerHTML = "Missing Fields</br>Test Aborted";
}
}
function CloudlogTestApiKey(buffer, flag)
{
if (flag && flag == true)
{
CloudlogTestResult.style.backgroundColor = "black";
if (buffer)
{
parser = new DOMParser();
xmlDoc = parser.parseFromString(buffer, "text/xml");
if (xmlDoc.getElementsByTagName("status").length > 0)
{
state = xmlDoc.getElementsByTagName("status");
rights = xmlDoc.getElementsByTagName("rights");
if (rights[0].childNodes[0].nodeValue == "r")
{
CloudlogTestResult.innerHTML = "Read Only!";
CloudlogTestResult.style.backgroundColor = "red";
}
else if (rights[0].childNodes[0].nodeValue == "rw")
{
CloudlogTestResult.innerHTML = "OK";
CloudlogTestResult.style.backgroundColor = "green";
CloudlogGetProfiles();
}
}
else
{
if (xmlDoc.getElementsByTagName("message").length > 0)
{
message = xmlDoc.getElementsByTagName("message");
CloudlogTestResult.innerHTML = "Error: " + message[0].childNodes[0].nodeValue;
CloudlogTestResult.style.backgroundColor = "red";
}
}
}
else
{
CloudlogTestResult.innerHTML = "Invalid Response";
}
}
}
function CloudlogFillProfiles(buffer, flag)
{
if (flag && flag == true)
{
if (buffer)
{
select = document.getElementById("CloudlogStationProfile");
select.options.length = 0;
jsonData = JSON.parse(buffer);
for (var i = 0; i < jsonData.length; i++)
{
var item = jsonData[i];
var opt = document.createElement("option");
opt.value = item.station_id;
if (item.station_active == 1)
{
opt.style.fontWeight = "bold";
}
if (item.station_id == GT.adifLogSettings.text.CloudlogStationProfileID)
{
opt.style.color = "yellow";
opt.style.backgroundColor = "green";
opt.selected = "selected";
}
opt.innerHTML = item.station_profile_name + " (" + item.station_id + ")";
select.appendChild(opt);
}
}
else
{
CloudlogTestResult.innerHTML = "Invalid Response";
}
}
}
function qrzSendLogResult(buffer, flag)
{
let error = null;
@ -2357,9 +2458,11 @@ function sendCloudlogEntry(report)
if (logCloudlogQSOCheckBox.checked == true)
{
CloudLogValidateURL(true);
CloudlogURL.value = CloudlogURL.value.endsWith("/") ? CloudlogURL.value.slice(0, -1) : CloudlogURL.value;
var postData = { key: CloudlogAPI.value, station_profile_id: CloudlogStationProfileID.value, type: "adif", string: report };
getPostJSONBuffer(
CloudlogURL.value,
CloudlogURL.value + "/index.php/api/qso",
CloudlogSendLogResult,
null,
"https",
@ -2443,22 +2546,41 @@ function hrdCredentialTest(test)
}
}
function CloudLogValidateURL(shouldSaveIfChanged = false)
{
var initialValue = CloudlogURL.value;
CloudlogURL.value = CloudlogURL.value.replace("/index.php/api/qso", "")
if (shouldSaveIfChanged == true && CloudlogURL.value != initialValue)
{
GT.adifLogSettings.text.CloudlogURL = CloudlogURL.value;
saveAdifSettings();
}
}
function CloudLogProfileChanged(obj)
{
GT.adifLogSettings.text.CloudlogStationProfileID = obj.options[obj.selectedIndex].value;
GT.adifLogSettings.text.CloudlogStationProfileName = obj.options[obj.selectedIndex].text;
saveAdifSettings();
}
function CloudlogTest(test)
{
if (test && test == true)
{
if (ValidateText(CloudlogURL) && ValidateText(CloudlogAPI) && ValidateText(CloudlogStationProfileID))
CloudLogValidateURL(true);
CloudlogURL.value = CloudlogURL.value.endsWith("/") ? CloudlogURL.value.slice(0, -1) : CloudlogURL.value;
if (ValidateText(CloudlogURL) && ValidateText(CloudlogAPI))
{
CloudlogTestResult.innerHTML = "Testing";
CloudlogTestResult.innerHTML = "Testing API Key";
var postData = { key: CloudlogAPI.value, station_profile_id: CloudlogStationProfileID.value, type: "adif", string: "<eor>" };
getPostJSONBuffer(
CloudlogURL.value,
CloudlogSendLogResult,
CloudlogURL.value + "/index.php/api/auth/" + CloudlogAPI.value,
CloudlogTestApiKey,
test,
"https",
80,
postData,
null,
10000,
CloudUrlErrorCallback,
"No Response<br/>or</br>Timeout"
@ -2885,3 +3007,192 @@ function sendHRDLogbookEntry(report, port, address)
sendTcpMessage(command, command.length, Number(port), address);
}
function pskCallback(buffer, flag)
{
parsePSKadif(buffer);
}
GT.isGettingPsk = false;
function grabPsk24()
{
if (GT.isGettingPsk == true) return;
if (GT.appSettings.myCall.length > 0 && GT.appSettings.myCall != "NOCALL")
{
var days = 1;
if (pskImg.src == 1) days = 7;
getABuffer(
"https://pskreporter.info/cgi-bin/pskdata.pl?adif=1&days=" +
days +
"&receiverCallsign=" +
GT.appSettings.myCall.toLowerCase(),
pskCallback,
null,
"https",
443,
pskImg,
"GT.isGettingPsk"
);
}
}
function findAdiField(row, field)
{
var value = "";
var regex = new RegExp("<" + field + ":", "i");
var firstSplitArray = row.split(regex);
if (firstSplitArray && firstSplitArray.length == 2)
{
var secondSplitArray = firstSplitArray[1].split(">");
if (secondSplitArray.length > 1)
{
var newLenSearch = secondSplitArray[0].split(":");
var newLen = newLenSearch[0];
value = secondSplitArray[1].slice(0, newLen);
}
}
return value;
}
function parsePSKadif(adiBuffer)
{
var rawAdiBuffer = "";
if (typeof adiBuffer == "object") rawAdiBuffer = String(adiBuffer);
else rawAdiBuffer = adiBuffer;
var activeAdifArray = Array();
if (rawAdiBuffer.indexOf("PSKReporter") == -1) return;
if (rawAdiBuffer.length > 1)
{
var regex = new RegExp("<EOH>", "ig");
rawAdiBuffer = replaceAll(rawAdiBuffer, regex, "");
}
if (rawAdiBuffer.length > 1)
{
var regex = new RegExp("<EOR>", "i");
activeAdifArray = rawAdiBuffer.split(regex);
}
for (var x = 0; x < activeAdifArray.length; x++)
{
if (activeAdifArray[x].length > 0)
{
var finalMyGrid = findAdiField(
activeAdifArray[x],
"MY_GRIDSQUARE"
).toUpperCase();
var finalGrid = findAdiField(
activeAdifArray[x],
"GRIDSQUARE"
).toUpperCase();
var finalDXcall = findAdiField(activeAdifArray[x], "CALL");
var finalDEcall = findAdiField(activeAdifArray[x], "OPERATOR");
var finalRSTsent = findAdiField(activeAdifArray[x], "APP_PSKREP_SNR");
var dateVal = findAdiField(activeAdifArray[x], "QSO_DATE");
var timeVal = findAdiField(activeAdifArray[x], "TIME_ON");
var finalMode = findAdiField(activeAdifArray[x], "MODE");
var finalBand = formatBand(Number(findAdiField(activeAdifArray[x], "FREQ")));
var finalMsg = "-";
var finalDxcc = Number(findAdiField(activeAdifArray[x], "DXCC"));
if (finalDxcc == 0)
{
if (finalDXcall == GT.appSettings.myCall) finalDxcc = callsignToDxcc(finalDEcall);
else finalDxcc = callsignToDxcc(finalDXcall);
}
finalGrid = finalGrid.substr(0, 6);
var dateTime = new Date(
Date.UTC(
dateVal.substr(0, 4),
parseInt(dateVal.substr(4, 2)) - 1,
dateVal.substr(6, 2),
timeVal.substr(0, 2),
timeVal.substr(2, 2),
timeVal.substr(4, 2)
)
);
var finalTime = parseInt(dateTime.getTime() / 1000);
if (
finalGrid != "" &&
finalDXcall != "" &&
validateGridFromString(finalGrid)
)
{
if (finalDXcall == GT.appSettings.myCall)
{
addLiveCallsign(
finalMyGrid,
finalDEcall,
finalDXcall,
null,
finalTime,
finalMsg,
finalMode,
finalBand,
false,
false,
finalRSTsent,
finalDxcc,
null,
null,
null,
null,
null
);
}
else if (finalDEcall == GT.appSettings.myCall)
{
addLiveCallsign(
finalGrid,
finalDXcall,
"-",
finalRSTsent,
finalTime,
finalMsg,
finalMode,
finalBand,
false,
false,
null,
finalDxcc,
null,
null,
null,
null,
null
);
}
else
{
addLiveCallsign(
finalGrid,
finalDXcall,
finalDEcall,
finalRSTsent,
finalTime,
finalMsg,
finalMode,
finalBand,
false,
false,
null,
finalDxcc,
null,
null,
null,
null,
null
);
}
}
}
}
redrawLiveGrids();
updateCountStats();
}

Wyświetl plik

@ -6,9 +6,6 @@ GT.alerts = Object();
GT.classicAlerts = Object();
GT.phonetics = Object();
GT.enums = Object();
GT.speechSettings = Object();
GT.audioSettings = Object();
GT.speechAvailable = false;
GT.alertSettings = Object();
function loadAlerts()
@ -120,14 +117,6 @@ function loadAlerts()
}
};
GT.speechSettings = Object();
GT.audioSettings = Object();
GT.speechSettings.rate = 1;
GT.speechSettings.pitch = 1;
GT.speechSettings.volume = 1;
GT.speechSettings.voice = 0;
GT.speechSettings.phonetics = true;
GT.audioSettings.volume = 1;
saveAlerts();
}
else
@ -145,27 +134,8 @@ function loadAlerts()
{ delete GT.alerts[key]; }
if (GT.alerts[key].repeat == 3) delete GT.alerts[key];
}
GT.speechSettings = JSON.parse(localStorage.speechSettings);
GT.audioSettings = JSON.parse(localStorage.audioSettings);
}
if (GT.speechSettings.voice > 0)
{
alertVoiceInput.value = GT.speechSettings.voice - 1;
}
speechVolume.value = GT.speechSettings.volume;
speechPitch.value = GT.speechSettings.pitch;
speechRate.value = GT.speechSettings.rate;
speechPhonetics.checked = GT.speechSettings.phonetics;
speechVolumeTd.innerText = speechVolume.value;
speechPitchTd.innerText = speechPitch.value;
speechRateTd.innerText = speechRate.value;
audioVolume.value = GT.audioSettings.volume;
audioVolumeTd.innerText = parseInt(audioVolume.value * 100) + "%";
wantGrid.checked = GT.alertSettings.requireGrid;
wantMaxDT.checked = GT.alertSettings.wantMaxDT;
@ -299,17 +269,29 @@ function setAlertVisual()
else useseQSLDiv.style.display = "none";
}
function saveAlertSettings()
function setAudioView()
{
speechVolume.value = GT.audioSettings.speechVolume;
speechPitch.value = GT.audioSettings.speechPitch;
speechRate.value = GT.audioSettings.speechRate;
speechPhonetics.checked = GT.audioSettings.speechPhonetics;
speechVolumeTd.innerText = speechVolume.value;
speechPitchTd.innerText = speechPitch.value;
speechRateTd.innerText = speechRate.value;
audioVolume.value = GT.audioSettings.volume;
audioVolumeTd.innerText = parseInt(audioVolume.value * 100) + "%";
}
function saveAudioSettings()
{
localStorage.speechSettings = JSON.stringify(GT.speechSettings);
localStorage.audioSettings = JSON.stringify(GT.audioSettings);
}
function saveAlerts()
{
localStorage.savedAlerts = JSON.stringify(GT.alerts);
saveAlertSettings();
}
GT.testAudioTimer = null;
@ -322,7 +304,7 @@ function changeAudioValues()
audioVolumeTd.innerText = parseInt(audioVolume.value * 100) + "%";
GT.testAudioTimer = nodeTimers.setTimeout(playTestFile, 200);
saveAlertSettings();
saveAudioSettings();
}
function playTestFile()
@ -334,16 +316,16 @@ function changeSpeechValues()
{
chrome.tts.stop();
GT.speechSettings.volume = speechVolume.value;
GT.speechSettings.pitch = speechPitch.value;
GT.speechSettings.rate = speechRate.value;
GT.speechSettings.phonetics = speechPhonetics.checked;
GT.audioSettings.speechVolume = speechVolume.value;
GT.audioSettings.speechPitch = speechPitch.value;
GT.audioSettings.speechRate = speechRate.value;
GT.audioSettings.speechPhonetics = speechPhonetics.checked;
speechVolumeTd.innerText = speechVolume.value;
speechPitchTd.innerText = speechPitch.value;
speechRateTd.innerText = speechRate.value;
saveAlertSettings();
saveAudioSettings();
}
function addNewAlert()
@ -629,7 +611,7 @@ function handleAlert(nAlert, target, lastMessage, callsignRecord, grid)
function playAlertMediaFile(filename)
{
if (GT.appSettings.alertMute == 1) return;
if (GT.audioSettings.alertMute == 1) return;
// check if this is an alert stored with an older version of GT
// which has a full file path given.
@ -657,7 +639,7 @@ function stringToPhonetics(string)
var newMsg = "";
for (var x = 0; x < string.length; x++)
{
if (GT.speechSettings.phonetics == true)
if (GT.audioSettings.speechPhonetics == true)
{ newMsg += GT.phonetics[string.substr(x, 1)]; }
else
{
@ -672,7 +654,7 @@ function stringToPhonetics(string)
function speakQRZString(caller, words, you)
{
if (GT.appSettings.alertMute == 0)
if (GT.audioSettings.alertMute == 0)
{
var sCaller = "";
var sYou = "";
@ -684,11 +666,11 @@ function speakQRZString(caller, words, you)
var speak = sCaller.trim() + ", " + words.trim() + ", " + sYou.trim();
var msg = new SpeechSynthesisUtterance(speak);
msg.lang = GT.localeString;
if (GT.speechSettings.voice > 0)
{ msg.voice = GT.voices[GT.speechSettings.voice - 1]; }
msg.rate = GT.speechSettings.rate;
msg.pitch = GT.speechSettings.pitch;
msg.volume = GT.speechSettings.volume;
if (GT.audioSettings.speechVoice > 0)
{ msg.voice = GT.voices[GT.audioSettings.speechVoice - 1]; }
msg.rate = GT.audioSettings.speechRate;
msg.pitch = GT.audioSettings.speechPitch;
msg.volume = GT.audioSettings.speechVolume;
window.speechSynthesis.speak(msg);
}
}
@ -696,7 +678,7 @@ function speakQRZString(caller, words, you)
function speakAlertString(what, message, target)
{
if (GT.appSettings.alertMute == 0)
if (GT.audioSettings.alertMute == 0)
{
var sMsg = "";
var sTarget = "";
@ -708,11 +690,11 @@ function speakAlertString(what, message, target)
var speak = what.trim() + ", " + sMsg.trim() + ", " + sTarget.trim();
var msg = new SpeechSynthesisUtterance(speak);
msg.lang = GT.localeString;
if (GT.speechSettings.voice > 0)
{ msg.voice = GT.voices[GT.speechSettings.voice - 1]; }
msg.rate = GT.speechSettings.rate;
msg.pitch = GT.speechSettings.pitch;
msg.volume = GT.speechSettings.volume;
if (GT.audioSettings.speechVoice > 0)
{ msg.voice = GT.voices[GT.audioSettings.speechVoice - 1]; }
msg.rate = GT.audioSettings.speechRate;
msg.pitch = GT.audioSettings.speechPitch;
msg.volume = GT.audioSettings.speechVolume;
window.speechSynthesis.speak(msg);
}
}

Wyświetl plik

@ -26,7 +26,6 @@ var validSettings = [
"receptionSettings",
"rosterSettings",
"savedAlerts",
"speechSettings",
"startupLogs",
"trustedQslSettings",
"screenSettings",
@ -35,7 +34,6 @@ var validSettings = [
];
var def_appSettings = {
alertMute: 0,
centerGridsquare: "",
chatUUID: "",
clearOnCQ: false,
@ -146,10 +144,12 @@ var def_adifLogSettings = {
buttonAdifCheckBox: false,
buttonClubCheckBox: false,
buttonLOTWCheckBox: false,
buttonQRZCheckBox: false
buttonQRZCheckBox: false,
buttonPsk24CheckBox: false
},
startup: {
loadAdifCheckBox: false,
loadPsk24CheckBox: false,
loadQRZCheckBox: false,
loadLOTWCheckBox: false,
loadClubCheckBox: false,
@ -179,9 +179,10 @@ var def_adifLogSettings = {
qrzApiKey: "",
HRDLOGCallsign: "",
HRDLOGUploadCode: "",
CloudlogURL: "http://127.0.0.1/index.php/api/qso",
CloudlogURL: "http://127.0.0.1",
CloudlogAPI: "",
CloudlogStationProfileID: "1",
CloudlogStationProfileName: "",
eQSLUser: "",
eQSLPassword: "",
eQSLNickname: "",
@ -299,6 +300,16 @@ var def_pstrotatorSettings = {
ip: "127.0.0.1"
};
var def_audioSettings = {
alertMute: 0,
speechRate: 1,
speechPitch: 1,
speechVolume: 1,
speechVoice: 0,
speechPhonetics: true,
volume: 1
};
var def_qso = {
band: "",
cnty: null,

Wyświetl plik

@ -81,6 +81,8 @@ GT.mapSettings = {};
GT.legendColors = {};
GT.adifLogSettings = {};
GT.msgSettings = {};
GT.audioSettings = {};
GT.speechAvailable = false;
GT.receptionSettings = {};
GT.receptionReports = {
lastDownloadTimeSec: 0,
@ -133,6 +135,7 @@ function loadAllSettings()
GT.appSettings = loadDefaultsAndMerge("appSettings", def_appSettings);
GT.mapSettings = loadDefaultsAndMerge("mapSettings", def_mapSettings);
GT.legendColors = loadDefaultsAndMerge("legendColors", def_legendColors);
GT.audioSettings = loadDefaultsAndMerge("audioSettings", def_audioSettings);
GT.adifLogSettings = loadDefaultsAndMerge("adifLogSettings", def_adifLogSettings);
if (typeof GT.adifLogSettings.lastFetch.lotw_qso == "string")
{
@ -316,6 +319,7 @@ function saveAndCloseApp(shouldRestart = false)
}
saveAppSettings();
saveAudioSettings();
saveAdifSettings();
saveMapSettings();
saveLegendColors();
@ -832,7 +836,7 @@ function toggleOffline()
GT.mapSettings.offlineMode = true;
offlineImg.src = GT.mapImageArray[0];
conditionsButton.style.display = "none";
buttonPsk24CheckBoxDiv.style.display = "none";
buttonQRZCheckBoxDiv.style.display = "none";
buttonLOTWCheckBoxDiv.style.display = "none";
buttonClubCheckBoxDiv.style.display = "none";
@ -9176,6 +9180,29 @@ function validateMapBandAndMode(band, mode)
}
}
function redrawLiveGrids()
{
for (var i in GT.liveCallsigns)
{
if (GT.appSettings.gridViewMode != 2 && validateMapBandAndMode(GT.liveCallsigns[i].band, GT.liveCallsigns[i].mode))
{
if (GT.appSettings.gridViewMode == 1 || GT.appSettings.gridViewMode == 3)
{
qthToBox(
GT.liveCallsigns[i].grid,
GT.liveCallsigns[i].DEcall,
false,
false,
GT.liveCallsigns[i].DXcall,
GT.liveCallsigns[i].band,
GT.liveCallsigns[i].wspr,
i
);
}
}
}
}
function redrawGrids()
{
if (GT.appSettings.gridViewMode == 2) removePaths();
@ -9451,26 +9478,7 @@ function redrawGrids()
}
}
for (var i in GT.liveCallsigns)
{
if (GT.appSettings.gridViewMode != 2 && validateMapBandAndMode(GT.liveCallsigns[i].band, GT.liveCallsigns[i].mode))
{
if (GT.appSettings.gridViewMode == 1 || GT.appSettings.gridViewMode == 3)
{
qthToBox(
GT.liveCallsigns[i].grid,
GT.liveCallsigns[i].DEcall,
false,
false,
GT.liveCallsigns[i].DXcall,
GT.liveCallsigns[i].band,
GT.liveCallsigns[i].wspr,
i
);
}
}
}
redrawLiveGrids();
reloadInfo();
setHomeGridsquare();
setTrophyOverlay(GT.currentOverlay);
@ -9480,22 +9488,13 @@ function redrawGrids()
function toggleAlertMute()
{
GT.appSettings.alertMute ^= 1;
alertMuteImg.src = GT.alertImageArray[GT.appSettings.alertMute];
if (GT.appSettings.alertMute == 1)
{
chrome.tts.stop();
}
}
function muteAlerts()
{
GT.appSettings.alertMute = 1;
alertMuteImg.src = GT.alertImageArray[GT.appSettings.alertMute];
if (GT.appSettings.alertMute == 1)
GT.audioSettings.alertMute ^= 1;
alertMuteImg.src = GT.alertImageArray[GT.audioSettings.alertMute];
if (GT.audioSettings.alertMute == 1)
{
chrome.tts.stop();
}
saveAudioSettings();
}
function togglePushPinMode()
@ -11582,8 +11581,6 @@ function changeMapValues()
saveMapSettings();
saveAlertSettings();
var pathColor =
GT.mapSettings.pathColor == 0
? "#000"
@ -11730,12 +11727,10 @@ function changeMapLayer()
function voiceChangedValue()
{
GT.speechSettings.voice = Number(alertVoiceInput.value) + 1;
GT.audioSettings.speechVoice = Number(alertVoiceInput.value) + 1;
changeSpeechValues();
}
GT.alertsLoaded = false;
function timedGetVoices()
{
voicesDiv.innerHTML = "";
@ -11758,13 +11753,13 @@ function timedGetVoices()
}
newSelect.oninput = voiceChangedValue;
voicesDiv.appendChild(newSelect);
if (GT.audioSettings.speechVoice > 0)
{
alertVoiceInput.value = GT.audioSettings.speechVoice - 1;
}
}
GT.speechAvailable = true;
if (GT.alertsLoaded == false)
{
loadAlerts();
GT.alertsLoaded = true;
}
}
function initSpeech()
@ -11785,6 +11780,8 @@ function initSoundCards()
updateSoundCards();
}
updateSoundCards();
setAudioView();
loadAlerts();
}
function updateSoundCards()
@ -11803,7 +11800,7 @@ function gotAudioDevices(deviceInfos)
let newSelect = document.createElement("select");
newSelect.id = "soundCardInput";
newSelect.title = "Select Sound Card";
let uniqueDeviceCount = 0;
for (let i = 0; i !== deviceInfos.length; ++i)
{
let deviceInfo = deviceInfos[i];
@ -11811,10 +11808,7 @@ function gotAudioDevices(deviceInfos)
{
let option = document.createElement("option");
option.value = deviceInfo.deviceId;
if (deviceInfo.deviceId != "default" && deviceInfo.deviceId != "communications")
{
uniqueDeviceCount++;
}
option.text = deviceInfo.label || "Speaker " + (newSelect.length + 1);
newSelect.appendChild(option);
}
@ -11822,12 +11816,6 @@ function gotAudioDevices(deviceInfos)
newSelect.oninput = soundCardChangedValue;
soundCardDiv.appendChild(newSelect);
soundCardInput.value = GT.soundCard;
// Auto-mute if we have 1 or no soundcards.
if (uniqueDeviceCount < 2)
{
muteAlerts();
}
}
function soundCardChangedValue()
@ -12144,6 +12132,13 @@ function loadAdifSettings()
logLOTWqsoCheckBox.checked = false;
}
}
select = document.getElementById("CloudlogStationProfile");
select.options.length = 0;
var opt = document.createElement("option");
opt.value = GT.adifLogSettings.text.CloudlogStationProfileID;
opt.innerHTML = GT.adifLogSettings.text.CloudlogStationProfileName;
select.appendChild(opt);
CloudLogValidateURL(true);
setAdifStartup(loadAdifCheckBox);
ValidateQrzApi(qrzApiKey);
}
@ -12182,7 +12177,7 @@ function startupButtonsAndInputs()
gtShareFlagImg.src =
GT.gtShareFlagImageArray[GT.appSettings.gtShareEnable == false ? 0 : 1];
alertMuteImg.src = GT.alertImageArray[GT.appSettings.alertMute];
alertMuteImg.src = GT.alertImageArray[GT.audioSettings.alertMute];
modeImg.src = GT.maidenheadModeImageArray[GT.appSettings.sixWideMode];
if (GT.appSettings.centerGridsquare.length > 0)
@ -12195,6 +12190,7 @@ function startupButtonsAndInputs()
if (GT.mapSettings.offlineMode == true)
{
conditionsButton.style.display = "none";
buttonPsk24CheckBoxDiv.style.display = "none";
buttonQRZCheckBoxDiv.style.display = "none";
buttonLOTWCheckBoxDiv.style.display = "none";
buttonClubCheckBoxDiv.style.display = "none";
@ -12372,6 +12368,7 @@ function directoryInput(what)
function endStartup()
{
openStatsWindow(false);
if (loadPsk24CheckBox.checked == true) grabPsk24();
startupAdifLoadCheck();
}
@ -12556,10 +12553,7 @@ function wsjtUdpMessage(msg, length, port, address)
function checkWsjtxListener()
{
if (
GT.wsjtUdpServer == null ||
(GT.wsjtUdpSocketReady == false && GT.wsjtUdpSocketError == true)
)
if (GT.wsjtUdpServer == null || (GT.wsjtUdpSocketReady == false && GT.wsjtUdpSocketError == true))
{
GT.wsjtCurrentPort = -1;
GT.wsjtCurrentIP = "none";
@ -12574,6 +12568,7 @@ GT.activeInstance = "";
GT.activeIndex = 0;
GT.currentID = null;
GT.lastWsjtMessageByPort = {};
function updateWsjtxListener(port)
{
@ -12608,8 +12603,19 @@ function updateWsjtxListener(port)
{
var address = GT.wsjtUdpServer.address();
GT.wsjtUdpServer.setBroadcast(true);
GT.wsjtUdpServer.setMulticastTTL(128);
GT.wsjtUdpServer.addMembership(GT.appSettings.wsjtIP);
GT.wsjtUdpServer.setMulticastTTL(3);
var interfaces = os.networkInterfaces();
for (var i in interfaces)
{
for (var x in interfaces[i])
{
if (interfaces[i][x].family == "IPv4")
{
GT.wsjtUdpServer.addMembership(GT.appSettings.wsjtIP, interfaces[i][x].address);
console.log("Adding Multicast to: " + interfaces[i][x].address);
}
}
}
GT.wsjtUdpSocketReady = true;
});
}
@ -12630,14 +12636,23 @@ function updateWsjtxListener(port)
GT.wsjtUdpSocketReady = false;
GT.wsjtUdpSocketError = true;
});
GT.wsjtUdpServer.on("message", function (message, remote)
{
// if (GT.closing == true) true;
if (!(remote.port in GT.lastWsjtMessageByPort))
{
GT.lastWsjtMessageByPort[remote.port] = Buffer.from([0x01]);
}
if (
typeof udpForwardEnable != "undefined" &&
udpForwardEnable.checked == true
)
let testBuffer = Buffer.from(message);
if (testBuffer.equals(GT.lastWsjtMessageByPort[remote.port]))
{
return;
}
GT.lastWsjtMessageByPort[remote.port] = testBuffer;
if (typeof udpForwardEnable != "undefined" && udpForwardEnable.checked == true)
{
sendForwardUdpMessage(
message,

Wyświetl plik

@ -1,7 +1,7 @@
{
"name": "GridTracker",
"product_string_do_not_use": "gridtracker",
"version": "1.24.0512",
"version": "1.24.0707",
"betaVersion": "",
"description": "GridTracker: An Amateur Radio Companion",
"author": "GridTracker.org",