mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-04-29 02:43:59 -04:00
Meshtastic: Copilot code review fixes
This commit is contained in:
parent
efa232db88
commit
f787deeff1
@ -1,4 +1,4 @@
|
||||
project (modemmeshtatstic)
|
||||
project (modemmeshtastic)
|
||||
|
||||
set(modemmeshtastic_SOURCES
|
||||
meshtasticpacket.cpp
|
||||
|
||||
@ -79,7 +79,7 @@ void MeshtasticModSettings::resetToDefaults()
|
||||
m_preambleChirps = 17;
|
||||
m_quietMillis = 1000;
|
||||
m_nbParityBits = 1;
|
||||
m_textMessage = "Hello LoRa";
|
||||
m_textMessage = "Hello Meshtastic";
|
||||
m_syncWord = 0x34;
|
||||
m_channelMute = false;
|
||||
m_messageRepeat = 1;
|
||||
@ -193,16 +193,15 @@ bool MeshtasticModSettings::deserialize(const QByteArray& data)
|
||||
m_channelMarker->deserialize(bytetmp);
|
||||
}
|
||||
|
||||
d.readString(6, &m_title, "LoRa Demodulator");
|
||||
d.readString(6, &m_title, "Meshtastic Modulator");
|
||||
d.readS32(7, &m_deBits, 0);
|
||||
d.readBool(8, &m_channelMute, false);
|
||||
d.readU32(9, &utmp, 0x34);
|
||||
m_syncWord = utmp > 255 ? 0 : utmp;
|
||||
d.readU32(10, &m_preambleChirps, 17);
|
||||
d.readS32(11, &m_quietMillis, 1000);
|
||||
d.readBool(11, &m_useReverseAPI, false);
|
||||
d.readBool(12, &m_invertRamps, false);
|
||||
d.readString(28, &m_textMessage, "Hello LoRa");
|
||||
d.readString(28, &m_textMessage, "Hello Meshtastic");
|
||||
d.readBlob(29, &m_bytesMessage);
|
||||
d.readS32(31, &m_nbParityBits, 1);
|
||||
d.readS32(44, &m_messageRepeat, 1);
|
||||
|
||||
@ -286,15 +286,6 @@ void MeshtasticModSource::modulateSample()
|
||||
m_chirpCount = 0;
|
||||
m_chirp0 = encodeSymbol(m_symbols[m_chirpCount], MeshtasticModSettings::m_hasHeader && (m_chirpCount < 8U));
|
||||
m_txFrameToken++;
|
||||
|
||||
std::vector<unsigned short> mappedPreview;
|
||||
const unsigned int previewCount = std::min<unsigned int>(8U, static_cast<unsigned int>(m_symbols.size()));
|
||||
mappedPreview.reserve(previewCount);
|
||||
|
||||
for (unsigned int i = 0; i < previewCount; i++) {
|
||||
mappedPreview.push_back(encodeSymbol(m_symbols[i], MeshtasticModSettings::m_hasHeader && (i < 8U)));
|
||||
}
|
||||
|
||||
m_chirp = (m_chirp0 + m_fftLength)*MeshtasticModSettings::oversampling - 1;
|
||||
m_state = ChirpChatStatePayload;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user