Fix a couple of minor bugs.

This commit is contained in:
Jonathan Naylor 2020-07-28 14:24:51 +01:00
parent d8f138066e
commit b5ba384495
2 changed files with 2 additions and 2 deletions

View File

@ -87,7 +87,7 @@ uint8_t CFMNoiseSquelch::process(q15_t sample)
threshold = m_lowThreshold;
m_result |= NS_READY;
if (value >= threshold)
if (value < threshold)
m_result |= NS_VALID;
else
m_result &= ~NS_VALID;

View File

@ -466,7 +466,7 @@ uint8_t CSerialPort::setFMParams3(const uint8_t* data, uint16_t length)
uint8_t kerchunkTime = data[6U];
uint8_t hangTime = data[7U];
uint8_t accessMode = data[8U] & 0x7FU;
uint8_t accessMode = data[8U] & 0x0FU;
bool noiseSquelch = (data[8U] & 0x40U) == 0x40U;
bool cosInvert = (data[8U] & 0x80U) == 0x80U;