mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-21 23:45:49 +08:00
Add slot link information to the IPSC protocol.
This commit is contained in:
12
DMRIPSC.cpp
12
DMRIPSC.cpp
@@ -408,14 +408,22 @@ bool CDMRIPSC::writeAuthorisation()
|
|||||||
|
|
||||||
bool CDMRIPSC::writeConfig()
|
bool CDMRIPSC::writeConfig()
|
||||||
{
|
{
|
||||||
|
char slots = '0';
|
||||||
|
if (m_slot1 && m_slot2)
|
||||||
|
slots = '3';
|
||||||
|
else if (m_slot1 && !m_slot2)
|
||||||
|
slots = '1';
|
||||||
|
else if (!m_slot1 && m_slot2)
|
||||||
|
slots = '2';
|
||||||
|
|
||||||
char buffer[400U];
|
char buffer[400U];
|
||||||
|
|
||||||
::memcpy(buffer + 0U, "RPTC", 4U);
|
::memcpy(buffer + 0U, "RPTC", 4U);
|
||||||
::memcpy(buffer + 4U, m_id, 4U);
|
::memcpy(buffer + 4U, m_id, 4U);
|
||||||
|
|
||||||
::sprintf(buffer + 8U, "%-8.8s%09u%09u%02u%02u%08f%09f%03d%-20.20s%-20.20s%-124.124s%-40.40s%-40.40s", m_callsign.c_str(),
|
::sprintf(buffer + 8U, "%-8.8s%09u%09u%02u%02u%08f%09f%03d%-20.20s%-19.19s%c%-124.124s%-40.40s%-40.40s", m_callsign.c_str(),
|
||||||
m_rxFrequency, m_txFrequency, m_power, m_colorCode, m_latitude, m_longitude, m_height, m_location.c_str(),
|
m_rxFrequency, m_txFrequency, m_power, m_colorCode, m_latitude, m_longitude, m_height, m_location.c_str(),
|
||||||
m_description.c_str(), m_url.c_str(), m_software, m_version);
|
m_description.c_str(), slots, m_url.c_str(), m_software, m_version);
|
||||||
|
|
||||||
return write((unsigned char*)buffer, 302U);
|
return write((unsigned char*)buffer, 302U);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user