diff --git a/src/host/Host.cpp b/src/host/Host.cpp index f311da3f..c981e5d7 100644 --- a/src/host/Host.cpp +++ b/src/host/Host.cpp @@ -81,6 +81,7 @@ Host::Host(const std::string& confFile) : m_network(nullptr), m_modemRemotePort(nullptr), m_state(STATE_IDLE), + m_isTxCW(false), m_modeTimer(1000U), m_dmrTXTimer(1000U), m_cwIdTimer(1000U), @@ -1081,6 +1082,7 @@ int Host::run() } LogDebug(LOG_HOST, "CW, start transmitting"); + m_isTxCW = true; clockingMutex.lock(); setState(STATE_IDLE); @@ -1113,6 +1115,7 @@ int Host::run() } while (true); clockingMutex.unlock(); + m_isTxCW = false; m_cwIdTimer.setTimeout(m_cwIdTime); m_cwIdTimer.start(); } diff --git a/src/host/Host.h b/src/host/Host.h index 6bd73607..5c4c9ebf 100644 --- a/src/host/Host.h +++ b/src/host/Host.h @@ -87,6 +87,8 @@ private: uint8_t m_state; + bool m_isTxCW; + Timer m_modeTimer; Timer m_dmrTXTimer; Timer m_cwIdTimer; diff --git a/src/host/network/RESTAPI.cpp b/src/host/network/RESTAPI.cpp index 12d8515a..a26c7657 100644 --- a/src/host/network/RESTAPI.cpp +++ b/src/host/network/RESTAPI.cpp @@ -499,6 +499,8 @@ void RESTAPI::restAPI_GetStatus(const HTTPPayload& request, HTTPPayload& reply, bool nxdnEnabled = m_nxdn != nullptr; response["nxdnEnabled"].set(nxdnEnabled); + response["isTxCW"].set(m_host->m_isTxCW); + response["fixedMode"].set(m_host->m_fixedMode); response["dmrTSCCEnable"].set(m_host->m_dmrTSCCData);