From 096faa30121ecd95b0e12bd59973202c221878dc Mon Sep 17 00:00:00 2001 From: Andy Date: Fri, 14 Dec 2018 19:32:05 +0000 Subject: [PATCH] Revert "Fixed adding non 'SSB','DATA','CW' qso" This reverts commit 45f2896a49b5ba737e444419fe2095f2459ac2b1. --- application/libraries/Frequency.php | 33 ++++---------------------- application/views/qso/index.php | 36 +++++++++++++++++++++-------- 2 files changed, 31 insertions(+), 38 deletions(-) diff --git a/application/libraries/Frequency.php b/application/libraries/Frequency.php index d19a8c64..2bd4b5e7 100644 --- a/application/libraries/Frequency.php +++ b/application/libraries/Frequency.php @@ -1,12 +1,6 @@ array( 'SSB'=>"1900000", @@ -81,34 +75,17 @@ class Frequency { 'DATA'=>"1022500000", 'CW'=>"1022500000") ); - /* Class to convert band and mode into a frequnecy in a format based on the specifications of the database table */ public function convent_band($band, $mode='SSB') { - // Modes for which we've set a frequency - $known_modes = array('SSB', 'DATA', 'CW'); - - // Data modes that are being treated as 'DATA' for frequency lookup - $data_modes = array('PSK31','PSK63','RTTY', - 'JT65','JT65B','JT6C','JT9-1','JT9','FT8', - 'FSK441','JTMS','ISCAT','MSK144','JTMSK', - 'QRA64','PKT','SSTV','HELL','HELL80'); - - // Use 'DATA' for any of the data modes - if(in_array($mode, $data_modes)){ - $mode= "DATA"; + if($mode == "PSK31" || $mode == "PSK63" || $mode == "RTTY" || $mode == "JT65"){ + $mode= "DATA"; } - // If the mode isn't listed, default to SSB frequency - if (!in_array($mode, $known_modes)){ - $mode = 'SSB'; - } + return $this->defaultFrequencies[$band][$mode]; - return $this->defaultFrequencies[$band][$mode]; - - } - - public function GetBand($Frequency) { +} +public function GetBand($Frequency) { $Band = NULL; if ($Frequency > 1000000 && $Frequency < 2000000) { $Band = "160m"; diff --git a/application/views/qso/index.php b/application/views/qso/index.php index abee9921..e25f48f4 100644 --- a/application/views/qso/index.php +++ b/application/views/qso/index.php @@ -69,15 +69,31 @@ Mode Band @@ -476,4 +492,4 @@ } - + \ No newline at end of file