Take CATUrl of chosen radio for setting QRG

This commit is contained in:
int2001
2024-11-08 14:46:16 +00:00
parent f00ae47469
commit 1d09e4e92d

View File

@@ -216,7 +216,7 @@ $(function() {
}
try {
irrelevant=fetch('http://127.0.0.1:54321/'+qrg);
irrelevant=fetch(CatCallbackURL + '/'+qrg);
} finally {}
let check_pong = setInterval(function() {
@@ -269,7 +269,9 @@ $(function() {
}
});
var CatCallbackURL = "http://127.0.0.1:54321";
var updateFromCAT = function() {
if($('select.radios option:selected').val() != '0') {
radioID = $('select.radios option:selected').val();
$.getJSON( base_url+"index.php/radio/json/" + radioID, function( data ) {
@@ -287,7 +289,7 @@ $(function() {
$(".radio_login_error" ).remove();
}
var band = frequencyToBand(data.frequency);
CatCallbackURL=data.cat_url;
if (band !== $("#band").val()) {
$("#band").val(band);
$("#band").trigger("change");