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:
parent
b479d9cdc2
commit
906efafd5e
@ -1385,14 +1385,17 @@ static int read_signal_strength(struct dvb_frontend *fe, u16 *strength)
|
|||||||
}
|
}
|
||||||
Power /= 5;
|
Power /= 5;
|
||||||
|
|
||||||
pBBGain = (465 - Log10x100(Power));
|
pBBGain = (465 - Log10x100(Power)) * 10;
|
||||||
|
|
||||||
if (fe->ops.tuner_ops.get_rf_strength)
|
if (fe->ops.tuner_ops.get_rf_strength)
|
||||||
fe->ops.tuner_ops.get_rf_strength(fe, strength);
|
fe->ops.tuner_ops.get_rf_strength(fe, strength);
|
||||||
else
|
else
|
||||||
*strength = 0;
|
*strength = 0;
|
||||||
|
|
||||||
*strength += pBBGain * 10;
|
if (pBBGain < *strength)
|
||||||
|
*strength -= pBBGain;
|
||||||
|
else
|
||||||
|
*strength = 0;
|
||||||
|
|
||||||
p->strength.len = 1;
|
p->strength.len = 1;
|
||||||
p->strength.stat[0].scale = FE_SCALE_DECIBEL;
|
p->strength.stat[0].scale = FE_SCALE_DECIBEL;
|
||||||
|
@ -707,7 +707,7 @@ static int get_rf_strength(struct dvb_frontend *fe, u16 *st)
|
|||||||
else if (Gain > 10000)
|
else if (Gain > 10000)
|
||||||
Gain = 10000;
|
Gain = 10000;
|
||||||
|
|
||||||
*st = Gain;
|
*st = 10000 - Gain;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user