From 80d7de8839e26226ea3ba73f56d4259e6ab06385 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Fri, 24 Feb 2023 09:35:26 -0500 Subject: [PATCH] Must update m_fAdd in QMAP's SoundInThread, after devsetup finishes. --- qmap/astro.cpp | 4 +++- qmap/mainwindow.cpp | 3 ++- qmap/soundin.cpp | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/qmap/astro.cpp b/qmap/astro.cpp index 65b6519d9..974473ebd 100644 --- a/qmap/astro.cpp +++ b/qmap/astro.cpp @@ -71,6 +71,7 @@ void Astro::astroUpdate(QDateTime t, QString mygrid, QString hisgrid, &dgrd, &poloffset, &xnr, 6, 6); datcom_.ndop00=ndop00; //Send self Doppler to decoder, via datcom +// qDebug() << "aa" << isec << datcom_.fcenter << nfreq << ndop00; sprintf(cc, "Az: %6.1f\n" "El: %6.1f\n" @@ -81,11 +82,12 @@ void Astro::astroUpdate(QDateTime t, QString mygrid, QString hisgrid, "Dec: %6.1f\n" "SunAz: %6.1f\n" "SunEl: %6.1f\n" + "Freq: %6d\n" "Tsky: %6d\n" "MNR: %6.1f\n" "Dgrd: %6.1f", azmoon,elmoon,ndop00,azmoondx,elmoondx,ndop,decmoon,azsun,elsun, - ntsky,xnr,dgrd); + nfreq,ntsky,xnr,dgrd); ui->astroTextBrowser->setText(" "+ date + "\nUTC: " + utc + "\n" + cc); double azOffset=0.0; diff --git a/qmap/mainwindow.cpp b/qmap/mainwindow.cpp index 7d59a8e20..3f623f940 100644 --- a/qmap/mainwindow.cpp +++ b/qmap/mainwindow.cpp @@ -457,6 +457,7 @@ void MainWindow::on_actionSettings_triggered() m_timeout=dlg.m_timeout; m_fCal=dlg.m_fCal; m_fAdd=dlg.m_fAdd; + soundInThread.setFadd(m_fAdd); m_wide_graph_window->setFcal(m_fCal); m_fs96000=dlg.m_fs96000; m_network=dlg.m_network; @@ -469,7 +470,6 @@ void MainWindow::on_actionSettings_triggered() soundInThread.wait(1000); soundInThread.setNetwork(m_network); soundInThread.setRate(96000.0); - soundInThread.setFadd(m_fAdd); soundInThread.setNrx(1); soundInThread.start(QThread::HighestPriority); } @@ -946,6 +946,7 @@ void MainWindow::guiUpdate() ui->labFreq->setText(t1); if(nsec != m_sec0) { //Once per second +// qDebug() << "AAA" << nsec << m_fAdd; static int n60z=99; int n60=nsec%60; int itest[5]; diff --git a/qmap/soundin.cpp b/qmap/soundin.cpp index 2c194a809..ebd8d2962 100644 --- a/qmap/soundin.cpp +++ b/qmap/soundin.cpp @@ -211,7 +211,7 @@ void SoundInThread::inputUDP() int nsam=-1; recvpkt_(&nsam, &b.iblk, &b.nrx, &k, b.d8, b.d8); datcom_.fcenter=b.cfreq + m_fAdd; -// qDebug() << "aaa" << b.cfreq << m_fAdd << datcom_.fcenter; +// qDebug() << "bb" << b.cfreq << m_fAdd << datcom_.fcenter; } m_hsym=(k-2048)*11025.0/(2048.0*m_rate);