From 8b94c01ff6d06fcd0ef22f0ad1bdf787aa48c67f Mon Sep 17 00:00:00 2001 From: Jordan Sherer Date: Thu, 20 Sep 2018 10:04:18 -0400 Subject: [PATCH] Added methods to grab default huff tables --- varicode.cpp | 16 ++++++++++++---- varicode.h | 2 ++ 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/varicode.cpp b/varicode.cpp index cf1c314..537b64a 100644 --- a/varicode.cpp +++ b/varicode.cpp @@ -103,7 +103,7 @@ QRegularExpression directed_re("^" + optional_cmd_pattern + optional_num_pattern); -QRegularExpression beacon_re(R"(^\s*(?CQCQCQ|CQ QRP|CQ DX|CQ TEST|CQ( CQ){0,2}|BEACON)(?:\s(?[A-R]{2}[0-9]{2}))?\b)"); +QRegularExpression beacon_re(R"(^\s*(?CQCQCQ|CQ QRPP?|CQ DX|CQ TEST|CQ( CQ){0,2}|BEACON)(?:\s(?[A-R]{2}[0-9]{2}))?\b)"); QRegularExpression compound_re("^\\s*[<]" + callsign_pattern + @@ -350,9 +350,10 @@ QMap 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 dbm2mw = { @@ -437,6 +438,13 @@ int dbmTomwatts(int dbm){ /* * VARICODE */ +QMap Varicode::defaultHuffTable(){ + return hufftable; +} + +QMap Varicode::defaultHuffTableEscaped(){ + return hufftableescaped; +} QString Varicode::cqString(int number){ if(!cqs.contains(number)){ diff --git a/varicode.h b/varicode.h index e99358c..ffa4605 100644 --- a/varicode.h +++ b/varicode.h @@ -56,6 +56,8 @@ public: //Varicode(); + static QMap defaultHuffTable(); + static QMap defaultHuffTableEscaped(); static QString cqString(int number); static bool startsWithCQ(QString text); static QString formatSNR(int snr);