mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
fixing an old bug where qrg_unit was set for the old band instead for the new one
This commit is contained in:
@@ -119,22 +119,27 @@ async function set_new_qrg() {
|
||||
|
||||
// calculate the other stuff
|
||||
let qrg_hz;
|
||||
let new_band;
|
||||
switch (unit) {
|
||||
case 'Hz':
|
||||
qrg_hz = parsed_qrg;
|
||||
localStorage.setItem('qrgunit_' + $('#band').val(), 'Hz');
|
||||
new_band = frequencyToBand(qrg_hz);
|
||||
localStorage.setItem('qrgunit_' + new_band, 'Hz');
|
||||
break;
|
||||
case 'kHz':
|
||||
qrg_hz = parsed_qrg * 1000;
|
||||
localStorage.setItem('qrgunit_' + $('#band').val(), 'kHz');
|
||||
new_band = frequencyToBand(qrg_hz);
|
||||
localStorage.setItem('qrgunit_' + new_band, 'kHz');
|
||||
break;
|
||||
case 'MHz':
|
||||
qrg_hz = parsed_qrg * 1000000;
|
||||
localStorage.setItem('qrgunit_' + $('#band').val(), 'MHz');
|
||||
new_band = frequencyToBand(qrg_hz);
|
||||
localStorage.setItem('qrgunit_' + new_band, 'MHz');
|
||||
break;
|
||||
case 'GHz':
|
||||
qrg_hz = parsed_qrg * 1000000000;
|
||||
localStorage.setItem('qrgunit_' + $('#band').val(), 'GHz');
|
||||
new_band = frequencyToBand(qrg_hz);
|
||||
localStorage.setItem('qrgunit_' + new_band, 'GHz');
|
||||
break;
|
||||
default:
|
||||
qrg_hz = 0;
|
||||
@@ -143,7 +148,7 @@ async function set_new_qrg() {
|
||||
|
||||
$('#frequency').val(qrg_hz);
|
||||
$('#freq_calculated').val(parsed_qrg);
|
||||
$('#band').val(frequencyToBand(qrg_hz));
|
||||
$('#band').val(new_band);
|
||||
|
||||
// Clear the manual update flag
|
||||
window.user_updating_frequency = false;
|
||||
|
||||
Reference in New Issue
Block a user