Merge remote-tracking branch 'upstream/master' into openwrt

This commit is contained in:
Shawn Chain 2019-12-09 13:53:47 +08:00
commit fd4228b74f

View file

@ -406,12 +406,12 @@ void CAPRSWriter::sendIdFramesFixed()
lon.Replace(wxT(","), wxT("."));
wxString output;
output.Printf(wxT("%s-S>APDG01,TCPIP*,qAC,%s-GS:;%-7s%-2s*%02d%02d%02dz%s%cD%s%ca/A=%06.0lfRNG%04.0lf %s %s"),
output.Printf(wxT("%s-S>APDG01,TCPIP*,qAC,%s-GS:;%-7s%-2s*%02d%02d%02dz%s%cD%s%caRNG%04.0lf/A=%06.0lf %s %s"),
m_gateway.c_str(), m_gateway.c_str(), entry->getCallsign().c_str(), entry->getBand().c_str(),
tm->tm_mday, tm->tm_hour, tm->tm_min,
lat.c_str(), (entry->getLatitude() < 0.0F) ? wxT('S') : wxT('N'),
lon.c_str(), (entry->getLongitude() < 0.0F) ? wxT('W') : wxT('E'),
entry->getAGL() * 3.28, entry->getRange() * 0.6214, band.c_str(), desc.c_str());
entry->getRange() * 0.6214, entry->getAGL() * 3.28, band.c_str(), desc.c_str());
char ascii[300U];
::memset(ascii, 0x00, 300U);
@ -421,11 +421,11 @@ void CAPRSWriter::sendIdFramesFixed()
m_thread->write(ascii);
if (entry->getBand().Len() == 1U) {
output.Printf(wxT("%s-%s>APDG02,TCPIP*,qAC,%s-%sS:!%s%cD%s%c&/A=%06.0lfRNG%04.0lf %s %s"),
output.Printf(wxT("%s-%s>APDG02,TCPIP*,qAC,%s-%sS:!%s%cD%s%c&RNG%04.0lf/A=%06.0lf %s %s"),
entry->getCallsign().c_str(), entry->getBand().c_str(), entry->getCallsign().c_str(), entry->getBand().c_str(),
lat.c_str(), (entry->getLatitude() < 0.0F) ? wxT('S') : wxT('N'),
lon.c_str(), (entry->getLongitude() < 0.0F) ? wxT('W') : wxT('E'),
entry->getAGL() * 3.28, entry->getRange() * 0.6214, band.c_str(), desc.c_str());
entry->getRange() * 0.6214, entry->getAGL() * 3.28, band.c_str(), desc.c_str());
::memset(ascii, 0x00, 300U);
for (unsigned int i = 0U; i < output.Len(); i++)