diff --git a/dev_ui/dbupdate.php b/dev_ui/dbupdate.php index 48da6cbf..2573e609 100644 --- a/dev_ui/dbupdate.php +++ b/dev_ui/dbupdate.php @@ -22,6 +22,7 @@ # Check and Update Database Structure with new fields if they don't already exist $classDB->add_record('settings','ID_Only_When_Active','False'); +$classDB->add_record('settings','CARD_CHANNELS','2'); $classDB->add_record('settings','Location_Info',''); $classDB->add_record('settings','LinkGroup_Settings',''); $classDB->add_record('system_flags','config_files',''); @@ -130,4 +131,4 @@ function serial2JSON($setting, $table, $db) { // SESSION CHECK TO SEE IF USER IS LOGGED IN. } // close ELSE to end login check from top of page // -------------------------------------------------------- -?> \ No newline at end of file +?> diff --git a/includes/classes/SVXLink.php b/includes/classes/SVXLink.php index 082d2e2e..ae2e8e9b 100644 --- a/includes/classes/SVXLink.php +++ b/includes/classes/SVXLink.php @@ -95,6 +95,8 @@ public function build_global() { $global_array['CFG_DIR'] = 'svxlink.d'; $global_array['TIMESTAMP_FORMAT'] = '"%c"'; $global_array['CARD_SAMPLE_RATE'] = '48000'; + $cardChannels = isset($this->settingsArray['CARD_CHANNELS']) ? $this->settingsArray['CARD_CHANNELS'] : '2'; + $global_array['CARD_CHANNELS'] = (is_numeric($cardChannels) && $cardChannels >= 1) ? (int) $cardChannels : '2'; //$global_array['LOCATION_INFO'] = 'LocationInfo'; // Add Link Sections if defined diff --git a/install/dev/openrepeater.db b/install/dev/openrepeater.db index fc1a8e2d..5bc14863 100755 Binary files a/install/dev/openrepeater.db and b/install/dev/openrepeater.db differ diff --git a/install/dev/test.php b/install/dev/test.php index be72d73e..e9bd1475 100644 --- a/install/dev/test.php +++ b/install/dev/test.php @@ -14,6 +14,7 @@ "rxTone" => "", "txTailValueSec" => "2", "txTone" => "", + "CARD_CHANNELS" => "2", "courtesyMode" => "beep", "ID_Short_Mode" => "morse", "ID_Long_Mode" => "voice", diff --git a/install/sql/openrepeater.db b/install/sql/openrepeater.db index c1f7776b..297c481d 100755 Binary files a/install/sql/openrepeater.db and b/install/sql/openrepeater.db differ diff --git a/install/svxlink-conf/svxlink.conf b/install/svxlink-conf/svxlink.conf index d3ed0a53..60a96f58 100755 --- a/install/svxlink-conf/svxlink.conf +++ b/install/svxlink-conf/svxlink.conf @@ -10,6 +10,7 @@ LOGICS=RepeaterLogic,LinkLogic CFG_DIR=svxlink.d TIMESTAMP_FORMAT="%c" CARD_SAMPLE_RATE=16000 +CARD_CHANNELS=2 #LOCATION_INFO=LocationInfo #LINKS=ALLlink,NetLink HEARTBEAT_TIMEOUT = 10 @@ -366,4 +367,3 @@ CALLSIGN=ER-MYCALL 1=EchoLink:9999# 9=Parrot:0123456789# 03400=EchoLink:9999# - diff --git a/settings.php b/settings.php index 5df6b919..87f7816b 100755 --- a/settings.php +++ b/settings.php @@ -15,6 +15,8 @@ // $customCSS = 'page-ports.css'; // 'file1.css, file2.css, ... ' include('includes/header.php'); + +$cardChannels = isset($settings['CARD_CHANNELS']) ? $settings['CARD_CHANNELS'] : '2'; ?> @@ -72,6 +74,15 @@ +