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 { 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); 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.