transceiver: fix energy threshold bug
If no bursts were received over a long enough duration then the threshold would roll into negative territory. The energy detection is based on a comparison with the squared threshold, so all handsets would become effectively barred after a certain period of inactivity. In theory, this bug also exists in the mainline tree, but there the daughterboard receive gain is fixed at max, which always allows the ADC to generate sufficient noise to trigger the energy dectector and keep the system in a valid steady state. To fix, simply add a negative value check like those already in place for other locations. Signed-off-by: Thomas Tsou <ttsou@vt.edu> git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2655 19bc5d8c-e614-43d4-8b26-e1612bc8e597
This commit is contained in:
parent
7ac54b10d3
commit
3ed6fb7755
|
@ -303,6 +303,9 @@ SoftVector *Transceiver::pullRadioVector(GSM::Time &wTime,
|
|||
double framesElapsed = rxBurst->time()-prevFalseDetectionTime;
|
||||
if (framesElapsed > 50) { // if we haven't had any false detections for a while, lower threshold
|
||||
mEnergyThreshold -= 10.0/10.0;
|
||||
if (mEnergyThreshold < 0.0)
|
||||
mEnergyThreshold = 0.0;
|
||||
|
||||
prevFalseDetectionTime = rxBurst->time();
|
||||
}
|
||||
delete rxBurst;
|
||||
|
|
Loading…
Reference in New Issue