1
0
mirror of https://github.com/DigitalDevices/dddvb.git synced 2023-10-10 13:37:43 +02:00

correct signal strength

This commit is contained in:
Ralph Metzler 2016-03-22 22:43:26 +01:00 committed by mvoelkel
parent b479d9cdc2
commit 906efafd5e
2 changed files with 7 additions and 4 deletions

View File

@ -1385,14 +1385,17 @@ static int read_signal_strength(struct dvb_frontend *fe, u16 *strength)
}
Power /= 5;
pBBGain = (465 - Log10x100(Power));
pBBGain = (465 - Log10x100(Power)) * 10;
if (fe->ops.tuner_ops.get_rf_strength)
fe->ops.tuner_ops.get_rf_strength(fe, strength);
else
*strength = 0;
*strength += pBBGain * 10;
if (pBBGain < *strength)
*strength -= pBBGain;
else
*strength = 0;
p->strength.len = 1;
p->strength.stat[0].scale = FE_SCALE_DECIBEL;

View File

@ -707,7 +707,7 @@ static int get_rf_strength(struct dvb_frontend *fe, u16 *st)
else if (Gain > 10000)
Gain = 10000;
*st = Gain;
*st = 10000 - Gain;
return 0;
}