mirror of
https://github.com/g4klx/DMRGateway.git
synced 2026-04-06 15:04:16 +00:00
Pass through the MMDVM's home position to all connected networks.
This commit is contained in:
parent
6aa09f735e
commit
0c31af146c
6 changed files with 82 additions and 27 deletions
|
|
@ -228,7 +228,7 @@ bool CDMRNetwork::write(const CDMRData& data)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool CDMRNetwork::writePosition(const unsigned char* data, unsigned int length)
|
||||
bool CDMRNetwork::writeRadioPosition(const unsigned char* data, unsigned int length)
|
||||
{
|
||||
if (m_status != RUNNING)
|
||||
return false;
|
||||
|
|
@ -260,6 +260,22 @@ bool CDMRNetwork::writeTalkerAlias(const unsigned char* data, unsigned int lengt
|
|||
return write(buffer, length);
|
||||
}
|
||||
|
||||
bool CDMRNetwork::writeHomePosition(const unsigned char* data, unsigned int length)
|
||||
{
|
||||
if (m_status != RUNNING)
|
||||
return false;
|
||||
|
||||
unsigned char buffer[50U];
|
||||
|
||||
::memcpy(buffer + 0U, "RPTG", 4U);
|
||||
|
||||
::memcpy(buffer + 4U, m_id, 4U);
|
||||
|
||||
::memcpy(buffer + 8U, data + 8U, length - 8U);
|
||||
|
||||
return write(buffer, length);
|
||||
}
|
||||
|
||||
bool CDMRNetwork::isConnected() const
|
||||
{
|
||||
return m_status == RUNNING;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue