Add RTL VFO bandwidth options

Add RTL VFO bandwidth options
-Y 8 for 8 kHz VFO
-Y 24 for 24 kHz VFO

Should work at any interval where 48 cleanly divides by a number
This commit is contained in:
lwvmobile
2022-02-05 13:30:44 -05:00
committed by GitHub
parent 6573521363
commit b66cac75d2
3 changed files with 35 additions and 10 deletions

View File

@@ -185,6 +185,7 @@ initOpts (dsd_opts * opts)
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; //set multipler from rtl sample to 'boost volume'
opts->rtl_udp_port = 6020; //set UDP port for RTL remote
opts->rtl_bandwidth = 48; //48000 default value
}
void
@@ -327,7 +328,8 @@ usage ()
printf (" -D <num> RTL-SDR Device Index Number\n");
printf (" -G <num> RTL-SDR Device Gain (0-49) (default = 0 Auto Gain)\n");
printf (" -L <num> RTL-SDR Squelch Level (0 - Open, 25 - Little, 50 - Higher)(Just have to guess really...)\n");
printf (" -V <num> RTL-SDR Sample Gain Multiplier (default = 1)(2-3 recommended, still testing) \n");
printf (" -V <num> RTL-SDR Sample Gain Multiplier (default = 1)(1-3 recommended, still testing) \n");
printf (" -Y <num> RTL-SDR VFO Bandwidth kHz (default = 48)(6, 8, 12, 16, 24, 48) \n");
printf (" -U <num> RTL-SDR UDP Remote Port (default = 6020)\n");
printf ("\n");
printf ("Scanner control options:\n");
@@ -574,7 +576,7 @@ main (int argc, char **argv)
exitflag = 0;
signal (SIGINT, sigfun);
while ((c = getopt (argc, argv, "haep:P:qstv:z:i:o:d:c:g:nw:B:C:R:f:m:u:x:A:S:M:G:D:L:V:U:Wrl")) != -1)
while ((c = getopt (argc, argv, "haep:P:qstv:z:i:o:d:c:g:nw:B:C:R:f:m:u:x:A:S:M:G:D:L:V:U:Y:Wrl")) != -1)
{
opterr = 0;
switch (c)
@@ -656,6 +658,10 @@ main (int argc, char **argv)
sscanf (optarg, "%d", &opts.rtl_dev_index);
break;
case 'Y': //Set rtl VFO bandwidth --recommend 6, 12, 24, 36, 48, default 48? or 12?
sscanf (optarg, "%d", &opts.rtl_bandwidth);
break;
case 'W': //monitor_input_audio if no sync
opts.monitor_input_audio = 1;
printf ("Monitor Source Audio if no sync detected (WIP!)\n");
@@ -689,7 +695,7 @@ main (int argc, char **argv)
break;
case 'c':
opts.rtlsdr_center_freq = (uint32_t)atofs(optarg);
printf("Tuning to frequency: %i\n", opts.rtlsdr_center_freq);
printf("Tuning to frequency: %i Hz\n", opts.rtlsdr_center_freq);
break;
case 'g':
sscanf (optarg, "%f", &opts.audio_gain);