Compare commits
61 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8529ef0982 | |||
| 8bba574963 | |||
| 80d798d7e3 | |||
| 23a554220b | |||
| 7e903349ae | |||
| 55810e63a6 | |||
| 9162d851d4 | |||
| 2022908509 | |||
| 2e2551519d | |||
| 18052773f1 | |||
| 51010e7310 | |||
| a3eaf1cf74 | |||
| c731fa51ce | |||
| a5f59019d3 | |||
| 4a87edc4c7 | |||
| 2da25c3171 | |||
| 87a6e10bd6 | |||
| cf9c74b99e | |||
| dae50d3a99 | |||
| 83268fbdaf | |||
| 3b2242e258 | |||
| c42c3b7ad1 | |||
| 9496d5ed81 | |||
| 83174bc6fa | |||
| d74850b8e1 | |||
| 2f1dca3c49 | |||
| 4a38778808 | |||
| 960b9b14d1 | |||
| 9e93745587 | |||
| 8aa28108ea | |||
| 4168e1937c | |||
| f4b640df75 | |||
| cf1cece11c | |||
| 59893f6dfa | |||
| ead5c225b5 | |||
| 4744952a1a | |||
| a30bff5589 | |||
| e7e2f8357f | |||
| 4ffa82f695 | |||
| 3e38067561 | |||
| 52177a0513 | |||
| f79ca47a93 | |||
| f0e30dc7b0 | |||
| d20fe46447 | |||
| aa2c41f124 | |||
| ad563c0aed | |||
| 60b58fb50f | |||
| ca79a450ca | |||
| 3c8c80a5d7 | |||
| fc43c7fbb4 | |||
| 353d75ac49 | |||
| 2d392dd676 | |||
| 18fac2e4ba | |||
| 5275c0916f | |||
| 676aa3c78e | |||
| 4e8a65b5ee | |||
| 329ca0b23f | |||
| 29cb01697a | |||
| e27e7baec9 | |||
| 9cd17a4441 | |||
| 9d371c474a |
+22
-13
@@ -922,7 +922,7 @@ QString Configuration::my_grid() const
|
||||
if (m_->use_dynamic_info_ && m_->dynamic_grid_.size () >= 4) {
|
||||
grid = m_->dynamic_grid_;
|
||||
}
|
||||
return grid;
|
||||
return grid.trimmed();
|
||||
}
|
||||
|
||||
QString Configuration::my_station() const
|
||||
@@ -931,22 +931,22 @@ QString Configuration::my_station() const
|
||||
if(m_->use_dynamic_info_ && !m_->dynamic_qtc_.isEmpty()){
|
||||
station = m_->dynamic_qtc_;
|
||||
}
|
||||
return station;
|
||||
return station.trimmed();
|
||||
}
|
||||
|
||||
QString Configuration::my_qth() const
|
||||
{
|
||||
return m_->my_qth_;
|
||||
return m_->my_qth_.trimmed();
|
||||
}
|
||||
|
||||
QString Configuration::cq_message() const
|
||||
{
|
||||
return m_->cq_;
|
||||
return m_->cq_.trimmed();
|
||||
}
|
||||
|
||||
QString Configuration::reply_message() const
|
||||
{
|
||||
return m_->reply_;
|
||||
return m_->reply_.trimmed();
|
||||
}
|
||||
|
||||
int Configuration::callsign_aging() const
|
||||
@@ -1650,7 +1650,7 @@ void Configuration::impl::read_settings ()
|
||||
quick_call_ = settings_->value ("QuickCall", false).toBool ();
|
||||
disable_TX_on_73_ = settings_->value ("73TxDisable", false).toBool ();
|
||||
beacon_ = settings_->value ("TxBeacon", 30).toInt ();
|
||||
watchdog_ = settings_->value ("TxWatchdog", 0).toInt ();
|
||||
watchdog_ = settings_->value ("TxIdleWatchdog", 60).toInt ();
|
||||
if(watchdog_){
|
||||
watchdog_ = qMax(5, watchdog_);
|
||||
}
|
||||
@@ -1783,7 +1783,7 @@ void Configuration::impl::write_settings ()
|
||||
settings_->setValue ("QuickCall", quick_call_);
|
||||
settings_->setValue ("73TxDisable", disable_TX_on_73_);
|
||||
settings_->setValue ("TxBeacon", beacon_);
|
||||
settings_->setValue ("TxWatchdog", watchdog_);
|
||||
settings_->setValue ("TxIdleWatchdog", watchdog_);
|
||||
settings_->setValue ("Tx2QSO", TX_messages_);
|
||||
settings_->setValue ("CATForceDTR", rig_params_.force_dtr);
|
||||
settings_->setValue ("DTR", rig_params_.dtr_high);
|
||||
@@ -2338,14 +2338,23 @@ void Configuration::impl::reject ()
|
||||
|
||||
void Configuration::impl::on_font_push_button_clicked ()
|
||||
{
|
||||
next_font_ = QFontDialog::getFont (0, next_font_, this);
|
||||
|
||||
next_font_ = QFontDialog::getFont (0, next_font_, this
|
||||
, tr ("Font Chooser")
|
||||
#if QT_VERSION >= 0x050201
|
||||
, QFontDialog::DontUseNativeDialog
|
||||
#endif
|
||||
);
|
||||
ui_->font_push_button->setText(QString("Application Font (%1 %2)").arg(next_font_.family()).arg(next_font_.pointSize()));
|
||||
}
|
||||
|
||||
void Configuration::impl::on_tableFontButton_clicked ()
|
||||
{
|
||||
next_table_font_ = QFontDialog::getFont (0, next_table_font_, this);
|
||||
next_table_font_ = QFontDialog::getFont (0, next_table_font_, this
|
||||
, tr ("Font Chooser")
|
||||
#if QT_VERSION >= 0x050201
|
||||
, QFontDialog::DontUseNativeDialog
|
||||
#endif
|
||||
);
|
||||
ui_->tableFontButton->setText(QString("Table Font (%1 %2)").arg(next_table_font_.family()).arg(next_table_font_.pointSize()));
|
||||
}
|
||||
|
||||
@@ -2453,7 +2462,7 @@ void Configuration::impl::on_rxFontButton_clicked ()
|
||||
next_rx_text_font_ = QFontDialog::getFont (0, next_rx_text_font_ , this
|
||||
, tr ("Font Chooser")
|
||||
#if QT_VERSION >= 0x050201
|
||||
, 0
|
||||
, QFontDialog::DontUseNativeDialog
|
||||
#endif
|
||||
);
|
||||
ui_->rxFontButton->setText(QString("Font (%1 %2)").arg(next_rx_text_font_.family()).arg(next_rx_text_font_.pointSize()));
|
||||
@@ -2495,7 +2504,7 @@ void Configuration::impl::on_txFontButton_clicked ()
|
||||
next_tx_text_font_ = QFontDialog::getFont (0, next_tx_text_font_ , this
|
||||
, tr ("Font Chooser")
|
||||
#if QT_VERSION >= 0x050201
|
||||
, 0
|
||||
, QFontDialog::DontUseNativeDialog
|
||||
#endif
|
||||
);
|
||||
|
||||
@@ -2507,7 +2516,7 @@ void Configuration::impl::on_composeFontButton_clicked ()
|
||||
next_compose_text_font_ = QFontDialog::getFont (0, next_compose_text_font_ , this
|
||||
, tr ("Font Chooser")
|
||||
#if QT_VERSION >= 0x050201
|
||||
, 0
|
||||
, QFontDialog::DontUseNativeDialog
|
||||
#endif
|
||||
);
|
||||
ui_->composeFontButton->setText(QString("Font (%1 %2)").arg(next_compose_text_font_.family()).arg(next_compose_text_font_.pointSize()));
|
||||
|
||||
+32
-30
@@ -195,7 +195,7 @@
|
||||
<string><html><head/><body><p>Station location message</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>QTH Message:</string>
|
||||
<string>Station Location (QTH) Message:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -212,7 +212,7 @@
|
||||
<string><html><head/><body><p>Station Description Message</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>QTC Message:</string>
|
||||
<string>Station Detail (QTC) Message:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -269,6 +269,19 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="monitor_off_check_box">
|
||||
<property name="toolTip">
|
||||
<string>Don't start decoding until the monitor button is clicked.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Mon&itor (RX) off at startup</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="autoreply_off_check_box">
|
||||
<property name="text">
|
||||
@@ -283,19 +296,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="monitor_off_check_box">
|
||||
<property name="toolTip">
|
||||
<string>Don't start decoding until the monitor button is clicked.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Mon&itor (RX) off at startup</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="monitor_last_used_check_box">
|
||||
<property name="visible">
|
||||
@@ -309,13 +309,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="transmit_directed_check_box">
|
||||
<property name="text">
|
||||
<string>Immediately transmit directed responses from the menu</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="tx_qsy_check_box">
|
||||
<property name="enabled">
|
||||
@@ -349,6 +342,13 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="transmit_directed_check_box">
|
||||
<property name="text">
|
||||
<string>Immediately transmit CQ, Reply, QTC, QTH, Saved, and Directed messages from the menu</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_155">
|
||||
<item>
|
||||
@@ -457,7 +457,7 @@
|
||||
<string/>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>10</number>
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>1440</number>
|
||||
@@ -466,7 +466,7 @@
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>30</number>
|
||||
<number>15</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -498,6 +498,9 @@
|
||||
<property name="prefix">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>1440</number>
|
||||
</property>
|
||||
@@ -505,7 +508,7 @@
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>0</number>
|
||||
<number>60</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -2562,7 +2565,7 @@ QListView::item:hover {
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="sound_am_path_label">
|
||||
<property name="text">
|
||||
<string>Reply Message Received:</string>
|
||||
<string>Reply Dialog Message Received:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>azel_path_select_push_button</cstring>
|
||||
@@ -3479,7 +3482,6 @@ soundcard changes</string>
|
||||
<tabstop>use_dynamic_grid</tabstop>
|
||||
<tabstop>region_combo_box</tabstop>
|
||||
<tabstop>type_2_msg_gen_combo_box</tabstop>
|
||||
<tabstop>monitor_off_check_box</tabstop>
|
||||
<tabstop>monitor_last_used_check_box</tabstop>
|
||||
<tabstop>quick_call_check_box</tabstop>
|
||||
<tabstop>tx_watchdog_spin_box</tabstop>
|
||||
@@ -3615,12 +3617,12 @@ soundcard changes</string>
|
||||
</connection>
|
||||
</connections>
|
||||
<buttongroups>
|
||||
<buttongroup name="CAT_handshake_button_group"/>
|
||||
<buttongroup name="CAT_data_bits_button_group"/>
|
||||
<buttongroup name="split_mode_button_group"/>
|
||||
<buttongroup name="TX_audio_source_button_group"/>
|
||||
<buttongroup name="TX_mode_button_group"/>
|
||||
<buttongroup name="PTT_method_button_group"/>
|
||||
<buttongroup name="CAT_handshake_button_group"/>
|
||||
<buttongroup name="split_mode_button_group"/>
|
||||
<buttongroup name="CAT_stop_bits_button_group"/>
|
||||
<buttongroup name="TX_audio_source_button_group"/>
|
||||
</buttongroups>
|
||||
</ui>
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
# Version number components
|
||||
set (WSJTX_VERSION_MAJOR 0)
|
||||
set (WSJTX_VERSION_MINOR 7)
|
||||
set (WSJTX_VERSION_PATCH 1)
|
||||
set (WSJTX_VERSION_PATCH 5)
|
||||
set (WSJTX_RC 0) # release candidate number, comment out or zero for development versions
|
||||
set (WSJTX_VERSION_IS_RELEASE 0) # set to 1 for final release build
|
||||
|
||||
@@ -197,6 +197,8 @@ bool DecodedText::tryUnpackDirected(){
|
||||
message_ = QString(parts.join(""));
|
||||
}
|
||||
|
||||
message_ = message_.replace("APRS: ", "APRS:");
|
||||
|
||||
directed_ = parts;
|
||||
frameType_ = type;
|
||||
return true;
|
||||
|
||||
@@ -23,6 +23,10 @@
|
||||
|
||||
#include <cmath>
|
||||
|
||||
#include <QDebug>
|
||||
#include <QCache>
|
||||
|
||||
QMap<QString, quint32> LOOKUP_CACHE;
|
||||
|
||||
Codeword JSC::codeword(quint32 index, bool separate, quint32 bytesize, quint32 s, quint32 c){
|
||||
QList<Codeword> out;
|
||||
@@ -52,9 +56,19 @@ QList<CodewordPair> JSC::compress(QString text){
|
||||
const quint32 s = 7;
|
||||
const quint32 c = pow(2, 4) - s;
|
||||
|
||||
foreach(QString w, text.split(" ", QString::SkipEmptyParts)){
|
||||
QString space(" ");
|
||||
|
||||
foreach(QString w, text.split(" ", QString::KeepEmptyParts)){
|
||||
bool ok = false;
|
||||
|
||||
bool isSpaceCharacter = false;
|
||||
|
||||
// if this is an empty part, it should be a space.
|
||||
if(w.isEmpty()){
|
||||
w = space;
|
||||
isSpaceCharacter = true;
|
||||
}
|
||||
|
||||
while(!w.isEmpty()){
|
||||
// this does both prefix and full match lookup
|
||||
auto index = lookup(w, &ok);
|
||||
@@ -63,10 +77,11 @@ QList<CodewordPair> JSC::compress(QString text){
|
||||
}
|
||||
|
||||
auto t = JSC::map[index];
|
||||
w = QString(w.mid(t.size));
|
||||
w = QString(w).mid(t.size);
|
||||
|
||||
bool isLast = w.isEmpty();
|
||||
out.append({ codeword(index, isLast, b, s, c), (quint32)t.size + (isLast ? 1 : 0) /* for the space that follows */});
|
||||
bool shouldAppendSpace = isLast && !isSpaceCharacter;
|
||||
out.append({ codeword(index, shouldAppendSpace, b, s, c), (quint32)t.size + (shouldAppendSpace ? 1 : 0) /* for the space that follows */});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -118,7 +133,9 @@ QString JSC::decompress(Codeword const& bitvec){
|
||||
|
||||
j = j*s + bytes[start + k] + base[k];
|
||||
|
||||
out.append(QString(JSC::map[j].str));
|
||||
auto word = QString(JSC::map[j].str);
|
||||
|
||||
out.append(word);
|
||||
if(!separators.isEmpty() && separators.first() == start + k){
|
||||
out.append(" ");
|
||||
separators.removeFirst();
|
||||
@@ -131,7 +148,19 @@ QString JSC::decompress(Codeword const& bitvec){
|
||||
}
|
||||
|
||||
quint32 JSC::lookup(QString w, bool * ok){
|
||||
return lookup(w.toLatin1().data(), ok);
|
||||
if(LOOKUP_CACHE.contains(w)){
|
||||
if(ok) *ok = true;
|
||||
return LOOKUP_CACHE[w];
|
||||
}
|
||||
|
||||
bool found = false;
|
||||
quint32 result = lookup(w.toLatin1().data(), &found);
|
||||
if(found){
|
||||
LOOKUP_CACHE[w] = result;
|
||||
}
|
||||
|
||||
if(ok) *ok = found;
|
||||
return result;
|
||||
}
|
||||
|
||||
quint32 JSC::lookup(char const* b, bool *ok){
|
||||
@@ -167,11 +196,6 @@ quint32 JSC::lookup(char const* b, bool *ok){
|
||||
|
||||
// now that we have the first index in the list, let's just iterate through the list, comparing words along the way
|
||||
for(quint32 i = index; i < index + count; i++){
|
||||
// if we're no longer a prefix match, end.
|
||||
if(b[0] != JSC::list[i].str[0]){
|
||||
break;
|
||||
}
|
||||
|
||||
quint32 len = JSC::list[i].size;
|
||||
if(strncmp(b, JSC::list[i].str, len) == 0){
|
||||
if(ok) *ok = true;
|
||||
|
||||
@@ -39,8 +39,8 @@ public:
|
||||
static const Tuple map[262144];
|
||||
static const Tuple list[262144];
|
||||
|
||||
static const quint32 prefixSize = 68;
|
||||
static const Tuple prefix[68];
|
||||
static const quint32 prefixSize = 69;
|
||||
static const Tuple prefix[69];
|
||||
};
|
||||
|
||||
#endif // JSC_H
|
||||
|
||||
+8
-7
@@ -29,7 +29,7 @@ const Tuple JSC::list[262144] = {
|
||||
{"_", 1, 48},
|
||||
{"^", 1, 64},
|
||||
{"]", 1, 59},
|
||||
{"\\", 1, 67},
|
||||
{" ", 1, 67},
|
||||
{"[", 1, 58},
|
||||
{"ZZZZ", 4, 91474},
|
||||
{"ZZZ", 3, 70901},
|
||||
@@ -180080,8 +180080,8 @@ const Tuple JSC::list[262144] = {
|
||||
{"FTAD", 4, 112460},
|
||||
{"FTAC", 4, 68872},
|
||||
{"FTAB", 4, 72752},
|
||||
{"FT8CALL", 7, 69},
|
||||
{"FT8", 3, 68},
|
||||
{"\\", 1, 69},
|
||||
{"FT8", 3, 68},
|
||||
{"FSYW", 4, 155790},
|
||||
{"FSYT", 4, 186523},
|
||||
{"FSYS", 4, 69541},
|
||||
@@ -262164,10 +262164,10 @@ const Tuple JSC::list[262144] = {
|
||||
{"$", 1, 51},
|
||||
{"#", 1, 53},
|
||||
{"\"", 1, 26},
|
||||
{"!", 1, 28},
|
||||
{"!", 1, 28},
|
||||
};
|
||||
|
||||
const Tuple JSC::prefix[68] = {
|
||||
const Tuple JSC::prefix[69] = {
|
||||
{"!", 1, 262143},
|
||||
{"\"", 1, 262142},
|
||||
{"#", 1, 262141},
|
||||
@@ -262204,7 +262204,8 @@ const Tuple JSC::prefix[68] = {
|
||||
{"B", 13306, 233869},
|
||||
{"C", 17608, 216261},
|
||||
{"D", 13749, 202512},
|
||||
{"E", 12403, 190109},
|
||||
{"E", 12403, 190109},
|
||||
{"\\", 1, 180059},
|
||||
{"F", 11252, 178857},
|
||||
{"G", 10672, 168185},
|
||||
{"H", 9060, 159125},
|
||||
@@ -262227,7 +262228,7 @@ const Tuple JSC::prefix[68] = {
|
||||
{"Y", 4348, 2264},
|
||||
{"Z", 2254, 10},
|
||||
{"[", 1, 9},
|
||||
{"\\", 1, 8},
|
||||
{" ", 1, 8},
|
||||
{"]", 1, 7},
|
||||
{"^", 1, 6},
|
||||
{"_", 1, 5},
|
||||
|
||||
+3
-3
@@ -88,9 +88,9 @@ const Tuple JSC::map[262144] = {
|
||||
{"^", 1, 64},
|
||||
{"`", 1, 65},
|
||||
{"~", 1, 66},
|
||||
{"\\", 1, 67},
|
||||
{"FT8", 3, 68},
|
||||
{"FT8CALL", 7, 69},
|
||||
{" ", 1, 67},
|
||||
{"FT8", 3, 68},
|
||||
{"\\", 1, 69},
|
||||
{"JS8", 3, 70},
|
||||
{"JS8CALL", 7, 71},
|
||||
{"JSQSO", 5, 72},
|
||||
|
||||
@@ -65,7 +65,7 @@ write(*,*) "niter= ",max_iterations," s= ",s
|
||||
allocate ( codeword(N), decoded(K), message(K) )
|
||||
allocate ( rxdata(N), llr(N) )
|
||||
|
||||
msg="K1JT K9AN EN50"
|
||||
msg="0123456789012"
|
||||
! msg="G4WJS K9AN EN50"
|
||||
call packmsg(msg,i4Msg6BitWords,itype,.false.) !Pack into 12 6-bit bytes
|
||||
call unpackmsg(i4Msg6BitWords,msgsent,.false.,grid) !Unpack to get msgsent
|
||||
|
||||
+322
-1092
File diff suppressed because it is too large
Load Diff
+4
-14
@@ -120,8 +120,6 @@ public slots:
|
||||
void diskDat();
|
||||
void freezeDecode(int n);
|
||||
void guiUpdate();
|
||||
void doubleClickOnCall (Qt::KeyboardModifiers);
|
||||
void doubleClickOnCall2(Qt::KeyboardModifiers);
|
||||
void readFromStdout();
|
||||
void p1ReadFromStdout();
|
||||
void setXIT(int n, Frequency base = 0u);
|
||||
@@ -213,7 +211,6 @@ private slots:
|
||||
void on_EraseButton_clicked();
|
||||
void band_activity_cleared ();
|
||||
void rx_frequency_activity_cleared ();
|
||||
void on_txFirstCheckBox_stateChanged(int arg1);
|
||||
void set_dateTimeQSO(int m_ntx);
|
||||
void set_ntx(int n);
|
||||
void on_txrb1_toggled(bool status);
|
||||
@@ -257,7 +254,6 @@ private slots:
|
||||
void startTx();
|
||||
void startTx2();
|
||||
void startP1();
|
||||
void continueTx();
|
||||
void stopTx();
|
||||
void stopTx2();
|
||||
void on_pbCallCQ_clicked();
|
||||
@@ -299,7 +295,6 @@ private slots:
|
||||
void on_nextFreeTextMsg_currentTextChanged (QString const&);
|
||||
void on_extFreeTextMsgEdit_currentTextChanged (QString const&);
|
||||
int currentFreqOffset();
|
||||
int countMessageFrames(QString const& text);
|
||||
QStringList buildMessageFrames(QString const& text);
|
||||
bool prepareNextMessageFrame();
|
||||
bool isFreqOffsetFree(int f, int bw);
|
||||
@@ -385,8 +380,8 @@ private slots:
|
||||
void on_cbCQTx_toggled(bool b);
|
||||
void splash_done ();
|
||||
void on_measure_check_box_stateChanged (int);
|
||||
void expiry_warning_message ();
|
||||
void not_GA_warning_message ();
|
||||
void checkExpiryWarningMessage ();
|
||||
void checkStartupWarnings ();
|
||||
void clearCallsignSelected();
|
||||
void refreshTextDisplay();
|
||||
|
||||
@@ -417,7 +412,6 @@ private:
|
||||
private:
|
||||
void astroUpdate ();
|
||||
void writeAllTxt(QString message);
|
||||
void auto_sequence (DecodedText const& message, unsigned start_tolerance, unsigned stop_tolerance);
|
||||
void hideMenus(bool b);
|
||||
|
||||
NetworkAccessManager m_network_manager;
|
||||
@@ -539,7 +533,6 @@ private:
|
||||
bool m_diskData;
|
||||
bool m_loopall;
|
||||
bool m_decoderBusy;
|
||||
bool m_txFirst;
|
||||
bool m_auto;
|
||||
bool m_restart;
|
||||
bool m_startAnother;
|
||||
@@ -721,6 +714,7 @@ private:
|
||||
QString text;
|
||||
QDateTime utcTimestamp;
|
||||
int snr;
|
||||
bool shouldDisplay;
|
||||
};
|
||||
|
||||
struct MessageBuffer {
|
||||
@@ -860,8 +854,6 @@ private:
|
||||
void writeSettings();
|
||||
void createStatusBar();
|
||||
void updateStatusBar();
|
||||
void genStdMsgs(QString rpt, bool unconditional = false);
|
||||
void genCQMsg();
|
||||
void clearDX ();
|
||||
void lookup();
|
||||
void ba2msg(QByteArray ba, char* message);
|
||||
@@ -874,19 +866,17 @@ private:
|
||||
void rigFailure (QString const& reason);
|
||||
void pskSetLocal ();
|
||||
void aprsSetLocal ();
|
||||
void pskPost(DecodedText const& decodedtext);
|
||||
void pskLogReport(QString mode, int offset, int snr, QString callsign, QString grid);
|
||||
void aprsLogReport(int offset, int snr, QString callsign, QString grid);
|
||||
Radio::Frequency dialFrequency();
|
||||
void displayDialFrequency ();
|
||||
void transmitDisplay (bool);
|
||||
void processMessage(DecodedText const&, Qt::KeyboardModifiers = 0);
|
||||
void replyToCQ (QTime, qint32 snr, float delta_time, quint32 delta_frequency, QString const& mode, QString const& message_text, bool low_confidence, quint8 modifiers);
|
||||
void locationChange(QString const& location);
|
||||
void replayDecodes ();
|
||||
void postDecode (bool is_new, QString const& message);
|
||||
void displayTransmit();
|
||||
void updateButtonDisplay();
|
||||
void updateTextDisplay();
|
||||
void updateFrameCountEstimate(int count);
|
||||
void updateTextStatsDisplay(QString text, int count);
|
||||
void updateTxButtonDisplay();
|
||||
|
||||
+171
-129
@@ -309,7 +309,7 @@ QPushButton[oob="true"] {
|
||||
<string notr="true">QFrame, QLabel { background-color : black; }</string>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Plain</enum>
|
||||
@@ -948,7 +948,7 @@ background-color: #00ff00;
|
||||
</size>
|
||||
</property>
|
||||
<property name="visible">
|
||||
<bool>false</bool>
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Insert a new entry into the log</p></body></html></string>
|
||||
@@ -969,6 +969,9 @@ min-height:30px;
|
||||
/*max-width:60px;*/
|
||||
max-height:30px;
|
||||
}
|
||||
QPushButton:pressed {
|
||||
background-color: darkgray;
|
||||
}
|
||||
QPushButton[state="error"] {
|
||||
background-color: red;
|
||||
}
|
||||
@@ -1113,6 +1116,51 @@ background-color: #6699ff;
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="4">
|
||||
<widget class="QPushButton" name="stopTxButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>75</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Stop transmitting</p></body></html></string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QPushButton {
|
||||
font-family: helvetica;
|
||||
font-weight: bold;
|
||||
background-color: lightgray;
|
||||
color: black;
|
||||
border-style: solid;
|
||||
border-radius:2px;
|
||||
border-width:0px;
|
||||
border-color: gray;
|
||||
font-size:90%;
|
||||
min-width:75px;
|
||||
min-height:30px;
|
||||
/*max-width:60px;*/
|
||||
max-height:30px;
|
||||
}
|
||||
QPushButton:pressed {
|
||||
background-color: darkgray;
|
||||
}
|
||||
QPushButton[state="error"] {
|
||||
background-color: red;
|
||||
}
|
||||
QPushButton[state="warning"] {
|
||||
background-color: orange;
|
||||
}
|
||||
QPushButton[state="ok"] {
|
||||
background-color: #00ff00;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>HALT</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -1420,7 +1468,39 @@ QTextEdit[transmitting="true"] {
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="1" column="10">
|
||||
<item row="1" column="2">
|
||||
<widget class="QPushButton" name="replyMacroButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Reply to a CQ</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Reply</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="13">
|
||||
<spacer name="horizontalSpacer_5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="11">
|
||||
<widget class="QPushButton" name="queryButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
@@ -1437,7 +1517,58 @@ QTextEdit[transmitting="true"] {
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="12">
|
||||
<spacer name="horizontalSpacer_5">
|
||||
<widget class="QPushButton" name="deselectButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Deselect the current callsign for directed messaging</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Deselect</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="4">
|
||||
<widget class="QPushButton" name="qthMacroButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Send your station location message</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>QTH</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QPushButton" name="cqMacroButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Send a CQ message</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>CQ</string>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="7">
|
||||
<spacer name="horizontalSpacer_8">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
@@ -1452,7 +1583,23 @@ QTextEdit[transmitting="true"] {
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="13">
|
||||
<item row="1" column="5">
|
||||
<widget class="QPushButton" name="qtcMacroButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Send your station message</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>QTC</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="14">
|
||||
<widget class="QPushButton" name="startTxButton">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
@@ -1484,39 +1631,7 @@ color:#555;
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="4">
|
||||
<widget class="QPushButton" name="qthMacroButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Send your station location message</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>QTH</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="14">
|
||||
<widget class="QPushButton" name="stopTxButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Stop transmitting</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Halt</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="8">
|
||||
<item row="1" column="6">
|
||||
<widget class="QPushButton" name="macrosMacroButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
@@ -1532,89 +1647,6 @@ color:#555;
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QPushButton" name="replyMacroButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Reply to a CQ</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Reply</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QPushButton" name="cqMacroButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Send a CQ message</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>CQ</string>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="11">
|
||||
<widget class="QPushButton" name="deselectButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Deselect the current callsign for directed messaging</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Deselect</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="5">
|
||||
<widget class="QPushButton" name="qtcMacroButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Send your station message</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>QTC</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="6">
|
||||
<spacer name="horizontalSpacer_8">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QFrame" name="frame_5">
|
||||
@@ -4593,7 +4625,7 @@ list. The list can be maintained in Settings (F2).</string>
|
||||
</property>
|
||||
<widget class="QMenu" name="menuFile">
|
||||
<property name="title">
|
||||
<string>File</string>
|
||||
<string>&File</string>
|
||||
</property>
|
||||
<addaction name="actionOpen"/>
|
||||
<addaction name="actionOpen_next_in_directory"/>
|
||||
@@ -4638,7 +4670,7 @@ list. The list can be maintained in Settings (F2).</string>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menuSave">
|
||||
<property name="title">
|
||||
<string>Save</string>
|
||||
<string>&Save</string>
|
||||
</property>
|
||||
<addaction name="actionNone"/>
|
||||
<addaction name="actionSave_decoded"/>
|
||||
@@ -4650,18 +4682,16 @@ list. The list can be maintained in Settings (F2).</string>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menuHelp">
|
||||
<property name="title">
|
||||
<string>Help</string>
|
||||
<string>&Help</string>
|
||||
</property>
|
||||
<addaction name="actionRelease_Notes"/>
|
||||
<addaction name="actionOnline_User_Guide"/>
|
||||
<addaction name="actionLocal_User_Guide"/>
|
||||
<addaction name="actionFT8_DXpedition_Mode_User_Guide"/>
|
||||
<addaction name="download_samples_action"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionKeyboard_shortcuts"/>
|
||||
<addaction name="actionSpecial_mouse_commands"/>
|
||||
<addaction name="actionShort_list_of_add_on_prefixes_and_suffixes"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionCopyright_Notice"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionAbout"/>
|
||||
@@ -4692,7 +4722,7 @@ list. The list can be maintained in Settings (F2).</string>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menuConfig">
|
||||
<property name="title">
|
||||
<string>Configurations</string>
|
||||
<string>&Configurations</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menuTools">
|
||||
@@ -4710,7 +4740,7 @@ list. The list can be maintained in Settings (F2).</string>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menuWindow">
|
||||
<property name="title">
|
||||
<string>Window</string>
|
||||
<string>&Window</string>
|
||||
</property>
|
||||
<addaction name="actionShow_Band_Activity"/>
|
||||
<addaction name="actionShow_Band_Activity_Columns"/>
|
||||
@@ -4728,7 +4758,7 @@ list. The list can be maintained in Settings (F2).</string>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menu_Log">
|
||||
<property name="title">
|
||||
<string>Log</string>
|
||||
<string>&Log</string>
|
||||
</property>
|
||||
<addaction name="actionAdd_Log_Entry"/>
|
||||
<addaction name="separator"/>
|
||||
@@ -4873,6 +4903,9 @@ list. The list can be maintained in Settings (F2).</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionKeyboard_shortcuts">
|
||||
<property name="visible">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
@@ -4884,6 +4917,9 @@ list. The list can be maintained in Settings (F2).</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionSpecial_mouse_commands">
|
||||
<property name="visible">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
@@ -5206,6 +5242,9 @@ list. The list can be maintained in Settings (F2).</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="download_samples_action">
|
||||
<property name="visible">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
@@ -5233,6 +5272,9 @@ list. The list can be maintained in Settings (F2).</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionRelease_Notes">
|
||||
<property name="visible">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
|
||||
+34
-28
@@ -46,14 +46,14 @@ QMap<QString, int> directed_cmds = {
|
||||
{"$", 3 }, // query station(s) heard
|
||||
{"^", 4 }, // query grid
|
||||
{">", 5 }, // relay message
|
||||
//{"|", 6 }, // retransmit message
|
||||
{"*", 6 }, // query idle message
|
||||
//{"!", 7 }, // alert message
|
||||
{"#", 8 }, // all or nothing message
|
||||
|
||||
// {"=", 9 }, // unused
|
||||
// {"/", 10 }, // unused
|
||||
|
||||
|
||||
{" ACTIVE", 10 }, // i have been active in the past 10 minutes
|
||||
{" IDLE", 11 }, // i have not been active in the past 10 minutes
|
||||
|
||||
{" BEACON", -1 }, // this is my beacon (unused except for faux processing of beacons as directed commands)
|
||||
{" BEACON ACK", 12 }, // i received your beacon at this snr
|
||||
@@ -81,7 +81,7 @@ QMap<QString, int> directed_cmds = {
|
||||
{" ", 31 }, // send freetext
|
||||
};
|
||||
|
||||
QSet<int> allowed_cmds = {-1, 0, 1, 2, 3, 4, 5, /*6,*/ /*7,*/ 8, /*...*/ 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};
|
||||
|
||||
QSet<int> buffered_cmds = {3, 5, /*6,*/ /*7,*/ 8, 13, 14, 15};
|
||||
|
||||
@@ -96,10 +96,10 @@ QMap<int, int> checksum_cmds = {
|
||||
};
|
||||
|
||||
QString callsign_pattern = QString("(?<callsign>[A-Z0-9/]+)");
|
||||
QString optional_cmd_pattern = QString("(?<cmd>\\s?(?:AGN[?]|ACK|73|YES|NO|SNR|QSL[?]?|RR|HEARING|HW CPY[?]|FB|QTH|QTC|GRID|APRS[:]|BEACON (ACK|REQ)|QRZ[?]|[?@&$%#^> ]))?");
|
||||
QString optional_cmd_pattern = QString("(?<cmd>\\s?(?:BEACON (ACK|REQ)|AGN[?]|QSL[?]|HW CPY[?]|APRS[:]|QRZ[?]|(?:(?:ACK|73|YES|NO|SNR|QSL|RR|HEARING|FB|QTH|QTC|GRID|ACTIVE|IDLE)(?=[ ]|$))|[?@&$%#^>* ]))?");
|
||||
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|HEARING|BEACON ACK)\\s?[-+]?(?:3[01]|[0-2]?[0-9]))?");
|
||||
QString optional_num_pattern = QString("(?<num>(?<=SNR|BEACON ACK)\\s?[-+]?(?:3[01]|[0-2]?[0-9]))?");
|
||||
|
||||
QRegularExpression directed_re("^" +
|
||||
callsign_pattern +
|
||||
@@ -108,13 +108,13 @@ QRegularExpression directed_re("^" +
|
||||
|
||||
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*[<]" +
|
||||
QRegularExpression compound_re("^\\s*[`]" +
|
||||
callsign_pattern +
|
||||
"(?<extra>" +
|
||||
optional_grid_pattern +
|
||||
optional_grid_pattern + // there's a reason this is first (see: buildMessageFrames)
|
||||
optional_cmd_pattern +
|
||||
optional_num_pattern +
|
||||
")[>]");
|
||||
")");
|
||||
|
||||
QMap<QString, QString> hufftable = {
|
||||
// char code weight
|
||||
@@ -333,7 +333,7 @@ QStringList Varicode::parseCallsigns(QString const &input){
|
||||
if(!match.hasMatch()){
|
||||
continue;
|
||||
}
|
||||
QString callsign = match.captured("callsign");
|
||||
QString callsign = match.captured("callsign").trimmed();
|
||||
QRegularExpression m(grid_pattern);
|
||||
if(m.match(callsign).hasMatch()){
|
||||
continue;
|
||||
@@ -1021,6 +1021,7 @@ QString Varicode::packCompoundMessage(QString const &text, int *n){
|
||||
qDebug() << "trying to pack compound message" << text;
|
||||
auto parsedText = compound_re.match(text);
|
||||
if(!parsedText.hasMatch()){
|
||||
qDebug() << "no match for compound message";
|
||||
if(n) *n = 0;
|
||||
return frame;
|
||||
}
|
||||
@@ -1061,6 +1062,8 @@ QString Varicode::packCompoundMessage(QString const &text, int *n){
|
||||
quint8 type = FrameCompound;
|
||||
quint16 extra = nmaxgrid;
|
||||
|
||||
qDebug() << "try pack cmd" << cmd << directed_cmds.contains(cmd) << Varicode::isCommandAllowed(cmd);
|
||||
|
||||
if (!cmd.isEmpty() && directed_cmds.contains(cmd) && Varicode::isCommandAllowed(cmd)){
|
||||
bool packedNum = false;
|
||||
qint8 inum = Varicode::packNum(num, nullptr);
|
||||
@@ -1206,7 +1209,7 @@ QString Varicode::packDirectedMessage(const QString &text, const QString &callsi
|
||||
QString from = callsign;
|
||||
QString to = match.captured("callsign");
|
||||
QString cmd = match.captured("cmd");
|
||||
QString num = match.captured("num").trimmed();
|
||||
QString num = match.captured("num");
|
||||
|
||||
// ensure we have a directed command
|
||||
if(cmd.isEmpty()){
|
||||
@@ -1240,8 +1243,11 @@ QString Varicode::packDirectedMessage(const QString &text, const QString &callsi
|
||||
}
|
||||
|
||||
// packing general number...
|
||||
quint8 inum = Varicode::packNum(num, nullptr);
|
||||
if(pNum) *pNum = num;
|
||||
bool numOK = false;
|
||||
quint8 inum = Varicode::packNum(num.trimmed(), &numOK);
|
||||
if(numOK){
|
||||
if(pNum) *pNum = num;
|
||||
}
|
||||
|
||||
quint32 packed_from = Varicode::packCallsign(from);
|
||||
quint32 packed_to = Varicode::packCallsign(to);
|
||||
@@ -1251,12 +1257,15 @@ QString Varicode::packDirectedMessage(const QString &text, const QString &callsi
|
||||
return frame;
|
||||
}
|
||||
|
||||
QString cmdOut;
|
||||
quint8 packed_cmd = 0;
|
||||
if(directed_cmds.contains(cmd)){
|
||||
packed_cmd = directed_cmds[cmd];
|
||||
cmdOut = cmd;
|
||||
packed_cmd = directed_cmds[cmdOut];
|
||||
}
|
||||
if(directed_cmds.contains(cmd.trimmed())){
|
||||
packed_cmd = directed_cmds[cmd.trimmed()];
|
||||
cmdOut = cmd.trimmed();
|
||||
packed_cmd = directed_cmds[cmdOut];
|
||||
}
|
||||
quint8 packed_flag = FrameDirected;
|
||||
quint8 packed_extra = inum;
|
||||
@@ -1269,7 +1278,7 @@ QString Varicode::packDirectedMessage(const QString &text, const QString &callsi
|
||||
Varicode::intToBits(packed_cmd % 32, 5)
|
||||
);
|
||||
|
||||
if(pCmd) *pCmd = cmd;
|
||||
if(pCmd) *pCmd = cmdOut;
|
||||
if(n) *n = match.captured(0).length();
|
||||
return Varicode::pack72bits(Varicode::bitsToInt(bits), packed_extra % 64);
|
||||
}
|
||||
@@ -1501,17 +1510,18 @@ QStringList Varicode::buildMessageFrames(
|
||||
#if AUTO_PREPEND_DIRECTED
|
||||
// see if we need to prepend the directed call to the line...
|
||||
// if we have a selected call and the text doesn't start with that call...
|
||||
// and if this isn't a raw message (starting with "<")... then...
|
||||
if(!selectedCall.isEmpty() && !line.startsWith(selectedCall) && !line.startsWith("<")){
|
||||
// and if this isn't a raw message (starting with "`")... then...
|
||||
if(!selectedCall.isEmpty() && !line.startsWith(selectedCall) && !line.startsWith("`")){
|
||||
auto calls = Varicode::parseCallsigns(line);
|
||||
|
||||
bool lineStartsWithBaseCall = (
|
||||
line.startsWith("ALLCALL") ||
|
||||
line.startsWith("GROUPCALL") ||
|
||||
line.startsWith("BEACON") ||
|
||||
Varicode::startsWithCQ(line)
|
||||
);
|
||||
|
||||
bool lineStartsWithStandardCall = !calls.isEmpty() && line.startsWith(calls.first());
|
||||
bool lineStartsWithStandardCall = !calls.isEmpty() && line.startsWith(calls.first()) && calls.first().length() > 2;
|
||||
|
||||
if(lineStartsWithBaseCall || lineStartsWithStandardCall){
|
||||
// pass
|
||||
@@ -1550,6 +1560,9 @@ QStringList Varicode::buildMessageFrames(
|
||||
QString dirNum;
|
||||
QString dirFrame = Varicode::packDirectedMessage(line, basecall, &dirTo, &dirCmd, &dirNum, &n);
|
||||
bool dirToCompound = dirTo.contains("/");
|
||||
if(dirToCompound){
|
||||
qDebug() << "directed message to field is compound" << dirTo;
|
||||
}
|
||||
|
||||
int m = 0;
|
||||
QString datFrame = Varicode::packDataMessage(line, &m);
|
||||
@@ -1618,14 +1631,14 @@ QStringList Varicode::buildMessageFrames(
|
||||
bool shouldUseStandardFrame = true;
|
||||
if(compound || dirToCompound){
|
||||
// Cases 1, 2, 3 all send a standard compound frame first...
|
||||
QString deCompoundMessage = QString("<%1 %2>").arg(mycall).arg(mygrid);
|
||||
QString deCompoundMessage = QString("`%1 %2").arg(mycall).arg(mygrid);
|
||||
QString deCompoundFrame = Varicode::packCompoundMessage(deCompoundMessage, nullptr);
|
||||
if(!deCompoundFrame.isEmpty()){
|
||||
frames.append(deCompoundFrame);
|
||||
}
|
||||
|
||||
// Followed, by a standard OR compound directed message...
|
||||
QString dirCompoundMessage = QString("<%1%2%3>").arg(dirTo).arg(dirCmd).arg(dirNum);
|
||||
QString dirCompoundMessage = QString("`%1%2%3").arg(dirTo).arg(dirCmd).arg(dirNum); //.replace(" ", " ");
|
||||
QString dirCompoundFrame = Varicode::packCompoundMessage(dirCompoundMessage, nullptr);
|
||||
if(!dirCompoundFrame.isEmpty()){
|
||||
frames.append(dirCompoundFrame);
|
||||
@@ -1660,13 +1673,6 @@ QStringList Varicode::buildMessageFrames(
|
||||
}
|
||||
qDebug() << "after:" << line;
|
||||
}
|
||||
|
||||
#if 0
|
||||
// APRS:
|
||||
if(dirCmd.trimmed() == "APRS:" && !m_aprsClient->isPasscodeValid()){
|
||||
MessageBox::warning_message(this, tr ("Please enter a valid APRS passcode in the settings to send an APRS packet."));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if(useDat){
|
||||
|
||||
Reference in New Issue
Block a user