diff options
| author | Christoph Berg <myon@debian.org> | 2023-01-08 21:38:57 +0100 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2023-01-08 21:38:57 +0100 |
| commit | feb1845d2d46452ef74746657a6f89845b1b7ac9 (patch) | |
| tree | 5d1ff0ae92c5bd7c984a727b26116f6b6564f75a /widgets/mainwindow.cpp | |
| parent | 4bbf5124f399f0b7c2f9f95def8a6ff9dc22315e (diff) | |
| parent | 1a98fb3da0d436b86c887261b39f77bfd3911fd5 (diff) | |
Update upstream source from tag 'upstream/2.6.0+repack'
Update to upstream version '2.6.0+repack'
with Debian dir 52967dc66c3025ae0e5ce99989c650a8d2a8ebac
Diffstat (limited to 'widgets/mainwindow.cpp')
| -rwxr-xr-x | widgets/mainwindow.cpp | 70 |
1 files changed, 45 insertions, 25 deletions
diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 8e38a601..b0b980a6 100755 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -214,7 +214,7 @@ bool keep_frequency = false; namespace
{
- Radio::Frequency constexpr default_frequency {14076000};
+ Radio::Frequency constexpr default_frequency {14074000};
QRegExp message_alphabet {"[- @A-Za-z0-9+./?#<>;$]*"};
// grid exact match excluding RR73
QRegularExpression grid_regexp {"\\A(?![Rr]{2}73)[A-Ra-r]{2}[0-9]{2}([A-Xa-x]{2}){0,1}\\z"};
@@ -356,7 +356,7 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple, m_appDir {QApplication::applicationDirPath ()},
m_cqStr {""},
m_palette {"Linrad"},
- m_mode {"JT9"},
+ m_mode {"FT8"},
m_rpt {"-15"},
m_pfx {
"1A", "1S",
@@ -804,6 +804,7 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple, config_label.hide ();
}
statusUpdate ();
+ QTimer::singleShot (250, [=] {setRig (m_lastMonitoredFrequency);}); // This is needed for Hamradio Deluxe
});
m_multi_settings->create_menu_actions (this, ui->menuConfig);
m_configurations_button = m_rigErrorMessageBox.addButton (tr ("Configurations...")
@@ -1272,7 +1273,7 @@ void MainWindow::readSettings() ui->actionSplit_ALL_TXT_yearly->setChecked(m_settings->value("splitAllTxtYearly", false).toBool());
ui->actionSplit_ALL_TXT_monthly->setChecked(m_settings->value("splitAllTxtMonthly", false).toBool());
ui->actionDisable_writing_of_ALL_TXT->setChecked(m_settings->value("disableWritingOfAllTxt", false).toBool());
- m_mode=m_settings->value("Mode","JT9").toString();
+ m_mode=m_settings->value("Mode","FT8").toString();
ui->actionNone->setChecked(m_settings->value("SaveNone",true).toBool());
ui->actionSave_decoded->setChecked(m_settings->value("SaveDecoded",false).toBool());
ui->actionSave_all->setChecked(m_settings->value("SaveAll",false).toBool());
@@ -2629,27 +2630,27 @@ void MainWindow::on_stopButton_clicked() //stopButton void MainWindow::on_actionRelease_Notes_triggered ()
{
- QDesktopServices::openUrl (QUrl {"http://physics.princeton.edu/pulsar/k1jt/Release_Notes.txt"});
+ QDesktopServices::openUrl (QUrl {"https://wsjt.sourceforge.io/Release_Notes.txt"});
}
void MainWindow::on_actionFT8_DXpedition_Mode_User_Guide_triggered()
{
- QDesktopServices::openUrl (QUrl {"http://physics.princeton.edu/pulsar/k1jt/FT8_DXpedition_Mode.pdf"});
+ QDesktopServices::openUrl (QUrl {"https://wsjt.sourceforge.io/FT8_DXpedition_Mode.pdf"});
}
void MainWindow::on_actionQSG_FST4_triggered()
{
- QDesktopServices::openUrl (QUrl {"https://physics.princeton.edu/pulsar/k1jt/FST4_Quick_Start.pdf"});
+ QDesktopServices::openUrl (QUrl {"https://wsjt.sourceforge.io/FST4_Quick_Start.pdf"});
}
void MainWindow::on_actionQSG_Q65_triggered()
{
- QDesktopServices::openUrl (QUrl {"https://physics.princeton.edu/pulsar/k1jt/Q65_Quick_Start.pdf"});
+ QDesktopServices::openUrl (QUrl {"https://wsjt.sourceforge.io/Q65_Quick_Start.pdf"});
}
void MainWindow::on_actionQSG_X250_M3_triggered()
{
- QDesktopServices::openUrl (QUrl {"https://physics.princeton.edu/pulsar/k1jt/WSJTX_2.5.0_MAP65_3.0_Quick_Start.pdf"});
+ QDesktopServices::openUrl (QUrl {"https://wsjt.sourceforge.io/WSJTX_2.5.0_MAP65_3.0_Quick_Start.pdf"});
}
void MainWindow::on_actionOnline_User_Guide_triggered() //Display manual
@@ -3895,12 +3896,11 @@ void MainWindow::readFromStdout() //readFromStdout bool bProcessMsgNormally=ui->respondComboBox->currentText()=="CQ: First" or
(ui->respondComboBox->currentText()=="CQ: Max Dist" and m_ActiveStationsWidget==NULL) or
(m_ActiveStationsWidget!=NULL and !m_ActiveStationsWidget->isVisible());
- if (decodedtext.messageWords().length() >= 2) {
- QString t=decodedtext.messageWords()[2];
- if(t.contains("R+") or t.contains("R-") or t=="R" or t=="RRR" or t=="RR73") bProcessMsgNormally=true;
- }
- else {
- bProcessMsgNormally=true;
+ if (decodedtext.messageWords().length() >= 3) {
+ QString t=decodedtext.messageWords()[2];
+ if(t.contains("R+") or t.contains("R-") or t=="R" or t=="RRR" or t=="RR73") bProcessMsgNormally=true;
+ } else {
+ bProcessMsgNormally=true;
}
if(bProcessMsgNormally) {
m_bDoubleClicked=true;
@@ -4314,15 +4314,17 @@ void MainWindow::guiUpdate() if(m_mode=="FT8" and SpecOp::FOX==m_specOp) {
// Don't allow Fox mode in any of the default FT8 sub-bands.
- qint32 ft8Freq[]={1840,3573,7074,10136,14074,18100,21074,24915,28074,50313,70100};
+ qint32 ft8Freq[]={1840000,3573000,7074000,10136000,14074000,18100000,21074000,24915000,28074000,50313000,70154000};
for(int i=0; i<11; i++) {
- int kHzdiff=m_freqNominal/1000 - ft8Freq[i];
- if(qAbs(kHzdiff) < 4) {
+ int kHzdiff=m_freqNominal - ft8Freq[i];
+ if(qAbs(kHzdiff) < 3000 ) {
m_bTxTime=false;
if (m_auto) auto_tx_mode (false);
- auto const& message = tr ("Please choose another dial frequency."
- " WSJT-X will not operate in Fox mode"
- " in the standard FT8 sub-bands.");
+ if (m_tune) stop_tuning();
+ auto const& message = tr ("Please choose another dial frequency.\n"
+ "Must be 3Khz away from %1.\n"
+ "WSJT-X will not operate in Fox mode\n"
+ "overlapping the standard FT8 sub-bands.").arg(ft8Freq[i]);
QTimer::singleShot (0, [=] { // don't block guiUpdate
MessageBox::warning_message (this, tr ("Fox Mode warning"), message);
});
@@ -4590,7 +4592,7 @@ void MainWindow::guiUpdate() if(m_ntx==2 or m_ntx==3) {
QStringList t=ui->tx2->text().split(' ', SkipEmptyParts);
int n=t.size();
- m_xSent=t.at(n-2) + " " + t.at(n-1);
+ if (n > 3) m_xSent=t.at(n-2) + " " + t.at(n-1);
}
}
}
@@ -4779,7 +4781,7 @@ void MainWindow::guiUpdate() //Once per second (onesec)
if(nsec != m_sec0) {
-// qDebug() << "AAA" << nsec << int(m_specOp) << ui->labDXped->text();
+// qDebug() << "AAA" << nsec << m_bFastMode << m_bFast9;
if(m_mode=="FST4") chk_FST4_freq_range();
m_currentBand=m_config.bands()->find(m_freqNominal);
@@ -5374,6 +5376,10 @@ void MainWindow::processMessage (DecodedText const& message, Qt::KeyboardModifie MessageBox::information_message (this, tr ("Should you switch to RTTY contest mode?"));
}
+ // This is necessary to prevent crashes caused by double-clicking messages with <...> in certain QSO situations.
+ if((SpecOp::EU_VHF==m_specOp or SpecOp::RTTY==m_specOp or SpecOp::FIELD_DAY==m_specOp)
+ and message.string().contains("<...>")) return;
+
if(SpecOp::EU_VHF==m_specOp and message_words.at(2).contains(m_baseCall) and
(!message_words.at(3).contains(qso_partner_base_call)) and (!m_bDoubleClicked)) {
return;
@@ -5754,12 +5760,16 @@ void MainWindow::genCQMsg () ( tlist.at(1)==my_callsign or
tlist.at(2)==my_callsign ) and
stdCall(my_callsign)) {
+ if(m_config.Individual_Contest_Name()) {
+ m_cqStr = m_config.Contest_Name();
+ } else {
if(SpecOp::NA_VHF == m_specOp) m_cqStr="TEST";
if(SpecOp::EU_VHF == m_specOp) m_cqStr="TEST";
if(SpecOp::FIELD_DAY == m_specOp) m_cqStr="FD";
if(SpecOp::RTTY == m_specOp) m_cqStr="RU";
if(SpecOp::WW_DIGI == m_specOp) m_cqStr="WW";
if(SpecOp::ARRL_DIGI == m_specOp) m_cqStr="TEST";
+ }
if( tlist.at(1)==my_callsign ) {
t="CQ " + m_cqStr + " " + tlist.at(1) + " " + tlist.at(2);
} else {
@@ -7004,7 +7014,8 @@ void MainWindow::on_actionQ65_triggered() fast_config(false);
WSPR_config(false);
setup_status_bar(true);
-// ui->actionQuickDecode->setChecked(true);
+ m_bFastMode=false;
+ m_bFast9=false;
m_nsps=6912; //For symspec only
m_FFTSize = m_nsps / 2;
Q_EMIT FFTSize(m_FFTSize);
@@ -7030,6 +7041,7 @@ void MainWindow::on_actionQ65_triggered() ui->rh_decodes_title_label->setText(tr ("Average Decodes"));
ui->lh_decodes_headings_label->setText("UTC dB DT Freq " + tr ("Message"));
ui->rh_decodes_headings_label->setText("UTC dB DT Freq " + tr ("Message"));
+ fast_config(m_bFastMode);
statusChanged();
m_specOp=m_config.special_op_id();
@@ -9554,15 +9566,23 @@ list1Done: m_foxQSO[hc].tFoxRrpt = -1; //Have not received R+rpt
m_foxQSO[hc].tFoxTxRR73 = -1; //Have not sent RR73
rm_tb4(hc); //Remove this Hound from tb4
- if(list2.size()==m_Nslots) goto list2Done;
- if(m_foxQSO.count()>=2*m_Nslots) goto list2Done;
+
+ if(list2.size()==m_Nslots) {
+ break;
+ }
+
+ if(m_foxQSO.count()>=5*3 /* could have 5 slots * 3 states ([0-2],4,5) */) {
+ break;
+ }
}
list2Done:
+
n1=list1.size();
n2=list2.size();
n3=qMax(n1,n2);
if(n3>m_Nslots) n3=m_Nslots;
+
for(int i=0; i<n3; i++) {
hc1="";
fm="";
|
