ChirpChat demod: auto message length for FT messages

pull/2055/head
f4exb 2024-04-05 02:00:35 +02:00
rodzic 3c9f74aeb5
commit 788df1eda3
2 zmienionych plików z 16 dodań i 1 usunięć

Wyświetl plik

@ -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)
{

Wyświetl plik

@ -723,7 +723,7 @@
<item>
<widget class="QCheckBox" name="messageLengthAuto">
<property name="toolTip">
<string>Set message length in symbols automatically to provided message length (LoRa only)</string>
<string>Set message length in symbols automatically to provided message length (LoRa and FT only)</string>
</property>
<property name="text">
<string>Auto</string>