Added NACK command for future implementation
This commit is contained in:
parent
07f1594d0a
commit
a5f8593b3d
@ -10289,6 +10289,14 @@ void MainWindow::processCommandActivity() {
|
||||
continue;
|
||||
}
|
||||
|
||||
// PROCESS NACKS
|
||||
else if (d.cmd == " NACK" && !isAllCall){
|
||||
qDebug() << "skipping incoming nack" << d.text;
|
||||
|
||||
// make sure this is explicit
|
||||
continue;
|
||||
}
|
||||
|
||||
// PROCESS BUFFERED CMD
|
||||
else if (d.cmd == " CMD" && !isAllCall){
|
||||
qDebug() << "skipping incoming command" << d.text;
|
||||
|
13
varicode.cpp
13
varicode.cpp
@ -51,7 +51,8 @@ QMap<QString, int> directed_cmds = {
|
||||
{"?", 0 }, // compat
|
||||
|
||||
//{" ", 1 }, // unused
|
||||
//{" ", 2 }, // unused
|
||||
|
||||
{" NACK", 2 }, // negative acknowledge
|
||||
|
||||
{" HEARING?", 3 }, // query station calls heard
|
||||
|
||||
@ -104,7 +105,7 @@ QMap<QString, int> directed_cmds = {
|
||||
};
|
||||
|
||||
// commands allowed to be processed
|
||||
QSet<int> allowed_cmds = {-1, 0, /*1,*/ /*2,*/ 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31};
|
||||
QSet<int> allowed_cmds = {-1, 0, /*1,*/ 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31};
|
||||
|
||||
// commands that result in an autoreply (which can be relayed)
|
||||
QSet<int> autoreply_cmds = {0, 3, 4, 6, 9, 10, 11, 12, 13, 16, 30};
|
||||
@ -129,10 +130,10 @@ QMap<int, int> checksum_cmds = {
|
||||
};
|
||||
|
||||
QString callsign_pattern = QString("(?<callsign>[@]?[A-Z0-9/]+)");
|
||||
QString optional_cmd_pattern = QString("(?<cmd>\\s?(?:AGN[?]|QSL[?]|HW CPY[?]|APRS[:]|MSG TO[:]|SNR[?]|INFO[?]|GRID[?]|STATUS[?]|QUERY MSGS[?]|HEARING[?]|(?:(?:STATUS|HEARING|QUERY CALL|QUERY MSGS|QUERY|CMD|MSG|ACK|73|YES|NO|SNR|QSL|RR|SK|FB|INFO|GRID)(?=[ ]|$))|[?> ]))?");
|
||||
QString optional_cmd_pattern = QString("(?<cmd>\\s?(?:AGN[?]|QSL[?]|HW CPY[?]|APRS[:]|MSG TO[:]|SNR[?]|INFO[?]|GRID[?]|STATUS[?]|QUERY MSGS[?]|HEARING[?]|(?:(?:STATUS|HEARING|QUERY CALL|QUERY MSGS|QUERY|CMD|MSG|NACK|ACK|73|YES|NO|SNR|QSL|RR|SK|FB|INFO|GRID)(?=[ ]|$))|[?> ]))?");
|
||||
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_num_pattern = QString("(?<num>(?<=SNR|ACK)\\s?[-+]?(?:3[01]|[0-2]?[0-9]))?");
|
||||
QString optional_num_pattern = QString("(?<num>(?<=SNR|\\bACK)\\s?[-+]?(?:3[01]|[0-2]?[0-9]))?");
|
||||
|
||||
QRegularExpression directed_re("^" +
|
||||
callsign_pattern +
|
||||
@ -1545,8 +1546,8 @@ QStringList Varicode::unpackDirectedMessage(const QString &text, quint8 *pType){
|
||||
quint32 packed_to = Varicode::bitsToInt(bits.mid(31, 28));
|
||||
quint8 packed_cmd = Varicode::bitsToInt(bits.mid(59, 5));
|
||||
|
||||
bool portable_from = (extra >> 7) & 1 == 1;
|
||||
bool portable_to = (extra >> 6) & 1 == 1;
|
||||
bool portable_from = ((extra >> 7) & 1) == 1;
|
||||
bool portable_to = ((extra >> 6) & 1) == 1;
|
||||
extra = extra % 64;
|
||||
|
||||
QString from = Varicode::unpackCallsign(packed_from, portable_from);
|
||||
|
Loading…
Reference in New Issue
Block a user