diff --git a/plugins/channelrx/demodchirpchat/chirpchatdemod.cpp b/plugins/channelrx/demodchirpchat/chirpchatdemod.cpp index cea13d828..387cb0601 100644 --- a/plugins/channelrx/demodchirpchat/chirpchatdemod.cpp +++ b/plugins/channelrx/demodchirpchat/chirpchatdemod.cpp @@ -327,6 +327,21 @@ bool ChirpChatDemod::handleMessage(const Message& cmd) m_lastMsgSyncWord = msg.getSyncWord(); m_lastMsgTimestamp = msg.getMsgTimestamp(); m_lastMsgString = msg.getMessage(); // for now we do not handle message components (call1, ...) + int nbSymbolBits = m_settings.m_spreadFactor - m_settings.m_deBits; + m_lastMsgNbSymbols = (174 / nbSymbolBits) + ((174 % nbSymbolBits) == 0 ? 0 : 1); + + if (m_settings.m_autoNbSymbolsMax) + { + ChirpChatDemodSettings settings = m_settings; + settings.m_nbSymbolsMax = m_lastMsgNbSymbols; + applySettings(settings); + + if (getMessageQueueToGUI()) // forward to GUI if any + { + MsgConfigureChirpChatDemod *msgToGUI = MsgConfigureChirpChatDemod::create(settings, false); + getMessageQueueToGUI()->push(msgToGUI); + } + } if (m_settings.m_sendViaUDP) { diff --git a/plugins/channelrx/demodchirpchat/chirpchatdemodgui.ui b/plugins/channelrx/demodchirpchat/chirpchatdemodgui.ui index 39d5ba3d3..b127dc8c4 100644 --- a/plugins/channelrx/demodchirpchat/chirpchatdemodgui.ui +++ b/plugins/channelrx/demodchirpchat/chirpchatdemodgui.ui @@ -723,7 +723,7 @@ - Set message length in symbols automatically to provided message length (LoRa only) + Set message length in symbols automatically to provided message length (LoRa and FT only) Auto