--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: fmtools: fmscan patch to allow choice of threshold signal strength (attached)
- From: "Gregory P. Smith" <greg-debian@electricrain.com>
- Date: Sun, 08 Aug 2004 22:51:48 -0700
- Message-id: <E1Bu34W-0008Gw-RH@soap.in.krypto.org>
Package: fmtools
Version: 0.99.1-1
Severity: normal
The fmscan utility is not nearly as useful as it could be without
this patch. this adds the -t command line option to allow control of
the threshold signal strength that fmscan uses to decide if a station
can be received. please apply to future debian packages of this tool
and submit to the upstream maintainer.
thanks & enjoy,
Greg
....................
Only in fmtools-0.99.1: build-stamp
Only in fmtools-0.99.1/debian: files
Only in fmtools-0.99.1/debian: fmtools
Only in fmtools-0.99.1/debian: fmtools.substvars
Only in fmtools-0.99.1: fm
Only in fmtools-0.99.1: fmscan
diff -ru orig/fmtools-0.99.1/fmscan.1 fmtools-0.99.1/fmscan.1
--- orig/fmtools-0.99.1/fmscan.1 2003-12-06 20:47:36.000000000 -0800
+++ fmtools-0.99.1/fmscan.1 2004-08-08 22:41:56.000000000 -0700
@@ -44,6 +44,9 @@
.TP
\fB\-i \fIfreq
Increment between scanned channels, in MHz. Default: 0.2.
+.TP
+\fB\-t \fIpercent
+Signal strength threshold to consider a channel. Default: 50%.
.SH BUGS
This program may not do much if your radio card's driver doesn't support
fine tuning in 1/16000 MHz offsets. By default, v4l assumes 1/16 MHz
diff -ru orig/fmtools-0.99.1/fmscan.c fmtools-0.99.1/fmscan.c
--- orig/fmtools-0.99.1/fmscan.c 2003-12-06 22:40:25.000000000 -0800
+++ fmtools-0.99.1/fmscan.c 2004-08-08 22:44:48.000000000 -0700
@@ -37,7 +37,7 @@
void help(char *prog)
{
printf("fmtools fmscan version %s\n\n", FMT_VERSION);
- printf("usage: %s [-h] [-d <dev>] [-s <freq>] [-e <freq>] [-i <freq>]\n\n", prog);
+ printf("usage: %s [-h] [-d <dev>] [-s <freq>] [-e <freq>] [-i <freq>] [-t <%%>]\n\n", prog);
printf("Auxiliary program to scan a frequency band for radio stations.\n\n");
@@ -46,6 +46,7 @@
printf(" -s <freq> - set start of scanning range to <freq>\n");
printf(" -e <freq> - set end of scanning range to <freq>\n");
printf(" -i <freq> - set increment value between channels to <freq>\n");
+ printf(" -t <%%> - set signal strength percentage to lock onto <%%>\n");
printf(" <freq> - a value in the format nnn.nn (MHz)\n");
exit(0);
@@ -55,7 +56,7 @@
{
int fd, ret, i, tries = TRIES;
struct video_tuner vt;
- float perc, begval, incval, endval;
+ float perc, begval, incval, endval, threshold;
long lowf, highf, freq, totsig, incr, fact;
char *progname, *dev = NULL;
@@ -66,7 +67,9 @@
incval = 0.20; /* increment 0.2 MHz */
endval = 107.9; /* stop at 107.9 MHz */
- while ((i = getopt(argc, argv, "+e:hi:s:d:")) != EOF) {
+ threshold = THRESHOLD;
+
+ while ((i = getopt(argc, argv, "+e:hi:s:d:t:")) != EOF) {
switch (i) {
case 'd':
dev = strdup(optarg);
@@ -80,6 +83,9 @@
case 's':
begval = atof(optarg);
break;
+ case 't':
+ threshold = atoi(optarg)/100.;
+ break;
case 'h':
default:
help(progname);
@@ -152,7 +158,7 @@
perc = (totsig / (65535.0 * tries));
- if (perc > THRESHOLD)
+ if (perc > threshold)
printf("%2.1f: %3.1f%% \n",
(freq / (double) fact), perc * 100.0);
}
....................
-- System Information:
Debian Release: 3.1
APT prefers testing
APT policy: (500, 'testing')
Architecture: alpha
Kernel: Linux 2.4.23-rc5-grsec-nfs12
Locale: LANG=C, LC_CTYPE=C
Versions of packages fmtools depends on:
ii libc6.1 2.3.2.ds1-13 GNU C Library: Shared libraries an
-- no debconf information
--- End Message ---