Fix DMR unable to log into master due to locale issues

When system locale used commas as decimal points, writeConfig() was sending an invalid config string to the master.
This commit is contained in:
Tony Corbett G0WFV 2016-07-02 22:56:22 +01:00
parent ef0ebb4d49
commit fdbf97b1c6

View file

@ -466,6 +466,7 @@ bool CDMRIPSC::writeConfig()
::memcpy(buffer + 0U, "RPTC", 4U);
::memcpy(buffer + 4U, m_id, 4U);
setlocale(LC_ALL,"C");
::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_description.c_str(), slots, m_url.c_str(), m_version, software);