From 1d210b1fb1cd36be9e9bb04032398bdd5b3e361c Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Fri, 9 Oct 2020 19:35:36 +0100 Subject: [PATCH 1/3] Fix typos in readme --- plugins/channeltx/modpacket/readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/channeltx/modpacket/readme.md b/plugins/channeltx/modpacket/readme.md index 3b4dcbdd1..8becdc427 100644 --- a/plugins/channeltx/modpacket/readme.md +++ b/plugins/channeltx/modpacket/readme.md @@ -48,7 +48,7 @@ Enter your amateur radio callsign and optionally a sub-station ID (SSID). E.g. M

10: Preemphaisis Filter

-Check this button to enable a FM preemphasis filter, which amplifiers higher frequencies. Right click to open the dialog to adjust settings for the filter. +Check this button to enable a FM preemphasis filter, which amplifies higher frequencies. Right click to open the dialog to adjust settings for the filter.

11: Bandpass Filter

@@ -58,7 +58,7 @@ Check this button to enable a baseband bandpass filter. Right click to open the Check this button to repeated transmit a packet. Right click to open the dialog to adjust the delay between retransmission and number of times the packet should be repeated. -

13: Insertion position

+

13: Insert position

Inserts position as APRS formatted latitude and longitude in to the current cursor position within the data field. Lattitude and longitude can be specified under Preferences > My position. From 0e4c3ec31733020cf09e42762e0fb03923fcdcf0 Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Fri, 9 Oct 2020 20:04:53 +0100 Subject: [PATCH 2/3] Initialise m_spectrumSink pointer --- plugins/channeltx/modpacket/packetmodsource.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/channeltx/modpacket/packetmodsource.cpp b/plugins/channeltx/modpacket/packetmodsource.cpp index d849e4ec0..d0e352812 100644 --- a/plugins/channeltx/modpacket/packetmodsource.cpp +++ b/plugins/channeltx/modpacket/packetmodsource.cpp @@ -39,8 +39,9 @@ PacketModSource::PacketModSource() : m_bitIdx(0), m_last5Bits(0), m_state(idle), - m_scrambler(0x10800, 0x0) -{ + m_scrambler(0x10800, 0x0), + m_spectrumSink(nullptr) + { m_lowpass.create(301, m_channelSampleRate, 22000.0 / 2.0); qDebug() << "PacketModSource::PacketModSource creating BPF : " << m_channelSampleRate; m_bandpass.create(301, m_channelSampleRate, 800.0, 2600.0); From 3e1a89695b985cbbff8ff04c5cdbb4f3c5882923 Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Fri, 9 Oct 2020 20:05:44 +0100 Subject: [PATCH 3/3] Add additional error checking on tx action --- plugins/channeltx/modpacket/packetmod.cpp | 32 +++++++++++++++++------ 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/plugins/channeltx/modpacket/packetmod.cpp b/plugins/channeltx/modpacket/packetmod.cpp index 7291774e1..141c1214e 100644 --- a/plugins/channeltx/modpacket/packetmod.cpp +++ b/plugins/channeltx/modpacket/packetmod.cpp @@ -575,16 +575,32 @@ int PacketMod::webapiActionsPost( if (channelActionsKeys.contains("tx")) { SWGSDRangel::SWGPacketModActions_tx* tx = swgPacketModActions->getTx(); - QString callsign(*tx->getCallsign()); - QString to(*tx->getTo()); - QString via(*tx->getVia()); - QString data(*tx->getData()); + QString *callsignP = tx->getCallsign(); + QString *toP = tx->getTo(); + QString *viaP = tx->getVia(); + QString *dataP = tx->getData(); + if (callsignP && toP && viaP && dataP) + { + QString callsign(*callsignP); + QString to(*toP); + QString via(*viaP); + QString data(*dataP); - PacketMod::MsgTXPacketMod *msg = PacketMod::MsgTXPacketMod::create(callsign, to, via, data); - m_basebandSource->getInputMessageQueue()->push(msg); + PacketMod::MsgTXPacketMod *msg = PacketMod::MsgTXPacketMod::create(callsign, to, via, data); + m_basebandSource->getInputMessageQueue()->push(msg); + return 202; + } + else + { + errorMessage = "Packet must contain callsign, to, via and data"; + return 400; + } + } + else + { + errorMessage = "Unknown action"; + return 400; } - - return 202; } else {