diff --git a/public-trunk/Transceiver/Transceiver.cpp b/public-trunk/Transceiver/Transceiver.cpp index 77f9a3a..cef8b3d 100644 --- a/public-trunk/Transceiver/Transceiver.cpp +++ b/public-trunk/Transceiver/Transceiver.cpp @@ -301,6 +301,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; + if (mEnergyThreshold < 0.0) + mEnergyThreshold = 0.0; + prevFalseDetectionTime = rxBurst->time(); } delete rxBurst; diff --git a/public-trunk/Transceiver52M/Transceiver.cpp b/public-trunk/Transceiver52M/Transceiver.cpp index a80832a..914e8b5 100644 --- a/public-trunk/Transceiver52M/Transceiver.cpp +++ b/public-trunk/Transceiver52M/Transceiver.cpp @@ -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;