More RTL Tweaks; #125

This commit is contained in:
lwvmobile 2023-05-18 10:22:05 -04:00
parent 7b6feb9e4f
commit b008122149
3 changed files with 13 additions and 10 deletions

View File

@ -517,9 +517,9 @@ initOpts (dsd_opts * opts)
opts->delay = 0;
opts->use_cosine_filter = 1;
opts->unmute_encrypted_p25 = 0;
//all RTL user options
//all RTL user options -- enabled AGC by default due to weak signal related issues
opts->rtl_dev_index = 0; //choose which device we want by index number
opts->rtl_gain_value = 28; //mid value, 0 - AGC (not recommended) 49 highest value
opts->rtl_gain_value = 0; //mid value, 0 - AGC - 0 to 49 acceptable values
opts->rtl_squelch_level = 0; //fully open by default, want to specify level for things like NXDN with false positives
opts->rtl_volume_multiplier = 1; //sample multiplier; This multiplies the sample value to produce a higher 'inlvl'
opts->rtl_udp_port = 0; //set UDP port for RTL remote -- 0 by default, will be making this optional for some external/legacy use cases (edacs-fm, etc)
@ -1384,7 +1384,7 @@ main (int argc, char **argv)
break;
case 'z':
sscanf (optarg, "%d", &opts.slot_preference);
sscanf (optarg, "%c", &opts.slot_preference);
opts.slot_preference--; //user inputs 1 or 2, internally we want 0 and 1
if (opts.slot_preference > 1) opts.slot_preference = 1;
fprintf (stderr, "TDMA (DMR and P2) Slot Voice Preference is Slot %d. \n", opts.slot_preference+1);

View File

@ -2131,12 +2131,15 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
}
if (opts->audio_in_type == 3)
{
printw ("| RTL2838UHIDIR: %d", opts->rtl_dev_index);
printw (" Gain: %idB", opts->rtl_gain_value);
printw (" PPM: %i", opts->rtlsdr_ppm_error);
printw (" SQ: %i", opts->rtl_squelch_level);
printw (" BW %i kHz", opts->rtl_bandwidth);
printw (" Frequency: %i Hz", opts->rtlsdr_center_freq);
printw ("| RTL Dev: %d;", opts->rtl_dev_index);
if (opts->rtl_gain_value == 0)
printw (" Gain: AGC;");
else
printw (" Gain: %idB;", opts->rtl_gain_value);
printw (" PPM: %i;", opts->rtlsdr_ppm_error);
printw (" SQ: %i;", opts->rtl_squelch_level);
printw (" BW: %i kHz;", opts->rtl_bandwidth);
printw (" FREQ: %i Hz;", opts->rtlsdr_center_freq);
if (opts->rtl_udp_port != 0) printw ("\n| External Tuning on UDP Port: %i", opts->rtl_udp_port);
printw ("\n");
}

View File

@ -753,7 +753,7 @@ static void optimal_settings(int freq, int rate)
dm->output_scale = 1;}
d->freq = (uint32_t)capture_freq;
d->rate = (uint32_t)capture_rate;
fprintf (stderr, "Capture Frequency: %i Rate: %i \n", capture_freq, capture_rate);
// fprintf (stderr, "Capture Frequency: %i Rate: %i \n", capture_freq, capture_rate);
}
static void *controller_thread_fn(void *arg)