Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] Re: tech.diff
Martin Neuditschko wrote:
> Something is strange here:
> The first 3-4 digits of SNR are equal to the first 3-4 digits of SS!
> Is it possible that something in DvbApi->getSNR() - DvbApi->getSS()
> is wrong?
it would be possible, the fact is that I don't know which kind of values
dvb-c cards return.
Isn't there an error message on the terminal window? Could you
experiment this: in dvbapi.c:
#ifdef TECH
int cDvbApi::getSS()
{
int SS = 0;
if(ioctl(fd_frontend, FE_READ_SIGNAL_STRENGTH, &SS) < 0)
{
perror("Error reding SS:");
return 0;
}
if(SS>256) SS/=256; // this is a very poor way to test if the value
returned by
// the ioctl is a 16 bit one; if yes it's
converted into 8 bit
return SS;
}
int cDvbApi::getSNR()
{
int SNR = 0;
if(ioctl(fd_frontend, FE_READ_SNR, &SNR) < 0)
{
perror("Error reding SNR:");
return 0;
}
return SNR;
}
it's only a matter to add return 0 under the perror (don't know why I
didn't put it before); keep the bar indicator removed for now.
However if there's an error reding from the ioctl there should really be
a message on the terminal window.....
bye
as
Home |
Main Index |
Thread Index