Compare commits
76 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4df65585a3 | |||
| f406553a5f | |||
| ecf14dcb5c | |||
| 5163a4a630 | |||
| 4af1a14961 | |||
| 842896d867 | |||
| 4406e99670 | |||
| 79785dbef5 | |||
| 1d1bc254a4 | |||
| 4ddccd99a1 | |||
| dd6f50a5a3 | |||
| 55c365b834 | |||
| b55f8ba5c5 | |||
| fd77e5440f | |||
| 19cb0b859d | |||
| 3d3be02830 | |||
| 55f04d3cd7 | |||
| 693eec8b4b | |||
| 9244ac08c6 | |||
| 8004c51ed2 | |||
| 52b67a5609 | |||
| 3e7c64e994 | |||
| d9d3e6fba3 | |||
| 09cea086c7 | |||
| a013e79eff | |||
| a3e004375e | |||
| f018a622ce | |||
| 565c031b28 | |||
| d88d8aa440 | |||
| 3a59599253 | |||
| 22e4b0891e | |||
| 8c564b6637 | |||
| 97763ed82d | |||
| a7849c5b72 | |||
| 04394273dd | |||
| 1052dd3f9f | |||
| 78ed799a8b | |||
| c0d08f87b6 | |||
| f92b3db5ea | |||
| cebed44ccd | |||
| d47d88681b | |||
| 1be0ee4f4f | |||
| 43d8986e0a | |||
| fd69dce0ae | |||
| b2fb3f31ac | |||
| db704858e2 | |||
| 1d11f0f8ba | |||
| b6bc50a8e1 | |||
| 5addf8f61f | |||
| 367966f5e6 | |||
| caaaa957b6 | |||
| c440d4c143 | |||
| 740c0b4c04 | |||
| f5ce9f0e30 | |||
| 0a6ec136f9 | |||
| d5e1f2822d | |||
| 3fffb45338 | |||
| 1d255b1ebf | |||
| bb97799bdf | |||
| cc6a719f6d | |||
| ccd380356a | |||
| 9f8583c8e2 | |||
| c9016d7378 | |||
| cd683f9bf7 | |||
| 6d7b187269 | |||
| 13308a38f8 | |||
| 804605e9e6 | |||
| 4e981da9c8 | |||
| 6436e163bd | |||
| 379a0fa78f | |||
| 1c4a2ab7d8 | |||
| 54f6bdb0af | |||
| 5a0e2a8b14 | |||
| 1a9c611195 | |||
| c70661461e | |||
| 1f866e14f1 |
+71
-10
@@ -463,6 +463,9 @@ private:
|
|||||||
void delete_selected_macros (QModelIndexList);
|
void delete_selected_macros (QModelIndexList);
|
||||||
Q_SLOT void on_save_path_select_push_button_clicked (bool);
|
Q_SLOT void on_save_path_select_push_button_clicked (bool);
|
||||||
Q_SLOT void on_azel_path_select_push_button_clicked (bool);
|
Q_SLOT void on_azel_path_select_push_button_clicked (bool);
|
||||||
|
Q_SLOT void on_sound_cq_path_select_push_button_clicked();
|
||||||
|
Q_SLOT void on_sound_cq_path_test_push_button_clicked();
|
||||||
|
Q_SLOT void on_sound_cq_path_reset_push_button_clicked();
|
||||||
Q_SLOT void on_sound_dm_path_select_push_button_clicked();
|
Q_SLOT void on_sound_dm_path_select_push_button_clicked();
|
||||||
Q_SLOT void on_sound_dm_path_test_push_button_clicked();
|
Q_SLOT void on_sound_dm_path_test_push_button_clicked();
|
||||||
Q_SLOT void on_sound_dm_path_reset_push_button_clicked();
|
Q_SLOT void on_sound_dm_path_reset_push_button_clicked();
|
||||||
@@ -517,6 +520,7 @@ private:
|
|||||||
QDir default_azel_directory_;
|
QDir default_azel_directory_;
|
||||||
QDir azel_directory_;
|
QDir azel_directory_;
|
||||||
|
|
||||||
|
QString sound_cq_path_; // cq message sound file
|
||||||
QString sound_dm_path_; // directed message sound file
|
QString sound_dm_path_; // directed message sound file
|
||||||
QString sound_am_path_; // alert message sound file
|
QString sound_am_path_; // alert message sound file
|
||||||
|
|
||||||
@@ -638,7 +642,7 @@ private:
|
|||||||
bool insert_blank_;
|
bool insert_blank_;
|
||||||
bool DXCC_;
|
bool DXCC_;
|
||||||
bool ppfx_;
|
bool ppfx_;
|
||||||
bool clear_DX_;
|
bool clear_callsign_;
|
||||||
bool miles_;
|
bool miles_;
|
||||||
bool quick_call_;
|
bool quick_call_;
|
||||||
bool disable_TX_on_73_;
|
bool disable_TX_on_73_;
|
||||||
@@ -769,7 +773,7 @@ bool Configuration::prompt_to_log () const {return m_->prompt_to_log_;}
|
|||||||
bool Configuration::insert_blank () const {return m_->insert_blank_;}
|
bool Configuration::insert_blank () const {return m_->insert_blank_;}
|
||||||
bool Configuration::DXCC () const {return m_->DXCC_;}
|
bool Configuration::DXCC () const {return m_->DXCC_;}
|
||||||
bool Configuration::ppfx() const {return m_->ppfx_;}
|
bool Configuration::ppfx() const {return m_->ppfx_;}
|
||||||
bool Configuration::clear_DX () const {return m_->clear_DX_;}
|
bool Configuration::clear_callsign () const {return m_->clear_callsign_;}
|
||||||
bool Configuration::miles () const {return m_->miles_;}
|
bool Configuration::miles () const {return m_->miles_;}
|
||||||
bool Configuration::quick_call () const {return m_->quick_call_;}
|
bool Configuration::quick_call () const {return m_->quick_call_;}
|
||||||
bool Configuration::disable_TX_on_73 () const {return m_->disable_TX_on_73_;}
|
bool Configuration::disable_TX_on_73 () const {return m_->disable_TX_on_73_;}
|
||||||
@@ -810,6 +814,7 @@ QStringListModel * Configuration::macros () {return &m_->macros_;}
|
|||||||
QStringListModel const * Configuration::macros () const {return &m_->macros_;}
|
QStringListModel const * Configuration::macros () const {return &m_->macros_;}
|
||||||
QDir Configuration::save_directory () const {return m_->save_directory_;}
|
QDir Configuration::save_directory () const {return m_->save_directory_;}
|
||||||
QDir Configuration::azel_directory () const {return m_->azel_directory_;}
|
QDir Configuration::azel_directory () const {return m_->azel_directory_;}
|
||||||
|
QString Configuration::sound_cq_path() const {return m_->sound_cq_path_;}
|
||||||
QString Configuration::sound_dm_path() const {return m_->sound_dm_path_;}
|
QString Configuration::sound_dm_path() const {return m_->sound_dm_path_;}
|
||||||
QString Configuration::sound_am_path() const {return m_->sound_am_path_;}
|
QString Configuration::sound_am_path() const {return m_->sound_am_path_;}
|
||||||
QString Configuration::rig_name () const {return m_->rig_params_.rig_name;}
|
QString Configuration::rig_name () const {return m_->rig_params_.rig_name;}
|
||||||
@@ -940,6 +945,20 @@ QSet<QString> Configuration::my_groups() const {
|
|||||||
return QSet<QString>::fromList(m_->my_groups_);
|
return QSet<QString>::fromList(m_->my_groups_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Configuration::addGroup(QString const &group){
|
||||||
|
QSet<QString> groups = my_groups();
|
||||||
|
groups.insert(group.trimmed());
|
||||||
|
m_->my_groups_ = groups.toList();
|
||||||
|
m_->write_settings();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Configuration::removeGroup(QString const &group){
|
||||||
|
QSet<QString> groups = my_groups();
|
||||||
|
groups.remove(group.trimmed());
|
||||||
|
m_->my_groups_ = groups.toList();
|
||||||
|
m_->write_settings();
|
||||||
|
}
|
||||||
|
|
||||||
QString Configuration::my_qth() const
|
QString Configuration::my_qth() const
|
||||||
{
|
{
|
||||||
return m_->my_qth_.trimmed();
|
return m_->my_qth_.trimmed();
|
||||||
@@ -1042,6 +1061,7 @@ Configuration::impl::impl (Configuration * self, QDir const& temp_directory,
|
|||||||
, default_audio_output_device_selected_ {false}
|
, default_audio_output_device_selected_ {false}
|
||||||
{
|
{
|
||||||
ui_->setupUi (this);
|
ui_->setupUi (this);
|
||||||
|
|
||||||
// ui_->groupBox_6->setVisible(false); //### Temporary ??? ###
|
// ui_->groupBox_6->setVisible(false); //### Temporary ??? ###
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -1331,6 +1351,7 @@ void Configuration::impl::initialize_models ()
|
|||||||
ui_->PTT_method_button_group->button (rig_params_.ptt_type)->setChecked (true);
|
ui_->PTT_method_button_group->button (rig_params_.ptt_type)->setChecked (true);
|
||||||
ui_->save_path_display_label->setText (save_directory_.absolutePath ());
|
ui_->save_path_display_label->setText (save_directory_.absolutePath ());
|
||||||
ui_->azel_path_display_label->setText (azel_directory_.absolutePath ());
|
ui_->azel_path_display_label->setText (azel_directory_.absolutePath ());
|
||||||
|
ui_->sound_cq_path_display_label->setText(sound_cq_path_);
|
||||||
ui_->sound_dm_path_display_label->setText(sound_dm_path_);
|
ui_->sound_dm_path_display_label->setText(sound_dm_path_);
|
||||||
ui_->sound_am_path_display_label->setText(sound_am_path_);
|
ui_->sound_am_path_display_label->setText(sound_am_path_);
|
||||||
ui_->CW_id_after_73_check_box->setChecked (id_after_73_);
|
ui_->CW_id_after_73_check_box->setChecked (id_after_73_);
|
||||||
@@ -1346,7 +1367,7 @@ void Configuration::impl::initialize_models ()
|
|||||||
ui_->stations_table_view->setEnabled(ui_->auto_switch_bands_check_box->isChecked());
|
ui_->stations_table_view->setEnabled(ui_->auto_switch_bands_check_box->isChecked());
|
||||||
ui_->report_in_comments_check_box->setChecked (report_in_comments_);
|
ui_->report_in_comments_check_box->setChecked (report_in_comments_);
|
||||||
ui_->prompt_to_log_check_box->setChecked (prompt_to_log_);
|
ui_->prompt_to_log_check_box->setChecked (prompt_to_log_);
|
||||||
ui_->clear_DX_check_box->setChecked (clear_DX_);
|
ui_->clear_callsign_check_box->setChecked (clear_callsign_);
|
||||||
ui_->miles_check_box->setChecked (miles_);
|
ui_->miles_check_box->setChecked (miles_);
|
||||||
ui_->quick_call_check_box->setChecked (quick_call_);
|
ui_->quick_call_check_box->setChecked (quick_call_);
|
||||||
ui_->disable_TX_on_73_check_box->setChecked (disable_TX_on_73_);
|
ui_->disable_TX_on_73_check_box->setChecked (disable_TX_on_73_);
|
||||||
@@ -1430,7 +1451,7 @@ void Configuration::impl::done (int r)
|
|||||||
{
|
{
|
||||||
// do this here since window is still on screen at this point
|
// do this here since window is still on screen at this point
|
||||||
SettingsGroup g {settings_, "Configuration"};
|
SettingsGroup g {settings_, "Configuration"};
|
||||||
settings_->setValue ("window/geometry", saveGeometry ());
|
settings_->setValue ("WindowGeometry", saveGeometry ());
|
||||||
|
|
||||||
QDialog::done (r);
|
QDialog::done (r);
|
||||||
}
|
}
|
||||||
@@ -1438,7 +1459,9 @@ void Configuration::impl::done (int r)
|
|||||||
void Configuration::impl::read_settings ()
|
void Configuration::impl::read_settings ()
|
||||||
{
|
{
|
||||||
SettingsGroup g {settings_, "Configuration"};
|
SettingsGroup g {settings_, "Configuration"};
|
||||||
restoreGeometry (settings_->value ("window/geometry").toByteArray ());
|
setMinimumSize(800, 400);
|
||||||
|
restoreGeometry (settings_->value ("WindowGeometry").toByteArray ());
|
||||||
|
setMinimumSize(800, 400);
|
||||||
|
|
||||||
auto_switch_bands_ = settings_->value("AutoSwitchBands", false).toBool();
|
auto_switch_bands_ = settings_->value("AutoSwitchBands", false).toBool();
|
||||||
my_callsign_ = settings_->value ("MyCall", QString {}).toString ();
|
my_callsign_ = settings_->value ("MyCall", QString {}).toString ();
|
||||||
@@ -1533,6 +1556,7 @@ void Configuration::impl::read_settings ()
|
|||||||
RxBandwidth_ = settings_->value ("RxBandwidth", 2500).toInt ();
|
RxBandwidth_ = settings_->value ("RxBandwidth", 2500).toInt ();
|
||||||
save_directory_ = settings_->value ("SaveDir", default_save_directory_.absolutePath ()).toString ();
|
save_directory_ = settings_->value ("SaveDir", default_save_directory_.absolutePath ()).toString ();
|
||||||
azel_directory_ = settings_->value ("AzElDir", default_azel_directory_.absolutePath ()).toString ();
|
azel_directory_ = settings_->value ("AzElDir", default_azel_directory_.absolutePath ()).toString ();
|
||||||
|
sound_cq_path_ = settings_->value ("SoundCQPath", "").toString ();
|
||||||
sound_dm_path_ = settings_->value ("SoundDMPath", "").toString ();
|
sound_dm_path_ = settings_->value ("SoundDMPath", "").toString ();
|
||||||
sound_am_path_ = settings_->value ("SoundAMPath", "").toString ();
|
sound_am_path_ = settings_->value ("SoundAMPath", "").toString ();
|
||||||
|
|
||||||
@@ -1653,7 +1677,7 @@ void Configuration::impl::read_settings ()
|
|||||||
insert_blank_ = settings_->value ("InsertBlank", false).toBool ();
|
insert_blank_ = settings_->value ("InsertBlank", false).toBool ();
|
||||||
DXCC_ = settings_->value ("DXCCEntity", false).toBool ();
|
DXCC_ = settings_->value ("DXCCEntity", false).toBool ();
|
||||||
ppfx_ = settings_->value ("PrincipalPrefix", false).toBool ();
|
ppfx_ = settings_->value ("PrincipalPrefix", false).toBool ();
|
||||||
clear_DX_ = settings_->value ("ClearCallGrid", false).toBool ();
|
clear_callsign_ = settings_->value ("ClearCallGrid", false).toBool ();
|
||||||
miles_ = settings_->value ("Miles", false).toBool ();
|
miles_ = settings_->value ("Miles", false).toBool ();
|
||||||
quick_call_ = settings_->value ("QuickCall", false).toBool ();
|
quick_call_ = settings_->value ("QuickCall", false).toBool ();
|
||||||
disable_TX_on_73_ = settings_->value ("73TxDisable", false).toBool ();
|
disable_TX_on_73_ = settings_->value ("73TxDisable", false).toBool ();
|
||||||
@@ -1736,6 +1760,7 @@ void Configuration::impl::write_settings ()
|
|||||||
settings_->setValue ("PTTport", rig_params_.ptt_port);
|
settings_->setValue ("PTTport", rig_params_.ptt_port);
|
||||||
settings_->setValue ("SaveDir", save_directory_.absolutePath ());
|
settings_->setValue ("SaveDir", save_directory_.absolutePath ());
|
||||||
settings_->setValue ("AzElDir", azel_directory_.absolutePath ());
|
settings_->setValue ("AzElDir", azel_directory_.absolutePath ());
|
||||||
|
settings_->setValue ("SoundCQPath", sound_cq_path_);
|
||||||
settings_->setValue ("SoundDMPath", sound_dm_path_);
|
settings_->setValue ("SoundDMPath", sound_dm_path_);
|
||||||
settings_->setValue ("SoundAMPath", sound_am_path_);
|
settings_->setValue ("SoundAMPath", sound_am_path_);
|
||||||
|
|
||||||
@@ -1787,7 +1812,7 @@ void Configuration::impl::write_settings ()
|
|||||||
settings_->setValue ("InsertBlank", insert_blank_);
|
settings_->setValue ("InsertBlank", insert_blank_);
|
||||||
settings_->setValue ("DXCCEntity", DXCC_);
|
settings_->setValue ("DXCCEntity", DXCC_);
|
||||||
settings_->setValue ("PrincipalPrefix", ppfx_);
|
settings_->setValue ("PrincipalPrefix", ppfx_);
|
||||||
settings_->setValue ("ClearCallGrid", clear_DX_);
|
settings_->setValue ("ClearCallGrid", clear_callsign_);
|
||||||
settings_->setValue ("Miles", miles_);
|
settings_->setValue ("Miles", miles_);
|
||||||
settings_->setValue ("QuickCall", quick_call_);
|
settings_->setValue ("QuickCall", quick_call_);
|
||||||
settings_->setValue ("73TxDisable", disable_TX_on_73_);
|
settings_->setValue ("73TxDisable", disable_TX_on_73_);
|
||||||
@@ -1880,7 +1905,8 @@ void Configuration::impl::set_rig_invariants ()
|
|||||||
// makes no sense with rig as "None"
|
// makes no sense with rig as "None"
|
||||||
ui_->monitor_last_used_check_box->setEnabled (false);
|
ui_->monitor_last_used_check_box->setEnabled (false);
|
||||||
|
|
||||||
ui_->CAT_control_group_box->setEnabled (false);
|
ui_->catTab->setEnabled(false);
|
||||||
|
//ui_->CAT_control_group_box->setEnabled (false);
|
||||||
ui_->test_CAT_push_button->setEnabled (false);
|
ui_->test_CAT_push_button->setEnabled (false);
|
||||||
ui_->test_PTT_push_button->setEnabled (TransceiverFactory::PTT_method_DTR == ptt_method
|
ui_->test_PTT_push_button->setEnabled (TransceiverFactory::PTT_method_DTR == ptt_method
|
||||||
|| TransceiverFactory::PTT_method_RTS == ptt_method);
|
|| TransceiverFactory::PTT_method_RTS == ptt_method);
|
||||||
@@ -1889,7 +1915,8 @@ void Configuration::impl::set_rig_invariants ()
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
ui_->monitor_last_used_check_box->setEnabled (true);
|
ui_->monitor_last_used_check_box->setEnabled (true);
|
||||||
ui_->CAT_control_group_box->setEnabled (true);
|
ui_->catTab->setEnabled(true);
|
||||||
|
//ui_->CAT_control_group_box->setEnabled (true);
|
||||||
ui_->test_CAT_push_button->setEnabled (true);
|
ui_->test_CAT_push_button->setEnabled (true);
|
||||||
ui_->test_PTT_push_button->setEnabled (false);
|
ui_->test_PTT_push_button->setEnabled (false);
|
||||||
ui_->TX_audio_source_group_box->setEnabled (transceiver_factory_.has_CAT_PTT_mic_data (rig) && TransceiverFactory::PTT_method_CAT == ptt_method);
|
ui_->TX_audio_source_group_box->setEnabled (transceiver_factory_.has_CAT_PTT_mic_data (rig) && TransceiverFactory::PTT_method_CAT == ptt_method);
|
||||||
@@ -1940,7 +1967,9 @@ void Configuration::impl::set_rig_invariants ()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ui_->CAT_serial_port_parameters_group_box->setEnabled (is_serial_CAT);
|
ui_->CAT_serial_port_parameters_group_box->setEnabled (is_serial_CAT);
|
||||||
|
|
||||||
ui_->force_DTR_combo_box->setEnabled (is_serial_CAT
|
ui_->force_DTR_combo_box->setEnabled (is_serial_CAT
|
||||||
&& (cat_port != ptt_port
|
&& (cat_port != ptt_port
|
||||||
|| !ui_->PTT_DTR_radio_button->isEnabled ()
|
|| !ui_->PTT_DTR_radio_button->isEnabled ()
|
||||||
@@ -2268,7 +2297,7 @@ void Configuration::impl::accept ()
|
|||||||
log_as_DATA_ = ui_->log_as_RTTY_check_box->isChecked ();
|
log_as_DATA_ = ui_->log_as_RTTY_check_box->isChecked ();
|
||||||
report_in_comments_ = ui_->report_in_comments_check_box->isChecked ();
|
report_in_comments_ = ui_->report_in_comments_check_box->isChecked ();
|
||||||
prompt_to_log_ = ui_->prompt_to_log_check_box->isChecked ();
|
prompt_to_log_ = ui_->prompt_to_log_check_box->isChecked ();
|
||||||
clear_DX_ = ui_->clear_DX_check_box->isChecked ();
|
clear_callsign_ = ui_->clear_callsign_check_box->isChecked ();
|
||||||
miles_ = ui_->miles_check_box->isChecked ();
|
miles_ = ui_->miles_check_box->isChecked ();
|
||||||
quick_call_ = ui_->quick_call_check_box->isChecked ();
|
quick_call_ = ui_->quick_call_check_box->isChecked ();
|
||||||
disable_TX_on_73_ = ui_->disable_TX_on_73_check_box->isChecked ();
|
disable_TX_on_73_ = ui_->disable_TX_on_73_check_box->isChecked ();
|
||||||
@@ -2277,6 +2306,7 @@ void Configuration::impl::accept ()
|
|||||||
data_mode_ = static_cast<DataMode> (ui_->TX_mode_button_group->checkedId ());
|
data_mode_ = static_cast<DataMode> (ui_->TX_mode_button_group->checkedId ());
|
||||||
save_directory_ = ui_->save_path_display_label->text ();
|
save_directory_ = ui_->save_path_display_label->text ();
|
||||||
azel_directory_ = ui_->azel_path_display_label->text ();
|
azel_directory_ = ui_->azel_path_display_label->text ();
|
||||||
|
sound_cq_path_ = ui_->sound_cq_path_display_label->text();
|
||||||
sound_dm_path_ = ui_->sound_dm_path_display_label->text();
|
sound_dm_path_ = ui_->sound_dm_path_display_label->text();
|
||||||
sound_am_path_ = ui_->sound_am_path_display_label->text();
|
sound_am_path_ = ui_->sound_am_path_display_label->text();
|
||||||
enable_VHF_features_ = ui_->enable_VHF_features_check_box->isChecked ();
|
enable_VHF_features_ = ui_->enable_VHF_features_check_box->isChecked ();
|
||||||
@@ -2945,6 +2975,37 @@ void Configuration::impl::on_azel_path_select_push_button_clicked (bool /* check
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Configuration::impl::on_sound_cq_path_select_push_button_clicked(){
|
||||||
|
QStringList filters;
|
||||||
|
filters << "Audio files (*.wav)"
|
||||||
|
<< "Any files (*)";
|
||||||
|
|
||||||
|
QFileDialog fd {this, tr ("Sound File"), ui_->sound_cq_path_display_label->text ()};
|
||||||
|
fd.setNameFilters(filters);
|
||||||
|
|
||||||
|
if (fd.exec ()) {
|
||||||
|
if (fd.selectedFiles ().size ()) {
|
||||||
|
if(rig_params_.ptt_type == TransceiverFactory::PTT_method_VOX){
|
||||||
|
QMessageBox::warning(this, "Notifications Sounds Warning", "You have enabled notification sounds while using VOX. To avoid transmitting these notification sounds, please make sure your rig is using a different sound card than your system.");
|
||||||
|
}
|
||||||
|
ui_->sound_cq_path_display_label->setText(fd.selectedFiles().at(0));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Configuration::impl::on_sound_cq_path_test_push_button_clicked(){
|
||||||
|
auto path = ui_->sound_cq_path_display_label->text();
|
||||||
|
if(path.isEmpty()){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
QSound::play(path);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Configuration::impl::on_sound_cq_path_reset_push_button_clicked(){
|
||||||
|
ui_->sound_cq_path_display_label->clear();
|
||||||
|
}
|
||||||
|
|
||||||
void Configuration::impl::on_sound_dm_path_select_push_button_clicked(){
|
void Configuration::impl::on_sound_dm_path_select_push_button_clicked(){
|
||||||
QStringList filters;
|
QStringList filters;
|
||||||
filters << "Audio files (*.wav)"
|
filters << "Audio files (*.wav)"
|
||||||
|
|||||||
+4
-1
@@ -99,6 +99,8 @@ public:
|
|||||||
QString my_grid () const;
|
QString my_grid () const;
|
||||||
QString my_station () const;
|
QString my_station () const;
|
||||||
QSet<QString> my_groups() const;
|
QSet<QString> my_groups() const;
|
||||||
|
void addGroup(QString const &group);
|
||||||
|
void removeGroup(QString const &group);
|
||||||
int activity_aging() const;
|
int activity_aging() const;
|
||||||
int callsign_aging() const;
|
int callsign_aging() const;
|
||||||
QString my_qth () const;
|
QString my_qth () const;
|
||||||
@@ -131,7 +133,7 @@ public:
|
|||||||
bool insert_blank () const;
|
bool insert_blank () const;
|
||||||
bool DXCC () const;
|
bool DXCC () const;
|
||||||
bool ppfx() const;
|
bool ppfx() const;
|
||||||
bool clear_DX () const;
|
bool clear_callsign () const;
|
||||||
bool miles () const;
|
bool miles () const;
|
||||||
bool quick_call () const;
|
bool quick_call () const;
|
||||||
bool disable_TX_on_73 () const;
|
bool disable_TX_on_73 () const;
|
||||||
@@ -180,6 +182,7 @@ public:
|
|||||||
QStringListModel const * macros () const;
|
QStringListModel const * macros () const;
|
||||||
QDir save_directory () const;
|
QDir save_directory () const;
|
||||||
QDir azel_directory () const;
|
QDir azel_directory () const;
|
||||||
|
QString sound_cq_path() const;
|
||||||
QString sound_dm_path() const;
|
QString sound_dm_path() const;
|
||||||
QString sound_am_path() const;
|
QString sound_am_path() const;
|
||||||
QString rig_name () const;
|
QString rig_name () const;
|
||||||
|
|||||||
+3248
-2849
File diff suppressed because it is too large
Load Diff
+8
-1
@@ -50,6 +50,13 @@ require this so normally you can choose not to install libusb-1.0-dev
|
|||||||
but if you have a SoftRock USB or similar SDR that uses a custom USB
|
but if you have a SoftRock USB or similar SDR that uses a custom USB
|
||||||
interface then it is required.
|
interface then it is required.
|
||||||
|
|
||||||
|
On Debian based systems, install requirements like:
|
||||||
|
|
||||||
|
sudo apt install git cmake clang gfortran \
|
||||||
|
libfftw3-dev git libgfortran3 libusb-1.0-dev autoconf libtool \
|
||||||
|
texinfo qt5-default qtmultimedia5-dev libqt5multimedia5-plugins libqt5serialport5-dev \
|
||||||
|
libudev-dev pkg-config
|
||||||
|
|
||||||
The Hamlib library is required. Currently WSJT-X needs to be built
|
The Hamlib library is required. Currently WSJT-X needs to be built
|
||||||
using a forked version of the Hamlib git master. This fork contains
|
using a forked version of the Hamlib git master. This fork contains
|
||||||
patches not yet accepted by the Hamlib development team which are
|
patches not yet accepted by the Hamlib development team which are
|
||||||
@@ -413,4 +420,4 @@ $ cmake --build . --target install
|
|||||||
|
|
||||||
73
|
73
|
||||||
Bill
|
Bill
|
||||||
G4WJS.
|
G4WJS.
|
||||||
|
|||||||
@@ -291,6 +291,7 @@ qint64 Modulator::readData (char * data, qint64 maxSize)
|
|||||||
if (m_ic > i1) m_amp = 0.0;
|
if (m_ic > i1) m_amp = 0.0;
|
||||||
|
|
||||||
sample=qRound(m_amp*qSin(m_phi));
|
sample=qRound(m_amp*qSin(m_phi));
|
||||||
|
if(m_toneSpacing < 0) sample=qRound(m_amp*foxcom_.wave[m_ic]);
|
||||||
samples = load(postProcessSample(sample), samples);
|
samples = load(postProcessSample(sample), samples);
|
||||||
++framesGenerated;
|
++framesGenerated;
|
||||||
++m_ic;
|
++m_ic;
|
||||||
|
|||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
# Version number components
|
# Version number components
|
||||||
set (WSJTX_VERSION_MAJOR 0)
|
set (WSJTX_VERSION_MAJOR 0)
|
||||||
set (WSJTX_VERSION_MINOR 8)
|
set (WSJTX_VERSION_MINOR 10)
|
||||||
set (WSJTX_VERSION_PATCH 0)
|
set (WSJTX_VERSION_PATCH 1)
|
||||||
set (WSJTX_RC 0) # release candidate number, comment out or zero for development versions
|
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
|
set (WSJTX_VERSION_IS_RELEASE 0) # set to 1 for final release build
|
||||||
|
|||||||
+7
-2
@@ -61,6 +61,11 @@ DecodedText::DecodedText (QString const& the_string, bool contest_mode, QString
|
|||||||
|
|
||||||
bits_ = bits();
|
bits_ = bits();
|
||||||
|
|
||||||
|
// don't even try to unpack -24dB frames...they are *very* likely to be false decodes...
|
||||||
|
if(snr() <= -24){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
tryUnpack();
|
tryUnpack();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -121,7 +126,7 @@ bool DecodedText::tryUnpackHeartbeat(){
|
|||||||
|
|
||||||
// Heartbeat Alt Type
|
// Heartbeat Alt Type
|
||||||
// ---------------
|
// ---------------
|
||||||
// 1 0 BCN
|
// 1 0 HB
|
||||||
// 1 1 CQ
|
// 1 1 CQ
|
||||||
isHeartbeat_ = true;
|
isHeartbeat_ = true;
|
||||||
isAlt_ = isAlt;
|
isAlt_ = isAlt;
|
||||||
@@ -135,7 +140,7 @@ bool DecodedText::tryUnpackHeartbeat(){
|
|||||||
cmp.append(parts.at(1));
|
cmp.append(parts.at(1));
|
||||||
}
|
}
|
||||||
compound_ = cmp.join("/");
|
compound_ = cmp.join("/");
|
||||||
message_ = QString("%1: %2 %3 ").arg(compound_).arg(isAlt ? Varicode::cqString(bits3) : "HEARTBEAT").arg(extra_);
|
message_ = QString("%1: %2 %3 ").arg(compound_).arg(isAlt ? Varicode::cqString(bits3) : Varicode::hbString(bits3)).arg(extra_);
|
||||||
frameType_ = type;
|
frameType_ = type;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -107,17 +107,23 @@ QString JSC::decompress(Codeword const& bitvec){
|
|||||||
|
|
||||||
QList<quint64> bytes;
|
QList<quint64> bytes;
|
||||||
QList<int> separators;
|
QList<int> separators;
|
||||||
auto iter = bitvec.begin();
|
|
||||||
while(iter != bitvec.end()){
|
int i = 0;
|
||||||
quint64 byte = Varicode::bitsToInt(iter, 4);
|
int count = bitvec.count();
|
||||||
iter += 4;
|
while(i < count){
|
||||||
|
auto b = bitvec.mid(i, 4);
|
||||||
|
if(b.length() != 4){
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
quint64 byte = Varicode::bitsToInt(b);
|
||||||
bytes.append(byte);
|
bytes.append(byte);
|
||||||
|
i += 4;
|
||||||
|
|
||||||
if(byte < s){
|
if(byte < s){
|
||||||
if(*iter){
|
if(count - i > 0 && bitvec.at(i)){
|
||||||
separators.append(bytes.length()-1);
|
separators.append(bytes.length()-1);
|
||||||
}
|
}
|
||||||
iter += 1;
|
i += 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -131,8 +137,14 @@ QString JSC::decompress(Codeword const& bitvec){
|
|||||||
k++;
|
k++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(start + k >= bytes.length()){
|
||||||
|
break;
|
||||||
|
}
|
||||||
j = j*s + bytes[start + k] + base[k];
|
j = j*s + bytes[start + k] + base[k];
|
||||||
|
|
||||||
|
if(j >= (int)JSC::size){
|
||||||
|
break;
|
||||||
|
}
|
||||||
auto word = QString(JSC::map[j].str);
|
auto word = QString(JSC::map[j].str);
|
||||||
|
|
||||||
out.append(word);
|
out.append(word);
|
||||||
|
|||||||
@@ -93,32 +93,6 @@ subroutine multimode_decoder(ss,id2,params,nfsample)
|
|||||||
n30min=minval(n30fox(1:nfox))
|
n30min=minval(n30fox(1:nfox))
|
||||||
n30max=maxval(n30fox(1:nfox))
|
n30max=maxval(n30fox(1:nfox))
|
||||||
endif
|
endif
|
||||||
j=0
|
|
||||||
rewind 19
|
|
||||||
if(nfox.eq.0) then
|
|
||||||
endfile 19
|
|
||||||
rewind 19
|
|
||||||
else
|
|
||||||
do i=1,nfox
|
|
||||||
n=n30fox(i)
|
|
||||||
if(n30max-n30fox(i).le.4) then
|
|
||||||
j=j+1
|
|
||||||
c2fox(j)=c2fox(i)
|
|
||||||
g2fox(j)=g2fox(i)
|
|
||||||
nsnrfox(j)=nsnrfox(i)
|
|
||||||
nfreqfox(j)=nfreqfox(i)
|
|
||||||
n30fox(j)=n
|
|
||||||
m=n30max-n
|
|
||||||
if(len(trim(g2fox(j))).eq.4) then
|
|
||||||
call azdist(mygrid,g2fox(j),0.d0,nAz,nEl,nDmiles,nDkm, &
|
|
||||||
nHotAz,nHotABetter)
|
|
||||||
else
|
|
||||||
nDkm=9999
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
enddo
|
|
||||||
nfox=j
|
|
||||||
endif
|
|
||||||
go to 800
|
go to 800
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
+9
-20
@@ -100,6 +100,7 @@ void ADIF::load()
|
|||||||
add (extractField (record, "CALL")
|
add (extractField (record, "CALL")
|
||||||
, extractField (record, "BAND")
|
, extractField (record, "BAND")
|
||||||
, extractField (record, "MODE")
|
, extractField (record, "MODE")
|
||||||
|
, extractField (record, "SUBMODE")
|
||||||
, extractField (record, "QSO_DATE"));
|
, extractField (record, "QSO_DATE"));
|
||||||
}
|
}
|
||||||
inputFile.close ();
|
inputFile.close ();
|
||||||
@@ -107,12 +108,13 @@ void ADIF::load()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ADIF::add(QString const& call, QString const& band, QString const& mode, QString const& date)
|
void ADIF::add(QString const& call, QString const& band, QString const& mode, QString const& submode, QString const& date)
|
||||||
{
|
{
|
||||||
QSO q;
|
QSO q;
|
||||||
q.call = call;
|
q.call = call;
|
||||||
q.band = band;
|
q.band = band;
|
||||||
q.mode = mode;
|
q.mode = mode;
|
||||||
|
q.submode = submode;
|
||||||
q.date = date;
|
q.date = date;
|
||||||
if (q.call.size ())
|
if (q.call.size ())
|
||||||
{
|
{
|
||||||
@@ -121,8 +123,8 @@ void ADIF::add(QString const& call, QString const& band, QString const& mode, QS
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// return true if in the log same band and mode (where JT65 == JT9)
|
// return true if in the log same band
|
||||||
bool ADIF::match(QString const& call, QString const& band, QString const& mode) const
|
bool ADIF::match(QString const& call, QString const& band) const
|
||||||
{
|
{
|
||||||
QList<QSO> qsos = _data.values(call);
|
QList<QSO> qsos = _data.values(call);
|
||||||
if (qsos.size()>0)
|
if (qsos.size()>0)
|
||||||
@@ -134,22 +136,6 @@ bool ADIF::match(QString const& call, QString const& band, QString const& mode)
|
|||||||
|| (band=="")
|
|| (band=="")
|
||||||
|| (q.band==""))
|
|| (q.band==""))
|
||||||
{
|
{
|
||||||
if (
|
|
||||||
(
|
|
||||||
((mode.compare("JT65",Qt::CaseInsensitive)==0) ||
|
|
||||||
(mode.compare("JT9",Qt::CaseInsensitive)==0) ||
|
|
||||||
(mode.compare("JS8",Qt::CaseInsensitive)==0) ||
|
|
||||||
(mode.compare("FT8",Qt::CaseInsensitive)==0))
|
|
||||||
&&
|
|
||||||
((q.mode.compare("JT65",Qt::CaseInsensitive)==0) ||
|
|
||||||
(q.mode.compare("JT9",Qt::CaseInsensitive)==0) ||
|
|
||||||
(q.mode.compare("JS8",Qt::CaseInsensitive)==0) ||
|
|
||||||
(q.mode.compare("FT8",Qt::CaseInsensitive)==0))
|
|
||||||
)
|
|
||||||
|| (mode.compare(q.mode,Qt::CaseInsensitive)==0)
|
|
||||||
|| (mode=="")
|
|
||||||
|| (q.mode=="")
|
|
||||||
)
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -176,7 +162,7 @@ int ADIF::getCount() const
|
|||||||
return _data.size();
|
return _data.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
QByteArray ADIF::QSOToADIF(QString const& hisCall, QString const& hisGrid, QString const& mode
|
QByteArray ADIF::QSOToADIF(QString const& hisCall, QString const& hisGrid, QString const& mode, QString const& submode
|
||||||
, QString const& rptSent, QString const& rptRcvd, QDateTime const& dateTimeOn
|
, QString const& rptSent, QString const& rptRcvd, QDateTime const& dateTimeOn
|
||||||
, QDateTime const& dateTimeOff, QString const& band, QString const& comments
|
, QDateTime const& dateTimeOff, QString const& band, QString const& comments
|
||||||
, QString const& name, QString const& strDialFreq, QString const& m_myCall
|
, QString const& name, QString const& strDialFreq, QString const& m_myCall
|
||||||
@@ -186,6 +172,9 @@ QByteArray ADIF::QSOToADIF(QString const& hisCall, QString const& hisGrid, QStri
|
|||||||
t = "<call:" + QString::number(hisCall.length()) + ">" + hisCall;
|
t = "<call:" + QString::number(hisCall.length()) + ">" + hisCall;
|
||||||
t += " <gridsquare:" + QString::number(hisGrid.length()) + ">" + hisGrid;
|
t += " <gridsquare:" + QString::number(hisGrid.length()) + ">" + hisGrid;
|
||||||
t += " <mode:" + QString::number(mode.length()) + ">" + mode;
|
t += " <mode:" + QString::number(mode.length()) + ">" + mode;
|
||||||
|
if(!submode.isEmpty()){
|
||||||
|
t += " <submode:" + QString::number(submode.length()) + ">" + submode;
|
||||||
|
}
|
||||||
t += " <rst_sent:" + QString::number(rptSent.length()) + ">" + rptSent;
|
t += " <rst_sent:" + QString::number(rptSent.length()) + ">" + rptSent;
|
||||||
t += " <rst_rcvd:" + QString::number(rptRcvd.length()) + ">" + rptRcvd;
|
t += " <rst_rcvd:" + QString::number(rptRcvd.length()) + ">" + rptRcvd;
|
||||||
t += " <qso_date:8>" + dateTimeOn.date().toString("yyyyMMdd");
|
t += " <qso_date:8>" + dateTimeOn.date().toString("yyyyMMdd");
|
||||||
|
|||||||
+4
-4
@@ -23,15 +23,15 @@ class ADIF
|
|||||||
public:
|
public:
|
||||||
void init(QString const& filename);
|
void init(QString const& filename);
|
||||||
void load();
|
void load();
|
||||||
void add(QString const& call, QString const& band, QString const& mode, QString const& date);
|
void add(QString const& call, QString const& band, QString const& mode, const QString &submode, QString const& date);
|
||||||
bool match(QString const& call, QString const& band, QString const& mode) const;
|
bool match(QString const& call, QString const& band) const;
|
||||||
QList<QString> getCallList() const;
|
QList<QString> getCallList() const;
|
||||||
int getCount() const;
|
int getCount() const;
|
||||||
|
|
||||||
// open ADIF file and append the QSO details. Return true on success
|
// open ADIF file and append the QSO details. Return true on success
|
||||||
bool addQSOToFile(QByteArray const& ADIF_record);
|
bool addQSOToFile(QByteArray const& ADIF_record);
|
||||||
|
|
||||||
QByteArray QSOToADIF(QString const& hisCall, QString const& hisGrid, QString const& mode, QString const& rptSent
|
QByteArray QSOToADIF(QString const& hisCall, QString const& hisGrid, QString const& mode, QString const& submode, QString const& rptSent
|
||||||
, QString const& rptRcvd, QDateTime const& dateTimeOn, QDateTime const& dateTimeOff
|
, QString const& rptRcvd, QDateTime const& dateTimeOn, QDateTime const& dateTimeOff
|
||||||
, QString const& band, QString const& comments, QString const& name
|
, QString const& band, QString const& comments, QString const& name
|
||||||
, QString const& strDialFreq, QString const& m_myCall, QString const& m_myGrid
|
, QString const& strDialFreq, QString const& m_myCall, QString const& m_myGrid
|
||||||
@@ -41,7 +41,7 @@ class ADIF
|
|||||||
private:
|
private:
|
||||||
struct QSO
|
struct QSO
|
||||||
{
|
{
|
||||||
QString call,band,mode,date;
|
QString call,band,mode,submode,date;
|
||||||
};
|
};
|
||||||
|
|
||||||
QMultiHash<QString, QSO> _data;
|
QMultiHash<QString, QSO> _data;
|
||||||
|
|||||||
+5
-6
@@ -50,8 +50,8 @@ void LogBook::_setAlreadyWorkedFromLog()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool LogBook::hasWorkedBefore(const QString &call, const QString &band, const QString &mode){
|
bool LogBook::hasWorkedBefore(const QString &call, const QString &band){
|
||||||
return _log.match(call, band, mode);
|
return _log.match(call, band);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LogBook::match(/*in*/const QString call,
|
void LogBook::match(/*in*/const QString call,
|
||||||
@@ -61,9 +61,8 @@ void LogBook::match(/*in*/const QString call,
|
|||||||
{
|
{
|
||||||
if (call.length() > 0)
|
if (call.length() > 0)
|
||||||
{
|
{
|
||||||
QString currentMode = ""; // match any mode
|
|
||||||
QString currentBand = ""; // match any band
|
QString currentBand = ""; // match any band
|
||||||
callWorkedBefore = _log.match(call,currentBand,currentMode);
|
callWorkedBefore = _log.match(call,currentBand);
|
||||||
countryName = _countries.find(call);
|
countryName = _countries.find(call);
|
||||||
|
|
||||||
if (countryName.length() > 0) // country was found
|
if (countryName.length() > 0) // country was found
|
||||||
@@ -76,9 +75,9 @@ void LogBook::match(/*in*/const QString call,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void LogBook::addAsWorked(const QString call, const QString band, const QString mode, const QString date)
|
void LogBook::addAsWorked(const QString call, const QString band, const QString mode, const QString submode, const QString date)
|
||||||
{
|
{
|
||||||
_log.add(call,band,mode,date);
|
_log.add(call,band,mode,submode,date);
|
||||||
QString countryName = _countries.find(call);
|
QString countryName = _countries.find(call);
|
||||||
if (countryName.length() > 0)
|
if (countryName.length() > 0)
|
||||||
_worked.setAsWorked(countryName);
|
_worked.setAsWorked(countryName);
|
||||||
|
|||||||
+2
-2
@@ -20,12 +20,12 @@ class LogBook
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
void init();
|
void init();
|
||||||
bool hasWorkedBefore(const QString &call, const QString &band, const QString &mode);
|
bool hasWorkedBefore(const QString &call, const QString &band);
|
||||||
void match(/*in*/ const QString call,
|
void match(/*in*/ const QString call,
|
||||||
/*out*/ QString &countryName,
|
/*out*/ QString &countryName,
|
||||||
bool &callWorkedBefore,
|
bool &callWorkedBefore,
|
||||||
bool &countryWorkedBefore) const;
|
bool &countryWorkedBefore) const;
|
||||||
void addAsWorked(const QString call, const QString band, const QString mode, const QString date);
|
void addAsWorked(const QString call, const QString band, const QString mode, const QString submode, const QString date);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
CountryDat _countries;
|
CountryDat _countries;
|
||||||
|
|||||||
+12
-8
@@ -95,12 +95,16 @@ void LogQSO::initLogQSO(QString const& hisCall, QString const& hisGrid, QString
|
|||||||
|
|
||||||
void LogQSO::accept()
|
void LogQSO::accept()
|
||||||
{
|
{
|
||||||
QString hisCall,hisGrid,mode,rptSent,rptRcvd,dateOn,dateOff,timeOn,timeOff,band,operator_call;
|
QString hisCall,hisGrid,mode,submode,rptSent,rptRcvd,dateOn,dateOff,timeOn,timeOff,band,operator_call;
|
||||||
QString comments,name;
|
QString comments,name;
|
||||||
|
|
||||||
hisCall=ui->call->text();
|
hisCall=ui->call->text().toUpper();
|
||||||
hisGrid=ui->grid->text();
|
hisGrid=ui->grid->text().toUpper();
|
||||||
mode=ui->mode->text();
|
mode = ui->mode->text().toUpper();
|
||||||
|
if(mode == "JS8"){
|
||||||
|
mode="MFSK";
|
||||||
|
submode="JS8";
|
||||||
|
}
|
||||||
rptSent=ui->sent->text();
|
rptSent=ui->sent->text();
|
||||||
rptRcvd=ui->rcvd->text();
|
rptRcvd=ui->rcvd->text();
|
||||||
m_dateTimeOn = ui->start_date_time->dateTime ();
|
m_dateTimeOn = ui->start_date_time->dateTime ();
|
||||||
@@ -115,10 +119,10 @@ void LogQSO::accept()
|
|||||||
//Log this QSO to ADIF file "js8call_log.adi"
|
//Log this QSO to ADIF file "js8call_log.adi"
|
||||||
QString filename = "js8call_log.adi"; // TODO allow user to set
|
QString filename = "js8call_log.adi"; // TODO allow user to set
|
||||||
ADIF adifile;
|
ADIF adifile;
|
||||||
auto adifilePath = QDir {QStandardPaths::writableLocation (QStandardPaths::DataLocation)}.absoluteFilePath ("js8call_log.adi");
|
auto adifilePath = QDir {QStandardPaths::writableLocation (QStandardPaths::DataLocation)}.absoluteFilePath (filename);
|
||||||
adifile.init(adifilePath);
|
adifile.init(adifilePath);
|
||||||
|
|
||||||
QByteArray ADIF {adifile.QSOToADIF (hisCall, hisGrid, mode, rptSent, rptRcvd, m_dateTimeOn, m_dateTimeOff, band
|
QByteArray ADIF {adifile.QSOToADIF (hisCall, hisGrid, mode, submode, rptSent, rptRcvd, m_dateTimeOn, m_dateTimeOff, band
|
||||||
, comments, name, strDialFreq, m_myCall, m_myGrid, m_txPower, operator_call)};
|
, comments, name, strDialFreq, m_myCall, m_myGrid, m_txPower, operator_call)};
|
||||||
if (!adifile.addQSOToFile (ADIF))
|
if (!adifile.addQSOToFile (ADIF))
|
||||||
{
|
{
|
||||||
@@ -148,7 +152,7 @@ void LogQSO::accept()
|
|||||||
m_dateTimeOn.time().toString("hh:mm:ss,") +
|
m_dateTimeOn.time().toString("hh:mm:ss,") +
|
||||||
m_dateTimeOff.date().toString("yyyy-MM-dd,") +
|
m_dateTimeOff.date().toString("yyyy-MM-dd,") +
|
||||||
m_dateTimeOff.time().toString("hh:mm:ss,") + hisCall + "," +
|
m_dateTimeOff.time().toString("hh:mm:ss,") + hisCall + "," +
|
||||||
hisGrid + "," + strDialFreq + "," + mode +
|
hisGrid + "," + strDialFreq + "," + (mode == "MFSK" ? "JS8" : mode) +
|
||||||
"," + rptSent + "," + rptRcvd + "," + m_txPower +
|
"," + rptSent + "," + rptRcvd + "," + m_txPower +
|
||||||
"," + comments + "," + name;
|
"," + comments + "," + name;
|
||||||
QTextStream out(&f);
|
QTextStream out(&f);
|
||||||
@@ -157,7 +161,7 @@ void LogQSO::accept()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Clean up and finish logging
|
//Clean up and finish logging
|
||||||
Q_EMIT acceptQSO (m_dateTimeOff, hisCall, hisGrid, m_dialFreq, mode, rptSent, rptRcvd, m_txPower, comments, name,m_dateTimeOn, operator_call, m_myCall, m_myGrid, ADIF);
|
Q_EMIT acceptQSO (m_dateTimeOff, hisCall, hisGrid, m_dialFreq, mode, submode, rptSent, rptRcvd, m_txPower, comments, name,m_dateTimeOn, operator_call, m_myCall, m_myGrid, ADIF);
|
||||||
QDialog::accept();
|
QDialog::accept();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ public slots:
|
|||||||
|
|
||||||
signals:
|
signals:
|
||||||
void acceptQSO (QDateTime const& QSO_date_off, QString const& call, QString const& grid
|
void acceptQSO (QDateTime const& QSO_date_off, QString const& call, QString const& grid
|
||||||
, Radio::Frequency dial_freq, QString const& mode
|
, Radio::Frequency dial_freq, QString const& mode, QString const& submode
|
||||||
, QString const& rpt_sent, QString const& rpt_received
|
, QString const& rpt_sent, QString const& rpt_received
|
||||||
, QString const& tx_power, QString const& comments
|
, QString const& tx_power, QString const& comments
|
||||||
, QString const& name, QDateTime const& QSO_date_on, QString const& operator_call
|
, QString const& name, QDateTime const& QSO_date_on, QString const& operator_call
|
||||||
|
|||||||
@@ -152,6 +152,9 @@
|
|||||||
<height>16777215</height>
|
<height>16777215</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="readOnly">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
|||||||
+760
-211
File diff suppressed because it is too large
Load Diff
+39
-14
@@ -130,6 +130,7 @@ public slots:
|
|||||||
void msgAvgDecode2();
|
void msgAvgDecode2();
|
||||||
void fastPick(int x0, int x1, int y);
|
void fastPick(int x0, int x1, int y);
|
||||||
|
|
||||||
|
void playSoundNotification(const QString &path);
|
||||||
bool hasExistingMessageBuffer(int offset, bool drift, int *pPrevOffset);
|
bool hasExistingMessageBuffer(int offset, bool drift, int *pPrevOffset);
|
||||||
void logCallActivity(CallDetail d, bool spot=true);
|
void logCallActivity(CallDetail d, bool spot=true);
|
||||||
QString lookupCallInCompoundCache(QString const &call);
|
QString lookupCallInCompoundCache(QString const &call);
|
||||||
@@ -170,7 +171,14 @@ private slots:
|
|||||||
void on_tx4_editingFinished();
|
void on_tx4_editingFinished();
|
||||||
void on_tx5_currentTextChanged (QString const&);
|
void on_tx5_currentTextChanged (QString const&);
|
||||||
void on_tx6_editingFinished();
|
void on_tx6_editingFinished();
|
||||||
|
void on_menuControl_aboutToShow();
|
||||||
|
void on_actionEnable_Spotting_toggled(bool checked);
|
||||||
|
void on_actionEnable_Active_toggled(bool checked);
|
||||||
|
void on_actionEnable_Auto_Reply_toggled(bool checked);
|
||||||
|
void on_actionEnable_Selcall_toggled(bool checked);
|
||||||
void on_menuWindow_aboutToShow();
|
void on_menuWindow_aboutToShow();
|
||||||
|
void on_actionShow_Fullscreen_triggered(bool checked);
|
||||||
|
void on_actionShow_Frequency_Clock_triggered(bool checked);
|
||||||
void on_actionShow_Band_Activity_triggered(bool checked);
|
void on_actionShow_Band_Activity_triggered(bool checked);
|
||||||
void on_actionShow_Call_Activity_triggered(bool checked);
|
void on_actionShow_Call_Activity_triggered(bool checked);
|
||||||
void on_actionShow_Waterfall_triggered(bool checked);
|
void on_actionShow_Waterfall_triggered(bool checked);
|
||||||
@@ -185,6 +193,7 @@ private slots:
|
|||||||
void on_actionAbout_triggered();
|
void on_actionAbout_triggered();
|
||||||
void on_autoButton_clicked (bool);
|
void on_autoButton_clicked (bool);
|
||||||
void on_labDialFreq_clicked();
|
void on_labDialFreq_clicked();
|
||||||
|
void resetPushButtonToggleText(QPushButton *btn);
|
||||||
void on_monitorTxButton_clicked();
|
void on_monitorTxButton_clicked();
|
||||||
void on_stopTxButton_clicked();
|
void on_stopTxButton_clicked();
|
||||||
void on_stopButton_clicked();
|
void on_stopButton_clicked();
|
||||||
@@ -265,13 +274,21 @@ private slots:
|
|||||||
void on_rbGenMsg_clicked(bool checked);
|
void on_rbGenMsg_clicked(bool checked);
|
||||||
void on_rbFreeText_clicked(bool checked);
|
void on_rbFreeText_clicked(bool checked);
|
||||||
void on_clearAction_triggered(QObject * sender);
|
void on_clearAction_triggered(QObject * sender);
|
||||||
|
void buildHeartbeatMenu(QMenu *menu);
|
||||||
|
void buildCQMenu(QMenu *menu);
|
||||||
|
void buildRepeatMenu(QMenu *menu, QPushButton * button, int * interval);
|
||||||
|
void sendHeartbeat();
|
||||||
|
void on_hbMacroButton_toggled(bool checked);
|
||||||
|
void on_hbMacroButton_clicked();
|
||||||
|
void sendCQ(bool repeat=false);
|
||||||
|
void on_cqMacroButton_toggled(bool checked);
|
||||||
void on_cqMacroButton_clicked();
|
void on_cqMacroButton_clicked();
|
||||||
void on_replyMacroButton_clicked();
|
void on_replyMacroButton_clicked();
|
||||||
void on_snrMacroButton_clicked();
|
void on_snrMacroButton_clicked();
|
||||||
void on_qthMacroButton_clicked();
|
void on_qthMacroButton_clicked();
|
||||||
void on_qtcMacroButton_clicked();
|
void on_qtcMacroButton_clicked();
|
||||||
void setShowColumn(QString tableKey, QString columnKey, bool value);
|
void setShowColumn(QString tableKey, QString columnKey, bool value);
|
||||||
bool showColumn(QString tableKey, QString columnKey);
|
bool showColumn(QString tableKey, QString columnKey, bool default_=true);
|
||||||
void buildShowColumnsMenu(QMenu *menu, QString tableKey);
|
void buildShowColumnsMenu(QMenu *menu, QString tableKey);
|
||||||
void setSortBy(QString key, QString value);
|
void setSortBy(QString key, QString value);
|
||||||
QString getSortBy(QString key, QString defaultValue);
|
QString getSortBy(QString key, QString defaultValue);
|
||||||
@@ -302,12 +319,8 @@ private slots:
|
|||||||
bool prepareNextMessageFrame();
|
bool prepareNextMessageFrame();
|
||||||
bool isFreqOffsetFree(int f, int bw);
|
bool isFreqOffsetFree(int f, int bw);
|
||||||
int findFreeFreqOffset(int fmin, int fmax, int bw);
|
int findFreeFreqOffset(int fmin, int fmax, int bw);
|
||||||
void scheduleHeartbeat(bool first=false);
|
void checkRepeat();
|
||||||
void pauseHeartbeat();
|
QString calculateDistance(QString const& grid, int *pDistance=nullptr, int *pAzimuth=nullptr);
|
||||||
void unpauseHeartbeat();
|
|
||||||
void checkHeartbeat();
|
|
||||||
void prepareHeartbeat();
|
|
||||||
QString calculateDistance(QString const& grid, int *pDistance=nullptr);
|
|
||||||
void on_driftSpinBox_valueChanged(int n);
|
void on_driftSpinBox_valueChanged(int n);
|
||||||
void on_driftSyncButton_clicked();
|
void on_driftSyncButton_clicked();
|
||||||
void on_driftSyncEndButton_clicked();
|
void on_driftSyncEndButton_clicked();
|
||||||
@@ -318,10 +331,8 @@ private slots:
|
|||||||
void on_tuneButton_clicked (bool);
|
void on_tuneButton_clicked (bool);
|
||||||
void on_pbR2T_clicked();
|
void on_pbR2T_clicked();
|
||||||
void on_pbT2R_clicked();
|
void on_pbT2R_clicked();
|
||||||
void on_heartbeatButton_clicked();
|
|
||||||
void on_selcalButton_clicked();
|
|
||||||
void acceptQSO (QDateTime const&, QString const& call, QString const& grid
|
void acceptQSO (QDateTime const&, QString const& call, QString const& grid
|
||||||
, Frequency dial_freq, QString const& mode
|
, Frequency dial_freq, QString const& mode, QString const& submode
|
||||||
, QString const& rpt_sent, QString const& rpt_received
|
, QString const& rpt_sent, QString const& rpt_received
|
||||||
, QString const& tx_power, QString const& comments
|
, QString const& tx_power, QString const& comments
|
||||||
, QString const& name, QDateTime const& QSO_date_on, QString const& operator_call
|
, QString const& name, QDateTime const& QSO_date_on, QString const& operator_call
|
||||||
@@ -342,6 +353,14 @@ private slots:
|
|||||||
void stop_tuning ();
|
void stop_tuning ();
|
||||||
void stopTuneATU();
|
void stopTuneATU();
|
||||||
void auto_tx_mode(bool);
|
void auto_tx_mode(bool);
|
||||||
|
void on_autoReplyButton_toggled(bool checked);
|
||||||
|
void on_monitorButton_toggled(bool checked);
|
||||||
|
void on_monitorTxButton_toggled(bool checked);
|
||||||
|
void on_selcalButton_toggled(bool checked);
|
||||||
|
void on_tuneButton_toggled(bool checked);
|
||||||
|
void on_spotButton_toggled(bool checked);
|
||||||
|
void on_activeButton_toggled(bool checked);
|
||||||
|
|
||||||
void on_actionMessage_averaging_triggered();
|
void on_actionMessage_averaging_triggered();
|
||||||
void on_actionFox_Log_triggered();
|
void on_actionFox_Log_triggered();
|
||||||
void on_actionInclude_averaging_toggled (bool);
|
void on_actionInclude_averaging_toggled (bool);
|
||||||
@@ -648,7 +667,7 @@ private:
|
|||||||
QTimer minuteTimer;
|
QTimer minuteTimer;
|
||||||
QTimer splashTimer;
|
QTimer splashTimer;
|
||||||
QTimer p1Timer;
|
QTimer p1Timer;
|
||||||
QTimer heartbeatTimer;
|
QTimer repeatTimer;
|
||||||
|
|
||||||
QString m_path;
|
QString m_path;
|
||||||
QString m_baseCall;
|
QString m_baseCall;
|
||||||
@@ -818,9 +837,11 @@ private:
|
|||||||
QQueue<QString> m_foxQSOinProgress; //QSOs in progress: Fox has sent a report
|
QQueue<QString> m_foxQSOinProgress; //QSOs in progress: Fox has sent a report
|
||||||
QQueue<qint64> m_foxRateQueue;
|
QQueue<qint64> m_foxRateQueue;
|
||||||
|
|
||||||
bool m_nextHeartbeatQueued = false;
|
bool m_hbHidden;
|
||||||
bool m_nextHeartPaused = false;
|
int m_hbInterval;
|
||||||
|
int m_cqInterval;
|
||||||
QDateTime m_nextHeartbeat;
|
QDateTime m_nextHeartbeat;
|
||||||
|
QDateTime m_nextCQ;
|
||||||
QDateTime m_dateTimeQSOOn;
|
QDateTime m_dateTimeQSOOn;
|
||||||
QDateTime m_dateTimeLastTX;
|
QDateTime m_dateTimeLastTX;
|
||||||
|
|
||||||
@@ -847,7 +868,6 @@ private:
|
|||||||
double m_toneSpacing;
|
double m_toneSpacing;
|
||||||
int m_firstDecode;
|
int m_firstDecode;
|
||||||
QProgressDialog m_optimizingProgress;
|
QProgressDialog m_optimizingProgress;
|
||||||
QTimer m_heartbeat;
|
|
||||||
MessageClient * m_messageClient;
|
MessageClient * m_messageClient;
|
||||||
PSK_Reporter *psk_Reporter;
|
PSK_Reporter *psk_Reporter;
|
||||||
APRSISClient * m_aprsClient;
|
APRSISClient * m_aprsClient;
|
||||||
@@ -886,6 +906,7 @@ private:
|
|||||||
void postDecode (bool is_new, QString const& message);
|
void postDecode (bool is_new, QString const& message);
|
||||||
void displayTransmit();
|
void displayTransmit();
|
||||||
void updateButtonDisplay();
|
void updateButtonDisplay();
|
||||||
|
void updateRepeatButtonDisplay();
|
||||||
void updateTextDisplay();
|
void updateTextDisplay();
|
||||||
void updateFrameCountEstimate(int count);
|
void updateFrameCountEstimate(int count);
|
||||||
void updateTextStatsDisplay(QString text, int count);
|
void updateTextStatsDisplay(QString text, int count);
|
||||||
@@ -934,6 +955,10 @@ private:
|
|||||||
, QString const& his_call
|
, QString const& his_call
|
||||||
, QString const& his_grid) const;
|
, QString const& his_grid) const;
|
||||||
void read_wav_file (QString const& fname);
|
void read_wav_file (QString const& fname);
|
||||||
|
QDateTime nextTransmitCycle();
|
||||||
|
void resetAutomaticIntervalTransmissions(bool stopCQ, bool stopHB);
|
||||||
|
void resetCQTimer(bool stop);
|
||||||
|
void resetHeartbeatTimer(bool stop);
|
||||||
void decodeDone ();
|
void decodeDone ();
|
||||||
void subProcessFailed (QProcess *, int exit_code, QProcess::ExitStatus);
|
void subProcessFailed (QProcess *, int exit_code, QProcess::ExitStatus);
|
||||||
void subProcessError (QProcess *, QProcess::ProcessError);
|
void subProcessError (QProcess *, QProcess::ProcessError);
|
||||||
|
|||||||
+712
-723
File diff suppressed because it is too large
Load Diff
+64
-31
@@ -27,6 +27,7 @@
|
|||||||
|
|
||||||
#include "varicode.h"
|
#include "varicode.h"
|
||||||
#include "jsc.h"
|
#include "jsc.h"
|
||||||
|
#include "decodedtext.h"
|
||||||
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
@@ -54,25 +55,29 @@ QMap<QString, int> directed_cmds = {
|
|||||||
{" QTC?", 2 }, // query station message
|
{" QTC?", 2 }, // query station message
|
||||||
{"&", 2 }, // compat
|
{"&", 2 }, // compat
|
||||||
|
|
||||||
|
//{"$", 3 }, // unused
|
||||||
|
|
||||||
{" GRID?", 4 }, // query grid
|
{" GRID?", 4 }, // query grid
|
||||||
{"^", 4 }, // compat
|
{"^", 4 }, // compat
|
||||||
|
|
||||||
|
{">", 5 }, // relay message
|
||||||
|
|
||||||
{" STATUS?", 6 }, // query idle message
|
{" STATUS?", 6 }, // query idle message
|
||||||
{"*", 6 }, // compat
|
{"*", 6 }, // compat
|
||||||
|
|
||||||
{">", 5 }, // relay message
|
//{"!", 7 }, // unused
|
||||||
{"#", 8 }, // all or nothing message
|
|
||||||
|
|
||||||
//{"!", 7 }, // alert message
|
{"#", 8 }, // all or nothing message
|
||||||
//{"$", 3 }, // query station(s) heard
|
|
||||||
//{"=", 9 }, // unused
|
|
||||||
|
|
||||||
{" ACTIVE", 10 }, // i have been active in the past 10 minutes
|
{" TU", 9 }, // thank you
|
||||||
{" IDLE", 11 }, // i have not been active in the past 10 minutes
|
|
||||||
|
|
||||||
{" HEARTBEAT", -1 }, // this is my ping (unused except for faux processing of pings as directed commands)
|
{" ACTIVE", 10 }, // i am active
|
||||||
{" HEARTBEAT ACK", 12 }, // i acknowledge your ping at this SNR
|
{" IDLE", 11 }, // i am idle
|
||||||
{" HEARTBEAT REQ", 13 }, // can you transmit a ping to callsign?
|
|
||||||
|
{" HB", -1 }, // this is my heartbeat (unused except for faux processing of HBs as directed commands)
|
||||||
|
{" HB ACK", 12 }, // (unused, but a compatibility display)
|
||||||
|
|
||||||
|
{" QUERY", 13 }, // can you transmit a ping to callsign?
|
||||||
|
|
||||||
{" APRS:", 14 }, // send an aprs packet
|
{" APRS:", 14 }, // send an aprs packet
|
||||||
|
|
||||||
@@ -96,11 +101,11 @@ QMap<QString, int> directed_cmds = {
|
|||||||
{" ", 31 }, // send freetext
|
{" ", 31 }, // send freetext
|
||||||
};
|
};
|
||||||
|
|
||||||
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};
|
||||||
|
|
||||||
QSet<int> buffered_cmds = {3, 5, /*6,*/ /*7,*/ 8, 13, 14, 15};
|
QSet<int> buffered_cmds = {3, 5, /*6,*/ /*7,*/ 8, 13, 14, 15};
|
||||||
|
|
||||||
QSet<int> snr_cmds = {12, 25};
|
QSet<int> snr_cmds = {25, 29};
|
||||||
|
|
||||||
QMap<int, int> checksum_cmds = {
|
QMap<int, int> checksum_cmds = {
|
||||||
{ 5, 16 },
|
{ 5, 16 },
|
||||||
@@ -111,17 +116,17 @@ 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?(?:HEARTBEAT (ACK|REQ)|AGN[?]|QSL[?]|HW CPY[?]|APRS[:]|QRZ[?]|SNR[?]|QTC[?]|QTH[?]|GRID[?]|STATUS[?]|(?:(?:ACK|73|YES|NO|SNR|QSL|RR|SK|FB|QTH|QTC|GRID|ACTIVE|IDLE)(?=[ ]|$))|[?*^&@#> ]))?");
|
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_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|HEARTBEAT ACK)\\s?[-+]?(?:3[01]|[0-2]?[0-9]))?");
|
QString optional_num_pattern = QString("(?<num>(?<=SNR|ACK)\\s?[-+]?(?:3[01]|[0-2]?[0-9]))?");
|
||||||
|
|
||||||
QRegularExpression directed_re("^" +
|
QRegularExpression directed_re("^" +
|
||||||
callsign_pattern +
|
callsign_pattern +
|
||||||
optional_cmd_pattern +
|
optional_cmd_pattern +
|
||||||
optional_num_pattern);
|
optional_num_pattern);
|
||||||
|
|
||||||
QRegularExpression heartbeat_re(R"(^\s*(?<type>CQCQCQ|CQ QRPP?|CQ DX|CQ TEST|CQ( CQ){0,2}|HEARTBEAT)(?:\s(?<grid>[A-R]{2}[0-9]{2}))?\b)");
|
QRegularExpression heartbeat_re(R"(^\s*(?<type>CQCQCQ|CQ QRPP?|CQ DX|CQ TEST|CQ( CQ){0,2}|HB (ACTIVE|IDLE))(?:\s(?<grid>[A-R]{2}[0-9]{2}))?\b)");
|
||||||
|
|
||||||
QRegularExpression compound_re("^\\s*[`]" +
|
QRegularExpression compound_re("^\\s*[`]" +
|
||||||
callsign_pattern +
|
callsign_pattern +
|
||||||
@@ -203,6 +208,12 @@ QMap<quint32, QString> cqs = {
|
|||||||
{ 7, "CQ CQ CQ"},
|
{ 7, "CQ CQ CQ"},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
QMap<quint32, QString> hbs = {
|
||||||
|
{ 0, "HB ACTIVE" },
|
||||||
|
{ 1, "HB IDLE" },
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
QMap<int, int> dbm2mw = {
|
QMap<int, int> dbm2mw = {
|
||||||
{0 , 1}, // 1mW
|
{0 , 1}, // 1mW
|
||||||
{3 , 2}, // 2mW
|
{3 , 2}, // 2mW
|
||||||
@@ -289,6 +300,13 @@ QString Varicode::cqString(int number){
|
|||||||
return cqs[number];
|
return cqs[number];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString Varicode::hbString(int number){
|
||||||
|
if(!hbs.contains(number)){
|
||||||
|
return QString{};
|
||||||
|
}
|
||||||
|
return hbs[number];
|
||||||
|
}
|
||||||
|
|
||||||
bool Varicode::startsWithCQ(QString text){
|
bool Varicode::startsWithCQ(QString text){
|
||||||
foreach(auto cq, cqs.values()){
|
foreach(auto cq, cqs.values()){
|
||||||
if(text.startsWith(cq)){
|
if(text.startsWith(cq)){
|
||||||
@@ -298,6 +316,15 @@ bool Varicode::startsWithCQ(QString text){
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Varicode::startsWithHB(QString text){
|
||||||
|
foreach(auto cq, hbs.values()){
|
||||||
|
if(text.startsWith(cq)){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
QString Varicode::formatSNR(int snr){
|
QString Varicode::formatSNR(int snr){
|
||||||
if(snr < -60 || snr > 60){
|
if(snr < -60 || snr > 60){
|
||||||
return QString();
|
return QString();
|
||||||
@@ -991,7 +1018,7 @@ quint8 Varicode::packCmd(quint8 cmd, quint8 num, bool *pPackedNum){
|
|||||||
// [1][X][6]
|
// [1][X][6]
|
||||||
// X = 0 == SNR
|
// X = 0 == SNR
|
||||||
// X = 1 == ACK
|
// X = 1 == ACK
|
||||||
value = ((1 << 1) | (int)(cmdStr == " HEARTBEAT ACK")) << 6;
|
value = ((1 << 1) | (int)(cmdStr == " ACK")) << 6;
|
||||||
value = value + (num & ((1<<6)-1));
|
value = value + (num & ((1<<6)-1));
|
||||||
if(pPackedNum) *pPackedNum = true;
|
if(pPackedNum) *pPackedNum = true;
|
||||||
} else {
|
} else {
|
||||||
@@ -1009,7 +1036,7 @@ quint8 Varicode::unpackCmd(quint8 value, quint8 *pNum){
|
|||||||
|
|
||||||
auto cmd = directed_cmds[" SNR"];
|
auto cmd = directed_cmds[" SNR"];
|
||||||
if(value & (1<<6)){
|
if(value & (1<<6)){
|
||||||
cmd = directed_cmds[" HEARTBEAT ACK"];
|
cmd = directed_cmds[" ACK"];
|
||||||
}
|
}
|
||||||
return cmd;
|
return cmd;
|
||||||
} else {
|
} else {
|
||||||
@@ -1118,7 +1145,8 @@ bool Varicode::isCompoundCallsign(const QString &callsign){
|
|||||||
// CQCQCQ EM73
|
// CQCQCQ EM73
|
||||||
// CQ DX EM73
|
// CQ DX EM73
|
||||||
// CQ QRP EM73
|
// CQ QRP EM73
|
||||||
// HEARTBEAT EM73
|
// HB ACTIVE EM73
|
||||||
|
// HB IDLE EM73
|
||||||
QString Varicode::packHeartbeatMessage(QString const &text, const QString &callsign, int *n){
|
QString Varicode::packHeartbeatMessage(QString const &text, const QString &callsign, int *n){
|
||||||
QString frame;
|
QString frame;
|
||||||
|
|
||||||
@@ -1132,8 +1160,8 @@ QString Varicode::packHeartbeatMessage(QString const &text, const QString &calls
|
|||||||
|
|
||||||
// Heartbeat Alt Type
|
// Heartbeat Alt Type
|
||||||
// ---------------
|
// ---------------
|
||||||
// 1 0 HEARTBEAT
|
// 1 0 HB
|
||||||
// 1 1 CQCQCQ
|
// 1 1 CQ
|
||||||
|
|
||||||
auto type = parsedText.captured("type");
|
auto type = parsedText.captured("type");
|
||||||
auto isAlt = type.startsWith("CQ");
|
auto isAlt = type.startsWith("CQ");
|
||||||
@@ -1148,12 +1176,13 @@ QString Varicode::packHeartbeatMessage(QString const &text, const QString &calls
|
|||||||
packed_extra = Varicode::packGrid(extra);
|
packed_extra = Varicode::packGrid(extra);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
quint8 cqNumber = hbs.key(type, 0);
|
||||||
|
|
||||||
if(isAlt){
|
if(isAlt){
|
||||||
packed_extra |= (1<<15);
|
packed_extra |= (1<<15);
|
||||||
|
cqNumber = cqs.key(type, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
quint8 cqNumber = cqs.key(type, 0);
|
|
||||||
|
|
||||||
frame = packCompoundFrame(callsign, FrameHeartbeat, packed_extra, cqNumber);
|
frame = packCompoundFrame(callsign, FrameHeartbeat, packed_extra, cqNumber);
|
||||||
if(frame.isEmpty()){
|
if(frame.isEmpty()){
|
||||||
if(n) *n = 0;
|
if(n) *n = 0;
|
||||||
@@ -1622,6 +1651,7 @@ QList<QPair<QString, int>> Varicode::buildMessageFrames(
|
|||||||
#define ALLOW_SEND_COMPOUND_DIRECTED 1
|
#define ALLOW_SEND_COMPOUND_DIRECTED 1
|
||||||
#define AUTO_PREPEND_DIRECTED 1
|
#define AUTO_PREPEND_DIRECTED 1
|
||||||
#define AUTO_REMOVE_MYCALL 1
|
#define AUTO_REMOVE_MYCALL 1
|
||||||
|
#define AUTO_PREPEND_DIRECTED_ALLOW_TEXT_CALLSIGNS 1
|
||||||
|
|
||||||
bool mycallCompound = Varicode::isCompoundCallsign(mycall);
|
bool mycallCompound = Varicode::isCompoundCallsign(mycall);
|
||||||
|
|
||||||
@@ -1653,9 +1683,9 @@ QList<QPair<QString, int>> Varicode::buildMessageFrames(
|
|||||||
// and if this isn't a raw message (starting with "`")... then...
|
// and if this isn't a raw message (starting with "`")... then...
|
||||||
if(!selectedCall.isEmpty() && !line.startsWith(selectedCall) && !line.startsWith("`")){
|
if(!selectedCall.isEmpty() && !line.startsWith(selectedCall) && !line.startsWith("`")){
|
||||||
bool lineStartsWithBaseCall = (
|
bool lineStartsWithBaseCall = (
|
||||||
line.startsWith("@ALLCALL") ||
|
line.startsWith("@ALLCALL") ||
|
||||||
line.contains("HEARTBEAT") ||
|
Varicode::startsWithCQ(line) ||
|
||||||
Varicode::startsWithCQ(line)
|
Varicode::startsWithHB(line)
|
||||||
);
|
);
|
||||||
|
|
||||||
#if AUTO_PREPEND_DIRECTED_ALLOW_TEXT_CALLSIGNS
|
#if AUTO_PREPEND_DIRECTED_ALLOW_TEXT_CALLSIGNS
|
||||||
@@ -1863,12 +1893,15 @@ void BuildMessageFramesThread::run(){
|
|||||||
m_text
|
m_text
|
||||||
);
|
);
|
||||||
|
|
||||||
QList<QString> frames;
|
// TODO: jsherer - we wouldn't normally use decodedtext.h here... but it's useful for computing the actual frames transmitted.
|
||||||
QList<int> bits;
|
QStringList textList;
|
||||||
foreach(auto pair, results){
|
qDebug() << "frames:";
|
||||||
frames.append(pair.first);
|
foreach(auto frame, results){
|
||||||
bits.append(pair.second);
|
auto dt = DecodedText(frame.first, frame.second);
|
||||||
|
qDebug() << "->" << frame << dt.message() << Varicode::frameTypeString(dt.frameType());
|
||||||
|
textList.append(dt.message());
|
||||||
}
|
}
|
||||||
|
|
||||||
emit resultReady(frames, bits);
|
auto transmitText = textList.join("");
|
||||||
|
emit resultReady(transmitText, results.length());
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-1
@@ -63,7 +63,9 @@ public:
|
|||||||
|
|
||||||
static QMap<QString, QString> defaultHuffTable();
|
static QMap<QString, QString> defaultHuffTable();
|
||||||
static QString cqString(int number);
|
static QString cqString(int number);
|
||||||
|
static QString hbString(int number);
|
||||||
static bool startsWithCQ(QString text);
|
static bool startsWithCQ(QString text);
|
||||||
|
static bool startsWithHB(QString text);
|
||||||
static QString formatSNR(int snr);
|
static QString formatSNR(int snr);
|
||||||
static QString formatPWR(int dbm);
|
static QString formatPWR(int dbm);
|
||||||
|
|
||||||
@@ -172,7 +174,7 @@ public:
|
|||||||
QObject *parent=nullptr);
|
QObject *parent=nullptr);
|
||||||
void run() override;
|
void run() override;
|
||||||
signals:
|
signals:
|
||||||
void resultReady(QStringList, QList<int>);
|
void resultReady(QString, int);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString m_mycall;
|
QString m_mycall;
|
||||||
|
|||||||
+2
-2
@@ -7,7 +7,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>1083</width>
|
<width>1083</width>
|
||||||
<height>337</height>
|
<height>154</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@@ -43,7 +43,7 @@
|
|||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>400</width>
|
<width>400</width>
|
||||||
<height>100</height>
|
<height>10</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="frameShape">
|
<property name="frameShape">
|
||||||
|
|||||||
Reference in New Issue
Block a user