From adcffe3db4bb81d6ef704ce599b377a7e4fd5ba3 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Fri, 27 Jul 2018 09:30:00 -0400 Subject: [PATCH] Pass "nContest" value to ft8_decode.f90. --- Configuration.hpp | 1 - lib/decoder.f90 | 3 ++- lib/ft8_decode.f90 | 4 ++-- mainwindow.cpp | 16 +++++++++++++--- mainwindow.h | 11 ++++++++++- 5 files changed, 27 insertions(+), 8 deletions(-) diff --git a/Configuration.hpp b/Configuration.hpp index 8fc8e53a2..11dafeb58 100644 --- a/Configuration.hpp +++ b/Configuration.hpp @@ -139,7 +139,6 @@ public: bool bEU_VHF_Contest() const; bool x2ToneSpacing() const; bool x4ToneSpacing() const; - bool contestMode() const; bool MyDx() const; bool CQMyN() const; bool NDxG() const; diff --git a/lib/decoder.f90 b/lib/decoder.f90 index 911f8b9ba..24e960b0d 100644 --- a/lib/decoder.f90 +++ b/lib/decoder.f90 @@ -93,9 +93,10 @@ subroutine multimode_decoder(ss,id2,params,nfsample) ! We're in FT8 mode call timer('decft8 ',0) newdat=params%newdat + ncontest=iand(params%nexp_decode,7) call my_ft8%decode(ft8_decoded,id2,params%nQSOProgress,params%nfqso, & params%nftx,newdat,params%nutc,params%nfa,params%nfb, & - params%ndepth,logical(params%nagain), & + params%ndepth,ncontest,logical(params%nagain), & logical(params%lft8apon),logical(params%lapcqonly), & logical(params%ldecode77),params%napwid, & mycall,hiscall,hisgrid) diff --git a/lib/ft8_decode.f90 b/lib/ft8_decode.f90 index fd9e30c44..beeffd722 100644 --- a/lib/ft8_decode.f90 +++ b/lib/ft8_decode.f90 @@ -33,8 +33,8 @@ module ft8_decode contains subroutine decode(this,callback,iwave,nQSOProgress,nfqso,nftx,newdat, & - nutc,nfa,nfb,ndepth,nagain,lft8apon,lapcqonly,ldecode77,napwid, & - mycall12,hiscall12,hisgrid6) + nutc,nfa,nfb,ndepth,ncontest,nagain,lft8apon,lapcqonly,ldecode77, & + napwid,mycall12,hiscall12,hisgrid6) ! use wavhdr use timer_module, only: timer include 'ft8/ft8_params.f90' diff --git a/mainwindow.cpp b/mainwindow.cpp index 31e4519e5..8aae87b06 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1162,6 +1162,16 @@ void MainWindow::readSettings() m_settings->endGroup (); if (displayMsgAvg) on_actionMessage_averaging_triggered(); + setContestType(); +} + +void MainWindow::setContestType() +{ + m_nContest=NONE; + if(m_config.bNA_VHF_Contest()) m_nContest=NA_VHF; + if(m_config.bEU_VHF_Contest()) m_nContest=EU_VHF; + if(m_config.bFieldDay()) m_nContest=FIELD_DAY; + if(m_config.bRTTYroundup()) m_nContest=RTTY; } void MainWindow::set_application_font (QFont const& font) @@ -1667,6 +1677,7 @@ void MainWindow::on_actionSettings_triggered() //Setup Dialog ui->actionEnable_AP_JT65->setVisible(false); } m_opCall=m_config.opCall(); + setContestType(); } } @@ -2678,7 +2689,7 @@ void MainWindow::decode() //decode() dec_data.params.emedelay=0.0; if(m_config.decode_at_52s()) dec_data.params.emedelay=2.5; dec_data.params.minSync=ui->syncSpinBox->isVisible () ? m_minSync : 0; - dec_data.params.nexp_decode=0; + dec_data.params.nexp_decode=m_nContest; if(m_config.single_decode()) dec_data.params.nexp_decode += 32; if(m_config.enable_VHF_features()) dec_data.params.nexp_decode += 64; dec_data.params.ldecode77 = m_config.bDecode77(); @@ -3658,8 +3669,7 @@ void MainWindow::guiUpdate() //Once per second: if(nsec != m_sec0) { -// qDebug() << "OneSec:" << m_config.bGenerate77() << m_config.bDecode77() -// << m_config.FieldDayExchange() << m_config.RTTYExchange() << m_config.bRTTYroundup(); +// qDebug() << "OneSec:" << m_nContest; if(m_freqNominal!=0 and m_freqNominal<50000000 and m_config.enable_VHF_features()) { if(!m_bVHFwarned) vhfWarning(); } else { diff --git a/mainwindow.h b/mainwindow.h index ef86e279d..250918853 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -293,6 +293,7 @@ private slots: void on_pbFoxReset_clicked(); void on_comboBoxHoundSort_activated (int index); void not_GA_warning_message (); + void setContestType(); private: Q_SIGNAL void initializeAudioOutputStream (QAudioDeviceInfo, @@ -506,7 +507,15 @@ private: ROGERS, SIGNOFF } - m_QSOProgress; + m_QSOProgress; //State machine counter + + enum { + NONE, + NA_VHF, + EU_VHF, + FIELD_DAY, + RTTY + } m_nContest; //Contest type int m_ihsym; int m_nzap;