diff --git a/plugins/channeltx/modmeshtastic/CMakeLists.txt b/plugins/channeltx/modmeshtastic/CMakeLists.txt index b9acad0a8..5afb699cd 100644 --- a/plugins/channeltx/modmeshtastic/CMakeLists.txt +++ b/plugins/channeltx/modmeshtastic/CMakeLists.txt @@ -1,10 +1,5 @@ project(modmeshtastic) -if (FT8_SUPPORT) - set(meshtasticmod_FT8_LIB ft8) - set(meshtasticmod_FT8_INCLUDE ${CMAKE_SOURCE_DIR}/ft8) -endif() - set(modmeshtastic_SOURCES meshtasticmod.cpp meshtasticmodsettings.cpp @@ -12,10 +7,7 @@ set(modmeshtastic_SOURCES meshtasticmodbaseband.cpp meshtasticmodplugin.cpp meshtasticmodencoder.cpp - meshtasticmodencodertty.cpp - meshtasticmodencoderascii.cpp meshtasticmodencoderlora.cpp - meshtasticmodencoderft.cpp meshtasticmodwebapiadapter.cpp ) @@ -26,16 +18,12 @@ set(modmeshtastic_HEADERS meshtasticmodbaseband.h meshtasticmodplugin.h meshtasticmodencoder.h - meshtasticmodencodertty.h - meshtasticmodencoderascii.h meshtasticmodencoderlora.h - meshtasticmodencoderft.h meshtasticmodwebapiadapter.h ) include_directories( ${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client - ${meshtasticmod_FT8_INCLUDE} ${CMAKE_SOURCE_DIR}/modemmeshtastic ) @@ -77,7 +65,6 @@ target_link_libraries(${TARGET_NAME} PRIVATE sdrbase ${TARGET_LIB_GUI} swagger - ${meshtasticmod_FT8_LIB} modemmeshtastic ) diff --git a/plugins/channeltx/modmeshtastic/meshtasticmod.cpp b/plugins/channeltx/modmeshtastic/meshtasticmod.cpp index 0f85c0731..c7be5bf48 100644 --- a/plugins/channeltx/modmeshtastic/meshtasticmod.cpp +++ b/plugins/channeltx/modmeshtastic/meshtasticmod.cpp @@ -48,6 +48,7 @@ MESSAGE_CLASS_DEFINITION(MeshtasticMod::MsgConfigureMeshtasticMod, Message) MESSAGE_CLASS_DEFINITION(MeshtasticMod::MsgReportPayloadTime, Message) +MESSAGE_CLASS_DEFINITION(MeshtasticMod::MsgSendMessage, Message) const char* const MeshtasticMod::m_channelIdURI = "sdrangel.channeltx.modmeshtastic"; const char* const MeshtasticMod::m_channelId = "MeshtasticMod"; @@ -137,6 +138,12 @@ bool MeshtasticMod::handleMessage(const Message& cmd) return true; } + else if (MsgSendMessage::match(cmd)) + { + qDebug() << "MeshtasticMod::handleMessage: MsgSendMessage"; + sendCurrentSettingsMessage(); + return true; + } else if (DSPSignalNotification::match(cmd)) { // Forward to the source @@ -158,6 +165,40 @@ bool MeshtasticMod::handleMessage(const Message& cmd) } } +void MeshtasticMod::sendMessage() +{ + m_inputMessageQueue.push(MsgSendMessage::create()); +} + +void MeshtasticMod::sendCurrentSettingsMessage() +{ + MeshtasticModBaseband::MsgConfigureMeshtasticModPayload *payloadMsg = nullptr; + + if (m_settings.m_messageType == MeshtasticModSettings::MessageNone) + { + m_symbols.clear(); + payloadMsg = MeshtasticModBaseband::MsgConfigureMeshtasticModPayload::create(); + } + else + { + m_symbols.clear(); + m_encoder.encode(m_settings, m_symbols); + payloadMsg = MeshtasticModBaseband::MsgConfigureMeshtasticModPayload::create(m_symbols); + } + + if (payloadMsg) + { + m_basebandSource->getInputMessageQueue()->push(payloadMsg); + m_currentPayloadTime = (m_symbols.size()*(1<push(rpt); + } + } +} + void MeshtasticMod::setCenterFrequency(qint64 frequency) { MeshtasticModSettings settings = m_settings; @@ -243,12 +284,6 @@ void MeshtasticMod::applySettings(const MeshtasticModSettings& settings, bool fo } } - if ((settings.m_codingScheme != m_settings.m_codingScheme) || force) - { - reverseAPIKeys.append("codingScheme"); - m_encoder.setCodingScheme(settings.m_codingScheme); - } - if ((settings.m_nbParityBits != m_settings.m_nbParityBits || force)) { reverseAPIKeys.append("nbParityBits"); @@ -267,9 +302,6 @@ void MeshtasticMod::applySettings(const MeshtasticModSettings& settings, bool fo m_encoder.setLoRaHasHeader(settings.m_hasHeader); } - if ((settings.m_messageType != m_settings.m_messageType) || force) { - reverseAPIKeys.append("messageType"); - } if ((settings.m_beaconMessage != m_settings.m_beaconMessage) || force) { reverseAPIKeys.append("beaconMessage"); } @@ -312,22 +344,7 @@ void MeshtasticMod::applySettings(const MeshtasticModSettings& settings, bool fo MeshtasticModBaseband::MsgConfigureMeshtasticModPayload *payloadMsg = nullptr; - if ((settings.m_messageType == MeshtasticModSettings::MessageNone) - && ((settings.m_messageType != m_settings.m_messageType) || force)) - { - payloadMsg = MeshtasticModBaseband::MsgConfigureMeshtasticModPayload::create(); - } - else if ((settings.m_messageType != m_settings.m_messageType) - || (settings.m_beaconMessage != m_settings.m_beaconMessage) - || (settings.m_cqMessage != m_settings.m_cqMessage) - || (settings.m_replyMessage != m_settings.m_replyMessage) - || (settings.m_reportMessage != m_settings.m_reportMessage) - || (settings.m_replyReportMessage != m_settings.m_replyReportMessage) - || (settings.m_rrrMessage != m_settings.m_rrrMessage) - || (settings.m_73Message != m_settings.m_73Message) - || (settings.m_qsoTextMessage != m_settings.m_qsoTextMessage) - || (settings.m_textMessage != m_settings.m_textMessage) - || (settings.m_bytesMessage != m_settings.m_bytesMessage) || force) + if ((settings.m_textMessage != m_settings.m_textMessage) || force) { m_symbols.clear(); m_encoder.encode(settings, m_symbols); @@ -507,9 +524,6 @@ void MeshtasticMod::webapiUpdateChannelSettings( if (channelSettingsKeys.contains("channelMute")) { settings.m_channelMute = response.getChirpChatModSettings()->getChannelMute() != 0; } - if (channelSettingsKeys.contains("codingScheme")) { - settings.m_codingScheme = (MeshtasticModSettings::CodingScheme) response.getChirpChatModSettings()->getCodingScheme(); - } if (channelSettingsKeys.contains("nbParityBits")) { settings.m_nbParityBits = response.getChirpChatModSettings()->getNbParityBits(); } @@ -531,9 +545,6 @@ void MeshtasticMod::webapiUpdateChannelSettings( if (channelSettingsKeys.contains("myRpt")) { settings.m_myRpt = *response.getChirpChatModSettings()->getMyRpt(); } - if (channelSettingsKeys.contains("messageType")) { - settings.m_messageType = (MeshtasticModSettings::MessageType) response.getChirpChatModSettings()->getMessageType(); - } if (channelSettingsKeys.contains("beaconMessage")) { settings.m_beaconMessage = *response.getChirpChatModSettings()->getBeaconMessage(); } diff --git a/plugins/channeltx/modmeshtastic/meshtasticmod.h b/plugins/channeltx/modmeshtastic/meshtasticmod.h index 7955c56ae..a6af59ed0 100644 --- a/plugins/channeltx/modmeshtastic/meshtasticmod.h +++ b/plugins/channeltx/modmeshtastic/meshtasticmod.h @@ -90,6 +90,21 @@ public: {} }; + class MsgSendMessage : public Message { + MESSAGE_CLASS_DECLARATION + + public: + static MsgSendMessage* create() + { + return new MsgSendMessage(); + } + + private: + MsgSendMessage() : + Message() + {} + }; + //================================================================= MeshtasticMod(DeviceAPI *deviceAPI); @@ -156,6 +171,7 @@ public: void setLevelMeter(QObject *levelMeter); uint32_t getNumberOfDeviceStreams() const; bool getModulatorActive() const; + void sendMessage(); static const char* const m_channelIdURI; static const char* const m_channelId; @@ -196,6 +212,7 @@ private: ); void openUDP(const MeshtasticModSettings& settings); void closeUDP(); + void sendCurrentSettingsMessage(); private slots: void networkManagerFinished(QNetworkReply *reply); diff --git a/plugins/channeltx/modmeshtastic/meshtasticmodencoder.cpp b/plugins/channeltx/modmeshtastic/meshtasticmodencoder.cpp index e1f75fdb9..a3ade6c42 100644 --- a/plugins/channeltx/modmeshtastic/meshtasticmodencoder.cpp +++ b/plugins/channeltx/modmeshtastic/meshtasticmodencoder.cpp @@ -18,14 +18,12 @@ #include #include "meshtasticmodencoder.h" -#include "meshtasticmodencodertty.h" -#include "meshtasticmodencoderascii.h" #include "meshtasticmodencoderlora.h" -#include "meshtasticmodencoderft.h" #include "meshtasticpacket.h" +const MeshtasticModSettings::CodingScheme MeshtasticModEncoder::m_codingScheme = MeshtasticModSettings::CodingLoRa; + MeshtasticModEncoder::MeshtasticModEncoder() : - m_codingScheme(MeshtasticModSettings::CodingTTY), m_nbSymbolBits(5), m_nbParityBits(1), m_hasCRC(true), @@ -50,86 +48,28 @@ void MeshtasticModEncoder::setNbSymbolBits(unsigned int spreadFactor, unsigned i void MeshtasticModEncoder::encode(MeshtasticModSettings settings, std::vector& symbols) { - if (settings.m_codingScheme == MeshtasticModSettings::CodingFT) + if (m_nbSymbolBits >= 5) { - MeshtasticModEncoderFT::encodeMsg( - settings.m_myCall, - settings.m_urCall, - settings.m_myLoc, - settings.m_myRpt, - settings.m_textMessage, - settings.m_messageType, - m_nbSymbolBits, - symbols - ); - } - else - { - if (settings.m_messageType == MeshtasticModSettings::MessageBytes) { - encodeBytes(settings.m_bytesMessage, symbols); - } else if (settings.m_messageType == MeshtasticModSettings::MessageBeacon) { - encodeString(settings.m_beaconMessage, symbols); - } else if (settings.m_messageType == MeshtasticModSettings::MessageCQ) { - encodeString(settings.m_cqMessage, symbols); - } else if (settings.m_messageType == MeshtasticModSettings::MessageReply) { - encodeString(settings.m_replyMessage, symbols); - } else if (settings.m_messageType == MeshtasticModSettings::MessageReport) { - encodeString(settings.m_reportMessage, symbols); - } else if (settings.m_messageType == MeshtasticModSettings::MessageReplyReport) { - encodeString(settings.m_replyReportMessage, symbols); - } else if (settings.m_messageType == MeshtasticModSettings::MessageRRR) { - encodeString(settings.m_rrrMessage, symbols); - } else if (settings.m_messageType == MeshtasticModSettings::Message73) { - encodeString(settings.m_73Message, symbols); - } else if (settings.m_messageType == MeshtasticModSettings::MessageQSOText) { - encodeString(settings.m_qsoTextMessage, symbols); - } else if (settings.m_messageType == MeshtasticModSettings::MessageText) { - encodeString(settings.m_textMessage, symbols); - } - } -} + QByteArray bytes; + QString summary; + QString error; -void MeshtasticModEncoder::encodeString(const QString& str, std::vector& symbols) -{ - switch (m_codingScheme) - { - case MeshtasticModSettings::CodingTTY: - if (m_nbSymbolBits == 5) { - MeshtasticModEncoderTTY::encodeString(str, symbols); - } - break; - case MeshtasticModSettings::CodingASCII: - if (m_nbSymbolBits == 7) { - MeshtasticModEncoderASCII::encodeString(str, symbols); - } - break; - case MeshtasticModSettings::CodingLoRa: - if (m_nbSymbolBits >= 5) + if (modemmeshtastic::Packet::isCommand(settings.m_textMessage)) { - QByteArray bytes; - QString summary; - QString error; - - if (modemmeshtastic::Packet::isCommand(str)) + if (!modemmeshtastic::Packet::buildFrameFromCommand(settings.m_textMessage, bytes, summary, error)) { - if (!modemmeshtastic::Packet::buildFrameFromCommand(str, bytes, summary, error)) - { - qWarning() << "MeshtasticModEncoder::encodeString: Meshtastic command error:" << error; - return; - } - - qInfo() << "MeshtasticModEncoder::encodeString:" << summary; - } - else - { - bytes = str.toUtf8(); + qWarning() << "MeshtasticModEncoder::encode: Meshtastic command error:" << error; + return; } - encodeBytesLoRa(bytes, symbols); + qInfo() << "MeshtasticModEncoder::encode:" << summary; } - break; - default: - break; + else + { + bytes = settings.m_textMessage.toUtf8(); + } + + encodeBytesLoRa(bytes, symbols); } } diff --git a/plugins/channeltx/modmeshtastic/meshtasticmodencoder.h b/plugins/channeltx/modmeshtastic/meshtasticmodencoder.h index 453a1908c..367bd47f3 100644 --- a/plugins/channeltx/modmeshtastic/meshtasticmodencoder.h +++ b/plugins/channeltx/modmeshtastic/meshtasticmodencoder.h @@ -29,7 +29,6 @@ public: MeshtasticModEncoder(); ~MeshtasticModEncoder(); - void setCodingScheme(MeshtasticModSettings::CodingScheme codingScheme) { m_codingScheme = codingScheme; } void setNbSymbolBits(unsigned int spreadFactor, unsigned int deBits); void setLoRaParityBits(unsigned int parityBits) { m_nbParityBits = parityBits; } void setLoRaHasHeader(bool hasHeader) { m_hasHeader = hasHeader; } @@ -38,12 +37,11 @@ public: void encode(MeshtasticModSettings settings, std::vector& symbols); private: - void encodeString(const QString& str, std::vector& symbols); // LoRa functions void encodeBytesLoRa(const QByteArray& bytes, std::vector& symbols); // General attributes - MeshtasticModSettings::CodingScheme m_codingScheme; + static const MeshtasticModSettings::CodingScheme m_codingScheme; unsigned int m_spreadFactor; unsigned int m_deBits; unsigned int m_nbSymbolBits; @@ -54,4 +52,3 @@ private: }; #endif // PLUGINS_CHANNELTX_MODMESHTASTIC_MESHTASTICMODENCODER_H_ - diff --git a/plugins/channeltx/modmeshtastic/meshtasticmodencoderascii.cpp b/plugins/channeltx/modmeshtastic/meshtasticmodencoderascii.cpp deleted file mode 100644 index 8f8469d59..000000000 --- a/plugins/channeltx/modmeshtastic/meshtasticmodencoderascii.cpp +++ /dev/null @@ -1,30 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////// -// Copyright (C) 2012 maintech GmbH, Otto-Hahn-Str. 15, 97204 Hoechberg, Germany // -// written by Christian Daniel // -// Copyright (C) 2015-2020 Edouard Griffiths, F4EXB // -// // -// This program is free software; you can redistribute it and/or modify // -// it under the terms of the GNU General Public License as published by // -// the Free Software Foundation as version 3 of the License, or // -// (at your option) any later version. // -// // -// This program is distributed in the hope that it will be useful, // -// but WITHOUT ANY WARRANTY; without even the implied warranty of // -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // -// GNU General Public License V3 for more details. // -// // -// You should have received a copy of the GNU General Public License // -// along with this program. If not, see . // -/////////////////////////////////////////////////////////////////////////////////// - -#include "meshtasticmodencoderascii.h" - -void MeshtasticModEncoderASCII::encodeString(const QString& str, std::vector& symbols) -{ - QByteArray asciiStr = str.toUtf8(); - QByteArray::const_iterator it = asciiStr.begin(); - - for (; it != asciiStr.end(); ++it) { - symbols.push_back(*it & 0x7F); - } -} diff --git a/plugins/channeltx/modmeshtastic/meshtasticmodencoderascii.h b/plugins/channeltx/modmeshtastic/meshtasticmodencoderascii.h deleted file mode 100644 index 28fea3b1d..000000000 --- a/plugins/channeltx/modmeshtastic/meshtasticmodencoderascii.h +++ /dev/null @@ -1,32 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////// -// Copyright (C) 2012 maintech GmbH, Otto-Hahn-Str. 15, 97204 Hoechberg, Germany // -// written by Christian Daniel // -// Copyright (C) 2015-2020 Edouard Griffiths, F4EXB // -// // -// This program is free software; you can redistribute it and/or modify // -// it under the terms of the GNU General Public License as published by // -// the Free Software Foundation as version 3 of the License, or // -// (at your option) any later version. // -// // -// This program is distributed in the hope that it will be useful, // -// but WITHOUT ANY WARRANTY; without even the implied warranty of // -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // -// GNU General Public License V3 for more details. // -// // -// You should have received a copy of the GNU General Public License // -// along with this program. If not, see . // -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef PLUGINS_CHANNELTX_MODMESHTASTIC_MESHTASTICMODENCODERASCII_H_ -#define PLUGINS_CHANNELTX_MODMESHTASTIC_MESHTASTICMODENCODERASCII_H_ - -#include -#include - -class MeshtasticModEncoderASCII -{ -public: - static void encodeString(const QString& str, std::vector& symbols); -}; - -#endif // PLUGINS_CHANNELTX_MODMESHTASTIC_MESHTASTICMODENCODERASCII_H_ diff --git a/plugins/channeltx/modmeshtastic/meshtasticmodencoderft.cpp b/plugins/channeltx/modmeshtastic/meshtasticmodencoderft.cpp deleted file mode 100644 index 5d29dac8e..000000000 --- a/plugins/channeltx/modmeshtastic/meshtasticmodencoderft.cpp +++ /dev/null @@ -1,246 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////// -// Copyright (C) 2024 Edouard Griffiths, F4EXB // -// // -// This program is free software; you can redistribute it and/or modify // -// it under the terms of the GNU General Public License as published by // -// the Free Software Foundation as version 3 of the License, or // -// (at your option) any later version. // -// // -// This program is distributed in the hope that it will be useful, // -// but WITHOUT ANY WARRANTY; without even the implied warranty of // -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // -// GNU General Public License V3 for more details. // -// // -// You should have received a copy of the GNU General Public License // -// along with this program. If not, see . // -/////////////////////////////////////////////////////////////////////////////////// - -#include "meshtasticmodencoderft.h" - -#ifndef HAS_FT8 -void MeshtasticModEncoderFT::encodeMsg( - const QString& myCall, - const QString& urCall, - const QString& myLocator, - const QString& myReport, - const QString& textMessage, - MeshtasticModSettings::MessageType messageType, - unsigned int nbSymbolBits, - std::vector& symbols -) -{ - qDebug("MeshtasticModEncoderFT::encodeMsg: not implemented"); -} -#else - -#include "ft8.h" -#include "packing.h" - - -void MeshtasticModEncoderFT::encodeMsg( - const QString& myCall, - const QString& urCall, - const QString& myLocator, - const QString& myReport, - const QString& textMessage, - MeshtasticModSettings::MessageType messageType, - unsigned int nbSymbolBits, - std::vector& symbols -) -{ - int a174[174]; // FT payload is 174 bits - - if (messageType == MeshtasticModSettings::MessageNone) { - return; // do nothing - } else if (messageType == MeshtasticModSettings::MessageBeacon) { - encodeMsgBeaconOrCQ(myCall, myLocator, "DE", a174); - } else if (messageType == MeshtasticModSettings::MessageCQ) { - encodeMsgBeaconOrCQ(myCall, myLocator, "CQ", a174); - } else if (messageType == MeshtasticModSettings::MessageReply) { - encodeMsgReply(myCall, urCall, myLocator, a174); - } else if (messageType == MeshtasticModSettings::MessageReport) { - encodeMsgReport(myCall, urCall, myReport, 0, a174); - } else if (messageType == MeshtasticModSettings::MessageReplyReport) { - encodeMsgReport(myCall, urCall, myReport, 1, a174); - } else if (messageType == MeshtasticModSettings::MessageRRR) { - encodeMsgReport(myCall, urCall, "RRR", 1, a174); - } else if (messageType == MeshtasticModSettings::Message73) { - encodeMsgReport(myCall, urCall, "73", 1, a174); - } else { - encodeTextMsg(textMessage, a174); - } - - int allBits = ((174 / nbSymbolBits) + (174 % nbSymbolBits == 0 ? 0 : 1))*nbSymbolBits; // ensures zero bits padding - int iBit; - int symbol = 0; - - interleave174(a174); - - for (int i = 0; i < allBits; i++) - { - iBit = nbSymbolBits - (i % nbSymbolBits) - 1; // MSB first - - if (i < 174) { - symbol += a174[i] * (1<> 1); // Gray code - symbols.push_back(symbol); - symbol = 0; - } - } -} - -void MeshtasticModEncoderFT::encodeTextMsg(const QString& text, int a174[]) -{ - int a77[77]; - std::fill(a77, a77 + 77, 0); - QString sentMsg = text.rightJustified(13, ' ', true); - - if (!FT8::Packing::packfree(a77, sentMsg.toUpper().toStdString())) - { - qDebug("MeshtasticModEncoderFT::encodeTextMsg: failed to encode free text message (%s)", qPrintable(sentMsg)); - return; - } - - FT8::FT8::encode(a174, a77); -} - -void MeshtasticModEncoderFT::encodeMsgBeaconOrCQ(const QString& myCall, const QString& myLocator, const QString& shorthand, int a174[]) -{ - int c28_1, c28_2, g15; - - if (!FT8::Packing::packcall_std(c28_1, shorthand.toUpper().toStdString())) // - { - qDebug("MeshtasticModEncoderFT::encodeMsgBeaconOrCQ: failed to encode call1 (%s)", qPrintable(shorthand)); - return; - } - - if (!FT8::Packing::packcall_std(c28_2, myCall.toUpper().toStdString())) - { - qDebug("MeshtasticModEncoderFT::encodeMsgBeaconOrCQ: failed to encode call2 (%s)", qPrintable(myCall)); - return; - } - - if (myLocator.size() < 4) - { - qDebug("MeshtasticModEncoderFT::encodeMsgBeaconOrCQ: locator invalid (%s)", qPrintable(myLocator)); - return; - } - - if (!FT8::Packing::packgrid(g15, myLocator.left(4).toUpper().toStdString())) - { - qDebug("MeshtasticModEncoderFT::encodeMsgBeaconOrCQ: failed to encode locator (%s)", qPrintable(myLocator)); - return; - } - - int a77[77]; - std::fill(a77, a77 + 77, 0); - FT8::Packing::pack1(a77, c28_1, c28_2, g15, 0); - FT8::FT8::encode(a174, a77); -} - -void MeshtasticModEncoderFT::encodeMsgReply(const QString& myCall, const QString& urCall, const QString& myLocator, int a174[]) -{ - int c28_1, c28_2, g15; - - if (!FT8::Packing::packcall_std(c28_1, urCall.toUpper().toStdString())) // - { - qDebug("MeshtasticModEncoderFT::encodeMsgReply: failed to encode call1 (%s)", qPrintable(urCall)); - return; - } - - if (!FT8::Packing::packcall_std(c28_2, myCall.toUpper().toStdString())) - { - qDebug("MeshtasticModEncoderFT::encodeMsgReply: failed to encode call2 (%s)", qPrintable(myCall)); - return; - } - - if (myLocator.size() < 4) - { - qDebug("MeshtasticModEncoderFT::encodeMsgReply: locator invalid (%s)", qPrintable(myLocator)); - return; - } - - if (!FT8::Packing::packgrid(g15, myLocator.left(4).toUpper().toStdString())) - { - qDebug("MeshtasticModEncoderFT::encodeMsgReply: failed to encode locator (%s)", qPrintable(myLocator)); - return; - } - - int a77[77]; - std::fill(a77, a77 + 77, 0); - FT8::Packing::pack1(a77, c28_1, c28_2, g15, 0); - FT8::FT8::encode(a174, a77); -} - -void MeshtasticModEncoderFT::encodeMsgReport(const QString& myCall, const QString& urCall, const QString& myReport, int reply, int a174[]) -{ - int c28_1, c28_2, g15; - - if (!FT8::Packing::packcall_std(c28_1, urCall.toUpper().toStdString())) // - { - qDebug("MeshtasticModEncoderFT::encodeMsgReport: failed to encode call1 (%s)", qPrintable(urCall)); - return; - } - - if (!FT8::Packing::packcall_std(c28_2, myCall.toUpper().toStdString())) - { - qDebug("MeshtasticModEncoderFT::encodeMsgReport: failed to encode call2 (%s)", qPrintable(myCall)); - return; - } - - if (!FT8::Packing::packgrid(g15, myReport.toUpper().toStdString())) - { - qDebug("MeshtasticModEncoderFT::encodeMsgReport: failed to encode report (%s)", qPrintable(myReport)); - return; - } - - int a77[77]; - std::fill(a77, a77 + 77, 0); - FT8::Packing::pack1(a77, c28_1, c28_2, g15, reply); - FT8::FT8::encode(a174, a77); -} - -void MeshtasticModEncoderFT::encodeMsgFinish(const QString& myCall, const QString& urCall, const QString& shorthand, int a174[]) -{ - int c28_1, c28_2, g15; - - if (!FT8::Packing::packcall_std(c28_1, urCall.toUpper().toStdString())) // - { - qDebug("MeshtasticModEncoderFT::encodeMsgFinish: failed to encode call1 (%s)", qPrintable(urCall)); - return; - } - - if (!FT8::Packing::packcall_std(c28_2, myCall.toUpper().toStdString())) - { - qDebug("MeshtasticModEncoderFT::encodeMsgFinish: failed to encode call2 (%s)", qPrintable(myCall)); - return; - } - - if (!FT8::Packing::packgrid(g15, shorthand.toUpper().toStdString())) - { - qDebug("MeshtasticModEncoderFT::encodeMsgFinish: failed to encode shorthand (%s)", qPrintable(shorthand)); - return; - } - - int a77[77]; - std::fill(a77, a77 + 77, 0); - FT8::Packing::pack1(a77, c28_1, c28_2, g15, 0); - FT8::FT8::encode(a174, a77); -} - -void MeshtasticModEncoderFT::interleave174(int a174[]) -{ - // 174 = 2*3*29 - int t174[174]; - std::copy(a174, a174+174, t174); - - for (int i = 0; i < 174; i++) { - a174[i] = t174[(i%6)*29 + (i%29)]; - } -} - -#endif // HAS_FT8 diff --git a/plugins/channeltx/modmeshtastic/meshtasticmodencoderft.h b/plugins/channeltx/modmeshtastic/meshtasticmodencoderft.h deleted file mode 100644 index 0d8c6dc81..000000000 --- a/plugins/channeltx/modmeshtastic/meshtasticmodencoderft.h +++ /dev/null @@ -1,49 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////// -// Copyright (C) 2024 Edouard Griffiths, F4EXB // -// // -// This program is free software; you can redistribute it and/or modify // -// it under the terms of the GNU General Public License as published by // -// the Free Software Foundation as version 3 of the License, or // -// (at your option) any later version. // -// // -// This program is distributed in the hope that it will be useful, // -// but WITHOUT ANY WARRANTY; without even the implied warranty of // -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // -// GNU General Public License V3 for more details. // -// // -// You should have received a copy of the GNU General Public License // -// along with this program. If not, see . // -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef PLUGINS_CHANNELTX_MODMESHTASTIC_MESHTASTICMODENCODEFT_H_ -#define PLUGINS_CHANNELTX_MODMESHTASTIC_MESHTASTICMODENCODEFT_H_ - -#include -#include - -#include "meshtasticmodsettings.h" - -class MeshtasticModEncoderFT -{ -public: - static void encodeMsg( - const QString& myCall, - const QString& urCall, - const QString& myLocator, - const QString& myReport, - const QString& textMessage, - MeshtasticModSettings::MessageType messageType, - unsigned int nbSymbolBits, - std::vector& symbols - ); - -private: - static void encodeTextMsg(const QString& text, int a174[]); - static void encodeMsgBeaconOrCQ(const QString& myCall, const QString& myLocator, const QString& shorthand, int a174[]); - static void encodeMsgReply(const QString& myCall, const QString& urCall, const QString& myLocator, int a174[]); - static void encodeMsgReport(const QString& myCall, const QString& urCall, const QString& myReport, int reply, int a174[]); - static void encodeMsgFinish(const QString& myCall, const QString& urCall, const QString& shorthand, int a174[]); - static void interleave174(int a174[]); -}; - -#endif // PLUGINS_CHANNELTX_MODMESHTASTIC_MESHTASTICMODENCODEFT_H_ diff --git a/plugins/channeltx/modmeshtastic/meshtasticmodencodertty.cpp b/plugins/channeltx/modmeshtastic/meshtasticmodencodertty.cpp deleted file mode 100644 index 10ef8d47d..000000000 --- a/plugins/channeltx/modmeshtastic/meshtasticmodencodertty.cpp +++ /dev/null @@ -1,133 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////// -// Copyright (C) 2020 Edouard Griffiths, F4EXB // -// // -// This program is free software; you can redistribute it and/or modify // -// it under the terms of the GNU General Public License as published by // -// the Free Software Foundation as version 3 of the License, or // -// (at your option) any later version. // -// // -// This program is distributed in the hope that it will be useful, // -// but WITHOUT ANY WARRANTY; without even the implied warranty of // -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // -// GNU General Public License V3 for more details. // -// // -// You should have received a copy of the GNU General Public License // -// along with this program. If not, see . // -/////////////////////////////////////////////////////////////////////////////////// - -#include "meshtasticmodencodertty.h" - -const signed char MeshtasticModEncoderTTY::asciiToTTYLetters[128] = { -// '\x00' '\x01' '\x02' '\x03' '\x04' '\x05' '\x06' '\x07' - 0x00, -1 , -1 , -1 , -1 , -1 , -1 , -1 , -// '\x08' '\t' '\n' '\x0b' '\x0c' '\r' '\x0e' '\x0f' - -1 , -1 , 0x02, -1 , -1 , 0x08, -1 , -1 , -// '\x10' '\x11' '\x12' '\x13' '\x14' '\x15' '\x16' '\x17' - -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -// '\x18' '\x19' '\x1a' '\x1b' '\x1c' '\x1d' '\x1e' '\x1f' - -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -// ' ' '!' '"' '#' '$' '%' '&' "'" - 0x04, -1 , -1 , -1 , -1 , -1 , -1 , -1 , -// '(' ')' '*' '+' ',' '-' '.' '/' - -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -// '0' '1' '2' '3' '4' '5' '6' '7' - -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -// '8' '9' ':' ';' '<' '=' '>' '?' - -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -// '@' 'A' 'B' 'C' 'D' 'E' 'F' 'G' - -1 , 0x03, 0x19, 0x0e, 0x09, 0x01, 0x0d, 0x1a, -// 'H' 'I' 'J' 'K' 'L' 'M' 'N' 'O' - 0x14, 0x06, 0x0b, 0x0f, 0x12, 0x1c, 0x0c, 0x18, -// 'P' 'Q' 'R' 'S' 'T' 'U' 'V' 'W' - 0x16, 0x17, 0x0a, 0x05, 0x10, 0x07, 0x1e, 0x13, -// 'X' 'Y' 'Z' '[' '\\' ']' '^' '_' - 0x1d, 0x15, 0x11, -1 , -1 , -1 , -1 , -1 , -// '`' 'a' 'b' 'c' 'd' 'e' 'f' 'g' - -1 , 0x03, 0x19, 0x0e, 0x09, 0x01, 0x0d, 0x1a, -// 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' - 0x14, 0x06, 0x0b, 0x0f, 0x12, 0x1c, 0x0c, 0x18, -// 'p' 'q' 'r' 's' 't' 'u' 'v' 'w' - 0x16, 0x17, 0x0a, 0x05, 0x10, 0x07, 0x1e, 0x13, -// 'x' 'y' 'z' '{' '|' '}' '~' '\x7f' - 0x1d, 0x15, 0x11, -1 , -1 , -1 , -1 , -1 - }; - -const signed char MeshtasticModEncoderTTY::asciiToTTYFigures[128] = { -// '\x00' '\x01' '\x02' '\x03' '\x04' '\x05' '\x06' '\x07' - 0x00, -1 , -1 , -1 , -1 , -1 , -1 , 0x05, -// '\x08' '\t' '\n' '\x0b' '\x0c' '\r' '\x0e' '\x0f' - -1 , -1 , 0x02, -1 , -1 , 0x08, -1 , -1 , -// '\x10' '\x11' '\x12' '\x13' '\x14' '\x15' '\x16' '\x17' - -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -// '\x18' '\x19' '\x1a' '\x1b' '\x1c' '\x1d' '\x1e' '\x1f' - -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -// ' ' '!' '"' '#' '$' '%' '&' "'" - 0x04, 0x0d, 0x11, 0x14, 0x09, -1 , 0x1a, -1 , -// '(' ')' '*' '+' ',' '-' '.' '/' - 0x0f, 0x12, -1 , -1 , 0x0c, 0x03, 0x1c, 0x1d, -// '0' '1' '2' '3' '4' '5' '6' '7' - 0x16, 0x17, 0x13, 0x01, 0x0a, 0x10, 0x15, 0x07, -// '8' '9' ':' ';' '<' '=' '>' '?' - 0x06, 0x18, 0x0e, 0x1e, -1 , -1 , -1 , 0x19, -// '@' 'A' 'B' 'C' 'D' 'E' 'F' 'G' - -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -// 'H' 'I' 'J' 'K' 'L' 'M' 'N' 'O' - -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -// 'P' 'Q' 'R' 'S' 'T' 'U' 'V' 'W' - -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -// 'X' 'Y' 'Z' '[' '\\' ']' '^' '_' - -1 , -1 , -1 , -1 , 0x0b, -1 , -1 , -1 , -// '`' 'a' 'b' 'c' 'd' 'e' 'f' 'g' - -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -// 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' - -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -// 'p' 'q' 'r' 's' 't' 'u' 'v' 'w' - -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -// 'x' 'y' 'z' '{' '|' '}' '~' '\x7f' - -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 - }; - -void MeshtasticModEncoderTTY::encodeString(const QString& str, std::vector& symbols) -{ - TTYState ttyState = TTYLetters; - QByteArray asciiStr = str.toUtf8(); - QByteArray::const_iterator it = asciiStr.begin(); - - for (; it != asciiStr.end(); ++it) - { - char asciiChar = *it & 0x7F; - int ttyLetter = asciiToTTYLetters[(int) asciiChar]; - int ttyFigure = asciiToTTYFigures[(int) asciiChar]; - - if (ttyLetter < 0) - { - if (ttyFigure >= 0) - { - if (ttyState != TTYFigures) - { - symbols.push_back(ttyFigures); - ttyState = TTYFigures; - } - - symbols.push_back(ttyFigure); - } // else skip - } - else - { - if (ttyFigure >= 0) - { - symbols.push_back(ttyFigure); // same TTY character no state change - } - else - { - if (ttyState != TTYLetters) - { - symbols.push_back(ttyLetters); - ttyState = TTYLetters; - } - - symbols.push_back(ttyLetter); - } - } - } -} diff --git a/plugins/channeltx/modmeshtastic/meshtasticmodencodertty.h b/plugins/channeltx/modmeshtastic/meshtasticmodencodertty.h deleted file mode 100644 index 649b5c47a..000000000 --- a/plugins/channeltx/modmeshtastic/meshtasticmodencodertty.h +++ /dev/null @@ -1,44 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////// -// Copyright (C) 2012 maintech GmbH, Otto-Hahn-Str. 15, 97204 Hoechberg, Germany // -// written by Christian Daniel // -// Copyright (C) 2015-2020 Edouard Griffiths, F4EXB // -// // -// This program is free software; you can redistribute it and/or modify // -// it under the terms of the GNU General Public License as published by // -// the Free Software Foundation as version 3 of the License, or // -// (at your option) any later version. // -// // -// This program is distributed in the hope that it will be useful, // -// but WITHOUT ANY WARRANTY; without even the implied warranty of // -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // -// GNU General Public License V3 for more details. // -// // -// You should have received a copy of the GNU General Public License // -// along with this program. If not, see . // -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef PLUGINS_CHANNELTX_MODMESHTASTIC_MESHTASTICMODENCODERTTY_H_ -#define PLUGINS_CHANNELTX_MODMESHTASTIC_MESHTASTICMODENCODERTTY_H_ - -#include -#include - -class MeshtasticModEncoderTTY -{ -public: - static void encodeString(const QString& str, std::vector& symbols); - -private: - enum TTYState - { - TTYLetters, - TTYFigures - }; - - static const signed char asciiToTTYLetters[128]; - static const signed char asciiToTTYFigures[128]; - static const char ttyLetters = 0x1f; - static const char ttyFigures = 0x1b; -}; - -#endif // PLUGINS_CHANNELTX_MODMESHTASTIC_MESHTASTICMODENCODERTTY_H_ diff --git a/plugins/channeltx/modmeshtastic/meshtasticmodgui.cpp b/plugins/channeltx/modmeshtastic/meshtasticmodgui.cpp index 6e360816d..632532901 100644 --- a/plugins/channeltx/modmeshtastic/meshtasticmodgui.cpp +++ b/plugins/channeltx/modmeshtastic/meshtasticmodgui.cpp @@ -357,15 +357,6 @@ void MeshtasticModGUI::on_syncWord_editingFinished() } } -void MeshtasticModGUI::on_scheme_currentIndexChanged(int index) -{ - m_settings.m_codingScheme = (MeshtasticModSettings::CodingScheme) index; - ui->fecParity->setEnabled(m_settings.m_codingScheme == MeshtasticModSettings::CodingLoRa); - ui->crc->setEnabled(m_settings.m_codingScheme == MeshtasticModSettings::CodingLoRa); - ui->header->setEnabled(m_settings.m_codingScheme == MeshtasticModSettings::CodingLoRa); - applySettings(); -} - void MeshtasticModGUI::on_fecParity_valueChanged(int value) { m_settings.m_nbParityBits = value; @@ -409,14 +400,6 @@ void MeshtasticModGUI::on_report_editingFinished() applySettings(); } -void MeshtasticModGUI::on_msgType_currentIndexChanged(int index) -{ - m_settings.m_messageType = (MeshtasticModSettings::MessageType) index; - displayCurrentPayloadMessage(); - applyMeshtasticRadioSettingsIfPresent(getActivePayloadText()); - applySettings(); -} - void MeshtasticModGUI::on_resetMessages_clicked(bool checked) { (void) checked; @@ -429,12 +412,8 @@ void MeshtasticModGUI::on_playMessage_clicked(bool checked) { (void) checked; applyMeshtasticRadioSettingsIfPresent(getActivePayloadText()); - // Switch to message None then back to current message type to trigger sending process - MeshtasticModSettings::MessageType msgType = m_settings.m_messageType; - m_settings.m_messageType = MeshtasticModSettings::MessageNone; - applySettings(); - m_settings.m_messageType = msgType; applySettings(); + m_meshtasticMod->sendMessage(); } void MeshtasticModGUI::on_repeatMessage_valueChanged(int value) @@ -591,6 +570,10 @@ MeshtasticModGUI::MeshtasticModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISe connect(&MainCore::instance()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick())); + ui->fecParity->setEnabled(true); + ui->crc->setEnabled(true); + ui->header->setEnabled(true); + ui->deltaFrequencyLabel->setText(QString("%1f").arg(QChar(0x94, 0x03))); ui->deltaFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold)); ui->deltaFrequency->setValueRange(false, 7, -9999999, 9999999); @@ -854,7 +837,6 @@ void MeshtasticModGUI::makeUIConnections() QObject::connect(ui->idleTime, &QSlider::valueChanged, this, &MeshtasticModGUI::on_idleTime_valueChanged); QObject::connect(ui->syncWord, &QLineEdit::editingFinished, this, &MeshtasticModGUI::on_syncWord_editingFinished); QObject::connect(ui->channelMute, &QToolButton::toggled, this, &MeshtasticModGUI::on_channelMute_toggled); - QObject::connect(ui->scheme, QOverload::of(&QComboBox::currentIndexChanged), this, &MeshtasticModGUI::on_scheme_currentIndexChanged); QObject::connect(ui->fecParity, &QDial::valueChanged, this, &MeshtasticModGUI::on_fecParity_valueChanged); QObject::connect(ui->crc, &QCheckBox::stateChanged, this, &MeshtasticModGUI::on_crc_stateChanged); QObject::connect(ui->header, &QCheckBox::stateChanged, this, &MeshtasticModGUI::on_header_stateChanged); @@ -862,7 +844,6 @@ void MeshtasticModGUI::makeUIConnections() QObject::connect(ui->urCall, &QLineEdit::editingFinished, this, &MeshtasticModGUI::on_urCall_editingFinished); QObject::connect(ui->myLocator, &QLineEdit::editingFinished, this, &MeshtasticModGUI::on_myLocator_editingFinished); QObject::connect(ui->report, &QLineEdit::editingFinished, this, &MeshtasticModGUI::on_report_editingFinished); - QObject::connect(ui->msgType, QOverload::of(&QComboBox::currentIndexChanged), this, &MeshtasticModGUI::on_msgType_currentIndexChanged); QObject::connect(ui->resetMessages, &QPushButton::clicked, this, &MeshtasticModGUI::on_resetMessages_clicked); QObject::connect(ui->playMessage, &QPushButton::clicked, this, &MeshtasticModGUI::on_playMessage_clicked); QObject::connect(ui->repeatMessage, &QDial::valueChanged, this, &MeshtasticModGUI::on_repeatMessage_valueChanged); diff --git a/plugins/channeltx/modmeshtastic/meshtasticmodgui.h b/plugins/channeltx/modmeshtastic/meshtasticmodgui.h index 9b34dd111..59661f2a6 100644 --- a/plugins/channeltx/modmeshtastic/meshtasticmodgui.h +++ b/plugins/channeltx/modmeshtastic/meshtasticmodgui.h @@ -109,7 +109,6 @@ private slots: void on_idleTime_valueChanged(int value); void on_syncWord_editingFinished(); void on_channelMute_toggled(bool checked); - void on_scheme_currentIndexChanged(int index); void on_fecParity_valueChanged(int value); void on_crc_stateChanged(int state); void on_header_stateChanged(int state); @@ -117,7 +116,6 @@ private slots: void on_urCall_editingFinished(); void on_myLocator_editingFinished(); void on_report_editingFinished(); - void on_msgType_currentIndexChanged(int index); void on_resetMessages_clicked(bool checked); void on_playMessage_clicked(bool checked); void on_repeatMessage_valueChanged(int value); diff --git a/plugins/channeltx/modmeshtastic/meshtasticmodsettings.cpp b/plugins/channeltx/modmeshtastic/meshtasticmodsettings.cpp index cea9b7db6..e4410fbaa 100644 --- a/plugins/channeltx/modmeshtastic/meshtasticmodsettings.cpp +++ b/plugins/channeltx/modmeshtastic/meshtasticmodsettings.cpp @@ -55,6 +55,9 @@ const int MeshtasticModSettings::bandwidths[] = { 400000, // 400k / 1 500000 // 500k / 1 }; + +const MeshtasticModSettings::CodingScheme MeshtasticModSettings::m_codingScheme = MeshtasticModSettings::CodingLoRa; +const MeshtasticModSettings::MessageType MeshtasticModSettings::m_messageType = MeshtasticModSettings::MessageText; const int MeshtasticModSettings::nbBandwidths = 3*8 + 4; const int MeshtasticModSettings::oversampling = 4; @@ -73,7 +76,6 @@ void MeshtasticModSettings::resetToDefaults() m_deBits = 0; m_preambleChirps = 8; m_quietMillis = 1000; - m_codingScheme = CodingLoRa; m_nbParityBits = 1; m_hasCRC = true; m_hasHeader = true; @@ -225,13 +227,10 @@ bool MeshtasticModSettings::deserialize(const QByteArray& data) { QByteArray bytetmp; unsigned int utmp; - int tmp; d.readS32(1, &m_inputFrequencyOffset, 0); d.readS32(2, &m_bandwidthIndex, 0); d.readS32(3, &m_spreadFactor, 0); - d.readS32(4, &tmp, 0); - m_codingScheme = (CodingScheme) tmp; if (m_channelMarker) { @@ -258,8 +257,6 @@ bool MeshtasticModSettings::deserialize(const QByteArray& data) d.readString(27, &m_qsoTextMessage, "%2 %1 Hello LoRa"); d.readString(28, &m_textMessage, "Hello LoRa"); d.readBlob(29, &m_bytesMessage); - d.readS32(30, &tmp, 0); - m_messageType = (MessageType) tmp; d.readS32(31, &m_nbParityBits, 1); d.readBool(32, &m_hasCRC, true); d.readBool(33, &m_hasHeader, true); @@ -323,8 +320,6 @@ void MeshtasticModSettings::applySettings(const QStringList& settingsKeys, const m_spreadFactor = settings.m_spreadFactor; if (settingsKeys.contains("deBits")) m_deBits = settings.m_deBits; - if (settingsKeys.contains("codingScheme")) - m_codingScheme = settings.m_codingScheme; if (settingsKeys.contains("preambleChirps")) m_preambleChirps = settings.m_preambleChirps; if (settingsKeys.contains("quietMillis")) @@ -385,8 +380,6 @@ void MeshtasticModSettings::applySettings(const QStringList& settingsKeys, const m_textMessage = settings.m_textMessage; if (settingsKeys.contains("bytesMessage")) m_bytesMessage = settings.m_bytesMessage; - if (settingsKeys.contains("messageType")) - m_messageType = settings.m_messageType; if (settingsKeys.contains("nbParityBits")) m_nbParityBits = settings.m_nbParityBits; if (settingsKeys.contains("hasCRC")) diff --git a/plugins/channeltx/modmeshtastic/meshtasticmodsettings.h b/plugins/channeltx/modmeshtastic/meshtasticmodsettings.h index 0fb154935..66e7a1c2b 100644 --- a/plugins/channeltx/modmeshtastic/meshtasticmodsettings.h +++ b/plugins/channeltx/modmeshtastic/meshtasticmodsettings.h @@ -64,12 +64,12 @@ struct MeshtasticModSettings bool m_hasHeader; //!< Header present before actual payload (LoRa) unsigned char m_syncWord; bool m_channelMute; - CodingScheme m_codingScheme; + static const CodingScheme m_codingScheme; QString m_myCall; //!< QSO mode: my callsign QString m_urCall; //!< QSO mode: your callsign QString m_myLoc; //!< QSO mode: my locator QString m_myRpt; //!< QSO mode: my report - MessageType m_messageType; + static const MessageType m_messageType; QString m_beaconMessage; QString m_cqMessage; QString m_replyMessage;