diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index 03271048..5f7651cc 100644 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -60,7 +60,7 @@ class Logbook_model extends CI_Model { 'COL_IOTA' => trim($this->input->post('iota_ref')), 'COL_MY_GRIDSQUARE' => strtoupper($locator), 'COL_DISTANCE' => "0", - 'COL_FREQ_RX' => 0, + 'COL_FREQ_RX' => $this->input->post('freq_display_rx'), 'COL_BAND_RX' => null, 'COL_ANT_AZ' => null, 'COL_ANT_EL' => null, @@ -141,7 +141,7 @@ class Logbook_model extends CI_Model { 'COL_IOTA' => trim($this->input->post('iota_ref')), 'COL_MY_GRIDSQUARE' => $locator, 'COL_DISTANCE' => "0", - 'COL_FREQ_RX' => 0, + 'COL_FREQ_RX' => $this->input->post('freq_display_rx'), 'COL_BAND_RX' => null, 'COL_ANT_AZ' => null, 'COL_ANT_EL' => null, @@ -255,7 +255,7 @@ class Logbook_model extends CI_Model { 'COL_IOTA' => $this->input->post('iota_ref'), 'COL_QTH' => $this->input->post('qth'), 'COL_PROP_MODE' => $this->input->post('prop_mode'), - 'COL_FREQ_RX' => '0', + 'COL_FREQ_RX' => $this->input->post('freq_display_rx'), 'COL_STX_STRING' => $this->input->post('stx_string'), 'COL_SRX_STRING' => $this->input->post('srx_string') ); diff --git a/application/views/qso/index.php b/application/views/qso/index.php index b7ede3cc..c23ea6c5 100644 --- a/application/views/qso/index.php +++ b/application/views/qso/index.php @@ -215,7 +215,11 @@ Frequency - + + + + Frequency (RX) + @@ -337,7 +341,13 @@ $(".band").val(frequencyToBand(result)); } }); - + $.get('radio/frequency_downlink/' + $('select.radios option:selected').val(), function(result) { + if(result == "0") { + } else { + $('#frequency_rx').val(result); + } + }); + // Get Mode $.get('radio/mode/' + $('select.radios option:selected').val(), function(result) { if (result == "LSB" || result == "USB" || result == "SSB") { @@ -415,15 +425,21 @@ $(window).bind('beforeunload', catcher); }); - $.get('qso/band_to_freq/' + $('.band').val() + '/' + $('.mode').val(), function(result) { + // Only set the frequency when not set by userdata/PHP. + if ($('#frequency').val() == "") + { + $.get('qso/band_to_freq/' + $('.band').val() + '/' + $('.mode').val(), function(result) { $('#frequency').val(result); - }); + $('#frequency_rx').val(""); + }); + } /* Calculate Frequency */ /* on band change */ $('.band').change(function() { $.get('qso/band_to_freq/' + $(this).val() + '/' + $('.mode').val(), function(result) { $('#frequency').val(result); + $('#frequency_rx').val(""); }); }); @@ -431,9 +447,9 @@ $('.mode').change(function() { $.get('qso/band_to_freq/' + $('.band').val() + '/' + $('.mode').val(), function(result) { $('#frequency').val(result); + $('#frequency_rx').val(""); }); - }); - + }); /* On Key up Calculate Bearing and Distance */ $("#locator").keyup(function(){ if ($(this).val()) {