diff --git a/plugins/channelrx/demodchirpchat/chirpchatdemodsink.cpp b/plugins/channelrx/demodchirpchat/chirpchatdemodsink.cpp index 3fe3f8fd2..1c45b38ca 100644 --- a/plugins/channelrx/demodchirpchat/chirpchatdemodsink.cpp +++ b/plugins/channelrx/demodchirpchat/chirpchatdemodsink.cpp @@ -286,8 +286,10 @@ void ChirpChatDemodSink::processSample(const Complex& ci) m_preambleHistory[m_chirpCount] = imax; m_chirpCount++; + double preDrop = magsqPre - magsqSFD; + double dropRatio = -preDrop / magsqSFD; - if (magsqPre < magsqSFD) // preamble drop + if ((preDrop < 0.0) && (dropRatio > 0.5)) // preamble drop { m_magsqTotalAvg(magsqSFDTotal);