Search
j0ke.net Open Build Service
>
Projects
>
multimedia
>
dvb
> dvb-apps-femon.diff
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File dvb-apps-femon.diff of Package dvb (Revision 2)
Currently displaying revision
2
,
show latest
--- util/szap/femon.c 17 Jan 2004 16:59:46 -0000 1.1 +++ util/szap/femon.c 29 Sep 2005 09:15:37 -0000 @@ -44,6 +44,7 @@ #define FALSE (1==0) #endif +static int humanreadable = 0; #define FRONTENDDEVICE "/dev/dvb/adapter%d/frontend%d" @@ -74,7 +75,11 @@ ioctl(fe_fd, FE_READ_BER, &ber); ioctl(fe_fd, FE_READ_UNCORRECTED_BLOCKS, &uncorrected_blocks); - printf ("status %02x | signal %04x | snr %04x | ber %08x | unc %08x | ", + if(humanreadable) + printf ("status %02x | signal %3hu%% | snr %3hu%% | ber %08x | unc %08x | ", + status, signal/655, snr/655, ber, uncorrected_blocks); + else + printf ("status %02x | signal %04x | snr %04x | ber %08x | unc %08x | ", status, signal, snr, ber, uncorrected_blocks); if (status & FE_HAS_LOCK) @@ -127,7 +132,7 @@ unsigned int adapter = 0, frontend = 0; int opt; - while ((opt = getopt(argc, argv, "hlrn:a:f:d:")) != -1) { + while ((opt = getopt(argc, argv, "hlrn:a:f:d:H")) != -1) { switch (opt) { case '?': @@ -139,6 +144,8 @@ break; case 'f': frontend = strtoul(optarg, NULL, 0); + case 'H': + humanreadable = 1; } }