report whether or not the host is transmitting CW;

pull/48/head
Bryan Biedenkapp 2 years ago
parent 71438abb87
commit 0e705f74a6

@ -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();
}

@ -87,6 +87,8 @@ private:
uint8_t m_state;
bool m_isTxCW;
Timer m_modeTimer;
Timer m_dmrTXTimer;
Timer m_cwIdTimer;

@ -499,6 +499,8 @@ void RESTAPI::restAPI_GetStatus(const HTTPPayload& request, HTTPPayload& reply,
bool nxdnEnabled = m_nxdn != nullptr;
response["nxdnEnabled"].set<bool>(nxdnEnabled);
response["isTxCW"].set<bool>(m_host->m_isTxCW);
response["fixedMode"].set<bool>(m_host->m_fixedMode);
response["dmrTSCCEnable"].set<bool>(m_host->m_dmrTSCCData);

Loading…
Cancel
Save

Powered by TurnKey Linux.