Added ability to spot ssids with compound callsigns ala, KN4CRD/7
This commit is contained in:
parent
859a40da5c
commit
640ce756c0
@ -190,14 +190,11 @@ QString APRSISClient::stripSSID(QString call){
|
||||
|
||||
QString APRSISClient::replaceCallsignSuffixWithSSID(QString call, QString base){
|
||||
if(call != base){
|
||||
QRegularExpression re("[/](?<ssid>(P|\\d+))");
|
||||
QRegularExpression re("[/](?<ssid>(\\d+))");
|
||||
auto matcher = re.globalMatch(call);
|
||||
if(matcher.hasNext()){
|
||||
auto match = matcher.next();
|
||||
auto ssid = match.captured("ssid");
|
||||
if(ssid == "P"){
|
||||
ssid = "16";
|
||||
}
|
||||
call = base + "-" + ssid;
|
||||
} else {
|
||||
call = base;
|
||||
|
@ -5254,8 +5254,9 @@ void MainWindow::spotAprsCmd(CommandDetail cmd){
|
||||
|
||||
qDebug() << "APRSISClient Enqueueing Third Party Text" << cmd.from << cmd.text;
|
||||
|
||||
auto by_call = Radio::base_callsign(m_config.my_callsign());
|
||||
auto from_call = Radio::base_callsign(cmd.from);
|
||||
auto callsign = cmd.from;
|
||||
auto by_call = APRSISClient::replaceCallsignSuffixWithSSID(m_config.my_callsign(), Radio::base_callsign(m_config.my_callsign()));
|
||||
auto from_call = APRSISClient::replaceCallsignSuffixWithSSID(callsign, Radio::base_callsign(callsign));
|
||||
|
||||
// we use a queued signal here so we can process these spots in a network thread
|
||||
// to prevent blocking the gui/decoder while waiting on TCP
|
||||
@ -5274,8 +5275,8 @@ void MainWindow::spotAprsGrid(int offset, int snr, QString callsign, QString gri
|
||||
comment = QString("%1 %2").arg(callsign).arg(comment);
|
||||
}
|
||||
|
||||
auto by_call = Radio::base_callsign(m_config.my_callsign());
|
||||
auto from_call = Radio::base_callsign(callsign);
|
||||
auto by_call = APRSISClient::replaceCallsignSuffixWithSSID(m_config.my_callsign(), Radio::base_callsign(m_config.my_callsign()));
|
||||
auto from_call = APRSISClient::replaceCallsignSuffixWithSSID(callsign, Radio::base_callsign(callsign));
|
||||
|
||||
// we use a queued signal here so we can process these spots in a network thread
|
||||
// to prevent blocking the gui/decoder while waiting on TCP
|
||||
|
Loading…
Reference in New Issue
Block a user