Added HEARING query back into the app
This commit is contained in:
parent
3c2a5f98ec
commit
dc70d53f5c
@ -7215,8 +7215,7 @@ void MainWindow::buildQueryMenu(QMenu * menu, QString call){
|
|||||||
if(m_config.transmit_directed()) toggleTx(true);
|
if(m_config.transmit_directed()) toggleTx(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
#if ALLOW_STATIONS_HEARD
|
auto heardQueryAction = menu->addAction(QString("%1 HEARING? - What are the stations are you hearing? (Top 4 ranked by most recently heard)").arg(call).trimmed());
|
||||||
auto heardQueryAction = menu->addAction(QString("%1$ - What are the stations are you hearing? (Top 2 ranked by most recently heard)").arg(call).trimmed());
|
|
||||||
heardQueryAction->setDisabled(isAllCall);
|
heardQueryAction->setDisabled(isAllCall);
|
||||||
connect(heardQueryAction, &QAction::triggered, this, [this](){
|
connect(heardQueryAction, &QAction::triggered, this, [this](){
|
||||||
|
|
||||||
@ -7225,11 +7224,10 @@ void MainWindow::buildQueryMenu(QMenu * menu, QString call){
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
addMessageText(QString("%1$").arg(selectedCall), true);
|
addMessageText(QString("%1 HEARING?").arg(selectedCall), true);
|
||||||
|
|
||||||
if(m_config.transmit_directed()) toggleTx(true);
|
if(m_config.transmit_directed()) toggleTx(true);
|
||||||
});
|
});
|
||||||
#endif
|
|
||||||
|
|
||||||
auto hashAction = menu->addAction(QString("%1#[MESSAGE] - Please ACK if you receive this message in its entirety").arg(call).trimmed());
|
auto hashAction = menu->addAction(QString("%1#[MESSAGE] - Please ACK if you receive this message in its entirety").arg(call).trimmed());
|
||||||
hashAction->setDisabled(isAllCall);
|
hashAction->setDisabled(isAllCall);
|
||||||
@ -9436,11 +9434,10 @@ void MainWindow::processCommandActivity() {
|
|||||||
reply = QString("%1 QTC %2").arg(d.from).arg(replaceMacros(qtc, buildMacroValues(), true));
|
reply = QString("%1 QTC %2").arg(d.from).arg(replaceMacros(qtc, buildMacroValues(), true));
|
||||||
}
|
}
|
||||||
|
|
||||||
#if ALLOW_STATIONS_HEARD
|
|
||||||
// QUERIED STATIONS HEARD
|
// QUERIED STATIONS HEARD
|
||||||
else if (d.cmd == "$" && !isAllCall) {
|
else if (d.cmd == " HEARING?" && !isAllCall) {
|
||||||
int i = 0;
|
int i = 0;
|
||||||
int maxStations = 2;
|
int maxStations = 4;
|
||||||
auto calls = m_callActivity.keys();
|
auto calls = m_callActivity.keys();
|
||||||
qStableSort(calls.begin(), calls.end(), [this](QString
|
qStableSort(calls.begin(), calls.end(), [this](QString
|
||||||
const & a, QString
|
const & a, QString
|
||||||
@ -9468,7 +9465,7 @@ void MainWindow::processCommandActivity() {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
lines.append(QString("%1 %2 (%3)").arg(cd.call).arg(Varicode::formatSNR(cd.snr)).arg(since(cd.utcTimestamp)));
|
lines.append(cd.call);
|
||||||
|
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
@ -9476,16 +9473,6 @@ void MainWindow::processCommandActivity() {
|
|||||||
lines.prepend(QString("%1 HEARING").arg(d.from));
|
lines.prepend(QString("%1 HEARING").arg(d.from));
|
||||||
reply = lines.join(' ');
|
reply = lines.join(' ');
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
// PROCESS RETRANSMIT
|
|
||||||
else if (d.cmd == "|" && !isAllCall) {
|
|
||||||
// TODO: jsherer - perhaps parse d.text and ensure it is a valid message as well as prefix it with our call...
|
|
||||||
|
|
||||||
reply = QString("%1 ACK\n%2 DE %1").arg(d.from).arg(d.text);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// PROCESS RELAY
|
// PROCESS RELAY
|
||||||
else if (d.cmd == ">" && !isAllCall && !isGroupCall) {
|
else if (d.cmd == ">" && !isAllCall && !isGroupCall) {
|
||||||
|
@ -55,7 +55,8 @@ QMap<QString, int> directed_cmds = {
|
|||||||
{" QTC?", 2 }, // query station message
|
{" QTC?", 2 }, // query station message
|
||||||
{"&", 2 }, // compat
|
{"&", 2 }, // compat
|
||||||
|
|
||||||
//{"$", 3 }, // unused
|
{" HEARING?", 3 }, // query station calls heard
|
||||||
|
{"$", 3 }, // compat
|
||||||
|
|
||||||
{" GRID?", 4 }, // query grid
|
{" GRID?", 4 }, // query grid
|
||||||
{"^", 4 }, // compat
|
{"^", 4 }, // compat
|
||||||
@ -117,7 +118,7 @@ QMap<int, int> checksum_cmds = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
QString callsign_pattern = QString("(?<callsign>[@]?[A-Z0-9/]+)");
|
QString callsign_pattern = QString("(?<callsign>[@]?[A-Z0-9/]+)");
|
||||||
QString optional_cmd_pattern = QString("(?<cmd>\\s?(?:AGN[?]|QSL[?]|HW CPY[?]|APRS[:]|QRZ[?]|SNR[?]|QTC[?]|QTH[?]|GRID[?]|STATUS[?]|(?:(?:QUERY|ACK|73|YES|NO|SNR|QSL|RR|SK|FB|QTH|QTC|GRID|ACTIVE|IDLE|TU)(?=[ ]|$))|[?*^&@#> ]))?");
|
QString optional_cmd_pattern = QString("(?<cmd>\\s?(?:AGN[?]|QSL[?]|HW CPY[?]|APRS[:]|QRZ[?]|SNR[?]|QTC[?]|QTH[?]|GRID[?]|STATUS[?]|HEARING[?]|(?:(?:QUERY|ACK|73|YES|NO|SNR|QSL|RR|SK|FB|QTH|QTC|GRID|ACTIVE|IDLE|TU)(?=[ ]|$))|[?*^&@$#> ]))?");
|
||||||
QString optional_grid_pattern = QString("(?<grid>\\s?[A-R]{2}[0-9]{2})?");
|
QString optional_grid_pattern = QString("(?<grid>\\s?[A-R]{2}[0-9]{2})?");
|
||||||
QString optional_extended_grid_pattern = QString("^(?<grid>\\s?(?:[A-R]{2}[0-9]{2}(?:[A-X]{2}(?:[0-9]{2})?)*))?");
|
QString optional_extended_grid_pattern = QString("^(?<grid>\\s?(?:[A-R]{2}[0-9]{2}(?:[A-X]{2}(?:[0-9]{2})?)*))?");
|
||||||
QString optional_num_pattern = QString("(?<num>(?<=SNR|ACK)\\s?[-+]?(?:3[01]|[0-2]?[0-9]))?");
|
QString optional_num_pattern = QString("(?<num>(?<=SNR|ACK)\\s?[-+]?(?:3[01]|[0-2]?[0-9]))?");
|
||||||
|
Loading…
Reference in New Issue
Block a user