Allow SSID-like suffixes to be sent to APRS

This commit is contained in:
Jordan Sherer 2018-09-01 20:04:15 -04:00
parent c4db1a9a00
commit bf7d057d6e
2 changed files with 15 additions and 10 deletions

View File

@ -2,7 +2,6 @@
#include <cmath>
#include "Radio.hpp"
#include "varicode.h"

View File

@ -8408,17 +8408,23 @@ void MainWindow::pskSetLocal ()
void MainWindow::aprsSetLocal ()
{
#if 0
auto ssid = m_config.aprs_ssid();
auto call = Radio::base_callsign(m_config.my_callsign());
if(!ssid.isEmpty()){
if(!ssid.startsWith("-")){
ssid = "-" + ssid;
auto grid = m_config.my_grid();
auto call = m_config.my_callsign();
auto base = Radio::base_callsign(call);
if(call != base){
QRegularExpression re("[/](?<ssid>\\d+)");
auto matcher = re.globalMatch(call);
if(matcher.hasNext()){
auto match = matcher.next();
call = base + "-" + match.captured("ssid");
} else {
call = base;
}
call = call + ssid;
}
#endif
m_aprsClient->setLocalStation(m_config.my_callsign(), m_config.my_grid());
qDebug() << "APRSISClient Set Local Station:" << call << grid;
m_aprsClient->setLocalStation(call, grid);
}
void MainWindow::transmitDisplay (bool transmitting)