Skip to content

Commit 1c7fbc0

Browse files
committed
Adjust size of latitude and longitude in the DMR info message.
1 parent 2bdef01 commit 1c7fbc0

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

DMRNetwork.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -482,8 +482,14 @@ bool CDMRNetwork::writeConfig()
482482
::memcpy(buffer + 0U, "RPTC", 4U);
483483
::memcpy(buffer + 4U, m_id, 4U);
484484

485-
::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(),
486-
m_rxFrequency, m_txFrequency, m_power, m_colorCode, m_latitude, m_longitude, m_height, m_location.c_str(),
485+
char latitude[20U];
486+
::sprintf(latitude, "%08f", m_latitude);
487+
488+
char longitude[20U];
489+
::sprintf(longitude, "%09f", m_longitude);
490+
491+
::sprintf(buffer + 8U, "%-8.8s%09u%09u%02u%02u%.8s%.9s%03d%-20.20s%-19.19s%c%-124.124s%-40.40s%-40.40s", m_callsign.c_str(),
492+
m_rxFrequency, m_txFrequency, m_power, m_colorCode, latitude, longitude, m_height, m_location.c_str(),
487493
m_description.c_str(), slots, m_url.c_str(), m_version, software);
488494

489495
return write((unsigned char*)buffer, 302U);

0 commit comments

Comments
 (0)