diff --git a/modemmeshtastic/meshtasticpacket.cpp b/modemmeshtastic/meshtasticpacket.cpp index fecb7ac08..e8d350872 100644 --- a/modemmeshtastic/meshtasticpacket.cpp +++ b/modemmeshtastic/meshtasticpacket.cpp @@ -1,6 +1,6 @@ /////////////////////////////////////////////////////////////////////////////////// +// Copyright (C) 2026 Alejandro Aleman // // Copyright (C) 2026 Edouard Griffiths, F4EXB // -// Copyright (C) 2026 AI (unknown) // // // // 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 // diff --git a/modemmeshtastic/meshtasticpacket.h b/modemmeshtastic/meshtasticpacket.h index 1c194a543..b8df3bb9e 100644 --- a/modemmeshtastic/meshtasticpacket.h +++ b/modemmeshtastic/meshtasticpacket.h @@ -1,6 +1,6 @@ /////////////////////////////////////////////////////////////////////////////////// +// Copyright (C) 2026 Alejandro Aleman // // Copyright (C) 2026 Edouard Griffiths, F4EXB // -// Copyright (C) 2026 AI (unknown) // // // // 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 // diff --git a/plugins/channelrx/demodmeshtastic/CMakeLists.txt b/plugins/channelrx/demodmeshtastic/CMakeLists.txt index f7cb7d13e..f6adea1d2 100644 --- a/plugins/channelrx/demodmeshtastic/CMakeLists.txt +++ b/plugins/channelrx/demodmeshtastic/CMakeLists.txt @@ -17,6 +17,7 @@ set(meshtastic_SOURCES meshtasticdemoddecoderlora.cpp meshtasticdemoddecoderft.cpp meshtasticdemodmsg.cpp + meshtasticdemodwebapiadapter.cpp ) set(meshtastic_HEADERS @@ -31,6 +32,7 @@ set(meshtastic_HEADERS meshtasticdemoddecoderft.h meshtasticdemodmsg.h meshtasticplugin.h + meshtasticdemodwebapiadapter.h ) include_directories( diff --git a/plugins/channelrx/demodmeshtastic/meshtasticdemodgui.cpp b/plugins/channelrx/demodmeshtastic/meshtasticdemodgui.cpp index 6dcf1ed34..65c7f6c7e 100644 --- a/plugins/channelrx/demodmeshtastic/meshtasticdemodgui.cpp +++ b/plugins/channelrx/demodmeshtastic/meshtasticdemodgui.cpp @@ -873,12 +873,12 @@ void MeshtasticDemodGUI::handleMeshAutoLockSourceObservation() } MeshAutoLockCandidate& candidate = m_meshAutoLockCandidates[m_meshAutoLockCandidateIndex]; - const double totalPower = std::max(1e-12, m_chirpChatDemod->getTotalPower()); - const double noisePower = std::max(1e-12, m_chirpChatDemod->getCurrentNoiseLevel()); + const double totalPower = std::max(1e-12, m_meshtasticDemod->getTotalPower()); + const double noisePower = std::max(1e-12, m_meshtasticDemod->getCurrentNoiseLevel()); const double totalDb = CalcDb::dbPower(totalPower); const double noiseDb = CalcDb::dbPower(noisePower); const double p2nDb = std::max(-20.0, std::min(40.0, totalDb - noiseDb)); - const bool demodActive = m_chirpChatDemod->getDemodActive(); + const bool demodActive = m_meshtasticDemod->getDemodActive(); if (!m_meshAutoLockTrafficSeen) { @@ -1149,11 +1149,11 @@ bool MeshtasticDemodGUI::autoTuneDeviceSampleRateForBandwidth(int bandwidthHz, Q { summary.clear(); - if (!m_chirpChatDemod) { + if (!m_meshtasticDemod) { return false; } - const int deviceSetIndex = m_chirpChatDemod->getDeviceSetIndex(); + const int deviceSetIndex = m_meshtasticDemod->getDeviceSetIndex(); if (deviceSetIndex < 0) { return false; @@ -1681,7 +1681,7 @@ void MeshtasticDemodGUI::onMenuDialogCalled(const QPoint &p) if (m_deviceUISet->m_deviceMIMOEngine) { - dialog.setNumberOfStreams(m_chirpChatDemod->getNumberOfDeviceStreams()); + dialog.setNumberOfStreams(m_meshtasticDemod->getNumberOfDeviceStreams()); dialog.setStreamIndex(m_settings.m_streamIndex); } @@ -1786,10 +1786,10 @@ MeshtasticDemodGUI::MeshtasticDemodGUI(PluginAPI* pluginAPI, DeviceUISet *device connect(rollupContents, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool))); connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &))); - m_chirpChatDemod = (MeshtasticDemod*) rxChannel; - m_spectrumVis = m_chirpChatDemod->getSpectrumVis(); + m_meshtasticDemod = (MeshtasticDemod*) rxChannel; + m_spectrumVis = m_meshtasticDemod->getSpectrumVis(); m_spectrumVis->setGLSpectrum(ui->glSpectrum); - m_chirpChatDemod->setMessageQueueToGUI(getInputMessageQueue()); + m_meshtasticDemod->setMessageQueueToGUI(getInputMessageQueue()); connect(&MainCore::instance()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick())); @@ -1918,7 +1918,7 @@ void MeshtasticDemodGUI::applySettings(bool force) { setTitleColor(m_channelMarker.getColor()); MeshtasticDemod::MsgConfigureMeshtasticDemod* message = MeshtasticDemod::MsgConfigureMeshtasticDemod::create( m_settings, force); - m_chirpChatDemod->getInputMessageQueue()->push(message); + m_meshtasticDemod->getInputMessageQueue()->push(message); } } @@ -3464,10 +3464,10 @@ void MeshtasticDemodGUI::tick() { m_tickCount = 0; - ui->nText->setText(tr("%1").arg(CalcDb::dbPower(m_chirpChatDemod->getCurrentNoiseLevel()), 0, 'f', 1)); - ui->channelPower->setText(tr("%1 dB").arg(CalcDb::dbPower(m_chirpChatDemod->getTotalPower()), 0, 'f', 1)); + ui->nText->setText(tr("%1").arg(CalcDb::dbPower(m_meshtasticDemod->getCurrentNoiseLevel()), 0, 'f', 1)); + ui->channelPower->setText(tr("%1 dB").arg(CalcDb::dbPower(m_meshtasticDemod->getTotalPower()), 0, 'f', 1)); - if (m_chirpChatDemod->getDemodActive()) { + if (m_meshtasticDemod->getDemodActive()) { ui->mute->setStyleSheet("QToolButton { background-color : green; }"); } else { ui->mute->setStyleSheet("QToolButton { background:rgb(79,79,79); }"); diff --git a/plugins/channelrx/demodmeshtastic/meshtasticdemodgui.h b/plugins/channelrx/demodmeshtastic/meshtasticdemodgui.h index e5dae6b14..653cde441 100644 --- a/plugins/channelrx/demodmeshtastic/meshtasticdemodgui.h +++ b/plugins/channelrx/demodmeshtastic/meshtasticdemodgui.h @@ -119,7 +119,7 @@ private: int m_basebandSampleRate; bool m_doApplySettings; - MeshtasticDemod* m_chirpChatDemod; + MeshtasticDemod* m_meshtasticDemod; SpectrumVis* m_spectrumVis; QComboBox* m_meshRegionCombo; QComboBox* m_meshPresetCombo; diff --git a/plugins/channelrx/demodmeshtastic/meshtasticplugin.h b/plugins/channelrx/demodmeshtastic/meshtasticplugin.h index 292ef1aac..ab18084d2 100644 --- a/plugins/channelrx/demodmeshtastic/meshtasticplugin.h +++ b/plugins/channelrx/demodmeshtastic/meshtasticplugin.h @@ -47,4 +47,4 @@ private: PluginAPI* m_pluginAPI; }; -#endif // INCLUDE_LoRaPLUGIN_H +#endif // INCLUDE_MESHTASTICPLUGIN_H diff --git a/plugins/channeltx/modmeshtastic/meshtasticmodgui.cpp b/plugins/channeltx/modmeshtastic/meshtasticmodgui.cpp index 85cdd2767..6e360816d 100644 --- a/plugins/channeltx/modmeshtastic/meshtasticmodgui.cpp +++ b/plugins/channeltx/modmeshtastic/meshtasticmodgui.cpp @@ -1,5 +1,6 @@ /////////////////////////////////////////////////////////////////////////////////// -// Copyright (C) 2020-2022 Edouard Griffiths, F4EXB // +// Copyright (C) 2026 Alejandro Aleman // +// Copyright (C) 2020-2026 Edouard Griffiths, F4EXB // // Copyright (C) 2021-2023 Jon Beniston, M7RCE // // // // This program is free software; you can redistribute it and/or modify // @@ -531,7 +532,7 @@ void MeshtasticModGUI::onMenuDialogCalled(const QPoint &p) if (m_deviceUISet->m_deviceMIMOEngine) { - dialog.setNumberOfStreams(m_chirpChatMod->getNumberOfDeviceStreams()); + dialog.setNumberOfStreams(m_meshtasticMod->getNumberOfDeviceStreams()); dialog.setStreamIndex(m_settings.m_streamIndex); } @@ -585,8 +586,8 @@ MeshtasticModGUI::MeshtasticModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISe connect(rollupContents, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool))); connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &))); - m_chirpChatMod = (MeshtasticMod*) channelTx; - m_chirpChatMod->setMessageQueueToGUI(getInputMessageQueue()); + m_meshtasticMod = (MeshtasticMod*) channelTx; + m_meshtasticMod->setMessageQueueToGUI(getInputMessageQueue()); connect(&MainCore::instance()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick())); @@ -698,7 +699,7 @@ void MeshtasticModGUI::applySettings(bool force) if (m_doApplySettings) { MeshtasticMod::MsgConfigureMeshtasticMod *msg = MeshtasticMod::MsgConfigureMeshtasticMod::create(m_settings, force); - m_chirpChatMod->getInputMessageQueue()->push(msg); + m_meshtasticMod->getInputMessageQueue()->push(msg); } } @@ -831,11 +832,11 @@ void MeshtasticModGUI::tick() else { m_tickCount = 0; - double powDb = CalcDb::dbPower(m_chirpChatMod->getMagSq()); + double powDb = CalcDb::dbPower(m_meshtasticMod->getMagSq()); m_channelPowerDbAvg(powDb); ui->channelPower->setText(tr("%1 dB").arg(m_channelPowerDbAvg.asDouble(), 0, 'f', 1)); - if (m_chirpChatMod->getModulatorActive()) { + if (m_meshtasticMod->getModulatorActive()) { ui->playMessage->setStyleSheet("QPushButton { background-color : green; }"); } else { ui->playMessage->setStyleSheet("QPushButton { background:rgb(79,79,79); }"); diff --git a/plugins/channeltx/modmeshtastic/meshtasticmodgui.h b/plugins/channeltx/modmeshtastic/meshtasticmodgui.h index b03782e67..9b34dd111 100644 --- a/plugins/channeltx/modmeshtastic/meshtasticmodgui.h +++ b/plugins/channeltx/modmeshtastic/meshtasticmodgui.h @@ -1,5 +1,6 @@ /////////////////////////////////////////////////////////////////////////////////// -// Copyright (C) 2016-2020, 2022 Edouard Griffiths, F4EXB // +// Copyright (C) 2026 Alejandro Aleman // +// Copyright (C) 2016-2026 Edouard Griffiths, F4EXB // // Copyright (C) 2021-2022 Jon Beniston, M7RCE // // // // This program is free software; you can redistribute it and/or modify // @@ -16,8 +17,8 @@ // along with this program. If not, see . // /////////////////////////////////////////////////////////////////////////////////// -#ifndef PLUGINS_CHANNELTX_MODLORA_LORAMODGUI_H_ -#define PLUGINS_CHANNELTX_MODLORA_LORAMODGUI_H_ +#ifndef PLUGINS_CHANNELTX_MODMESHTASTIC_MESHTASTICMODGUI_H_ +#define PLUGINS_CHANNELTX_MODMESHTASTIC_MESHTASTICMODGUI_H_ #include "channel/channelgui.h" #include "dsp/channelmarker.h" @@ -73,7 +74,7 @@ private: int m_basebandSampleRate; bool m_doApplySettings; - MeshtasticMod* m_chirpChatMod; + MeshtasticMod* m_meshtasticMod; MovingAverageUtil m_channelPowerDbAvg; std::size_t m_tickCount; @@ -132,4 +133,4 @@ private slots: void tick(); }; -#endif /* PLUGINS_CHANNELTX_MODLORA_LORAMODGUI_H_ */ +#endif /* PLUGINS_CHANNELTX_MODMESHTASTIC_MESHTASTICMODGUI_H_ */ diff --git a/plugins/channeltx/modmeshtastic/meshtasticmodsource.cpp b/plugins/channeltx/modmeshtastic/meshtasticmodsource.cpp index c99fc8aab..9a8ade83e 100644 --- a/plugins/channeltx/modmeshtastic/meshtasticmodsource.cpp +++ b/plugins/channeltx/modmeshtastic/meshtasticmodsource.cpp @@ -330,7 +330,7 @@ void MeshtasticModSource::calculateLevel(Real& sample) { if (m_levelCalcCount < m_levelNbSamples) { - m_peakLevel = std::max(std::fabs(m_peakLevel), sample); + m_peakLevel = std::max(m_peakLevel, std::fabs(sample)); m_levelSum += sample * sample; m_levelCalcCount++; } diff --git a/plugins/channeltx/modmeshtastic/meshtasticmodsource.h b/plugins/channeltx/modmeshtastic/meshtasticmodsource.h index 7905b3b15..515416ce4 100644 --- a/plugins/channeltx/modmeshtastic/meshtasticmodsource.h +++ b/plugins/channeltx/modmeshtastic/meshtasticmodsource.h @@ -1,5 +1,6 @@ /////////////////////////////////////////////////////////////////////////////////// -// Copyright (C) 2019-2020 Edouard Griffiths, F4EXB // +// Copyright (C) 2026 Alejandro Aleman // +// Copyright (C) 2019-2026 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 // @@ -57,7 +58,7 @@ private: ChirpChatStatePreamble, //!< Transmit preamble ChirpChatStateSyncWord, //!< Transmit sync word ChirpChatStateSFD, //!< Transmit SFD - ChirpChatStatePayload //!< Tramsmoit payload + ChirpChatStatePayload //!< Transmit payload }; int m_channelSampleRate; diff --git a/plugins/channeltx/modmeshtastic/meshtasticmodwebapiadapter.h b/plugins/channeltx/modmeshtastic/meshtasticmodwebapiadapter.h index 3924e789a..f9ebb1f6d 100644 --- a/plugins/channeltx/modmeshtastic/meshtasticmodwebapiadapter.h +++ b/plugins/channeltx/modmeshtastic/meshtasticmodwebapiadapter.h @@ -46,4 +46,4 @@ private: MeshtasticModSettings m_settings; }; -#endif // INCLUDE_LORAMOD_WEBAPIADAPTER_H +#endif // INCLUDE_MESHTASTICMOD_WEBAPIADAPTER_H