Skip to content

Commit b6edce8

Browse files
authored
Merge pull request #2119 from phl0/parseFreq
Make sure frequencies have 3 decimal digits
2 parents 83ebfb5 + 45d94a7 commit b6edce8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

application/views/interface_assets/footer.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -1255,7 +1255,7 @@ function setRst(mode) {
12551255
}
12561256
} else {
12571257
$(".radio_timeout_error" ).remove();
1258-
text = '<i class="fas fa-broadcast-tower"></i><span style="margin-left:10px;"></span><b>TX:</b> '+parseInt(data.frequency)/1000/1000+' MHz';
1258+
text = '<i class="fas fa-broadcast-tower"></i><span style="margin-left:10px;"></span><b>TX:</b> '+(Math.round(parseInt(data.frequency)/1000)/1000).toFixed(3)+' MHz';
12591259
if(data.power != null && data.power != 0) {
12601260
text = text+'<span style="margin-left:10px"></span>'+data.power+'W';
12611261
}
@@ -1266,10 +1266,10 @@ function setRst(mode) {
12661266
}
12671267
}
12681268
if(data.frequency_rx != null && data.frequency_rx != 0) {
1269-
text = text+'<span style="margin-left:10px"></span><b>RX:</b> '+parseInt(data.frequency_rx)/1000/1000+' MHz)';
1269+
text = text+'<span style="margin-left:10px"></span><b>RX:</b> '+(Math.round(parseInt(data.frequency_rx)/1000)/1000).toFixed(3)+' MHz)';
12701270
}
12711271
if (! $('#radio_cat_state').length) {
1272-
$('.qso_panel').prepend('<div id="radio_cat_state" class="alert alert-success radio_cat_state" role="alert">'+text+'</div>');
1272+
$('.qso_panel').prepend('<div aria-hidden="true"><div id="radio_cat_state" class="alert alert-success radio_cat_state" role="alert">'+text+'</div></div>');
12731273
} else {
12741274
$('#radio_cat_state').html(text);
12751275
}

0 commit comments

Comments
 (0)