Added methods to grab default huff tables

This commit is contained in:
Jordan Sherer 2018-09-20 10:04:18 -04:00
parent f6edea8753
commit 8b94c01ff6
2 changed files with 14 additions and 4 deletions

View File

@ -103,7 +103,7 @@ QRegularExpression directed_re("^" +
optional_cmd_pattern +
optional_num_pattern);
QRegularExpression beacon_re(R"(^\s*(?<type>CQCQCQ|CQ QRP|CQ DX|CQ TEST|CQ( CQ){0,2}|BEACON)(?:\s(?<grid>[A-R]{2}[0-9]{2}))?\b)");
QRegularExpression beacon_re(R"(^\s*(?<type>CQCQCQ|CQ QRPP?|CQ DX|CQ TEST|CQ( CQ){0,2}|BEACON)(?:\s(?<grid>[A-R]{2}[0-9]{2}))?\b)");
QRegularExpression compound_re("^\\s*[<]" +
callsign_pattern +
@ -350,9 +350,10 @@ QMap<quint32, QString> cqs = {
{ 1, "CQ DX" },
{ 2, "CQ QRP" },
{ 3, "CQ TEST" },
{ 4, "CQ"},
{ 5, "CQ CQ"},
{ 6, "CQ CQ CQ"},
{ 4, "CQ QRPP" },
{ 5, "CQ"},
{ 6, "CQ CQ"},
{ 7, "CQ CQ CQ"},
};
QMap<int, int> dbm2mw = {
@ -437,6 +438,13 @@ int dbmTomwatts(int dbm){
/*
* VARICODE
*/
QMap<QString, QString> Varicode::defaultHuffTable(){
return hufftable;
}
QMap<QString, QString> Varicode::defaultHuffTableEscaped(){
return hufftableescaped;
}
QString Varicode::cqString(int number){
if(!cqs.contains(number)){

View File

@ -56,6 +56,8 @@ public:
//Varicode();
static QMap<QString, QString> defaultHuffTable();
static QMap<QString, QString> defaultHuffTableEscaped();
static QString cqString(int number);
static bool startsWithCQ(QString text);
static QString formatSNR(int snr);