Skip to content

Commit

Permalink
Adjust size of latitude and longitude in the DMR info message.
Browse files Browse the repository at this point in the history
  • Loading branch information
g4klx committed Sep 20, 2016
1 parent 2bdef01 commit 1c7fbc0
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions DMRNetwork.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -482,8 +482,14 @@ bool CDMRNetwork::writeConfig()
::memcpy(buffer + 0U, "RPTC", 4U);
::memcpy(buffer + 4U, m_id, 4U);

::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(),
char latitude[20U];
::sprintf(latitude, "%08f", m_latitude);

char longitude[20U];
::sprintf(longitude, "%09f", m_longitude);

::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(),
m_rxFrequency, m_txFrequency, m_power, m_colorCode, latitude, longitude, m_height, m_location.c_str(),
m_description.c_str(), slots, m_url.c_str(), m_version, software);

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

0 comments on commit 1c7fbc0

Please sign in to comment.