From 8b81b734fba64a497243516faf9b22bae7193e8d Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Tue, 5 Nov 2013 16:34:32 +0000 Subject: [PATCH] Correct some flaws in the new code to support the IQ+ XT. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@3596 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- map65.iss | 2 +- plotter.cpp | 12 ++++-------- plotter.h | 1 - soundin.cpp | 2 +- widegraph.cpp | 17 ++++++++++++----- 5 files changed, 18 insertions(+), 16 deletions(-) diff --git a/map65.iss b/map65.iss index c5d89f4ed..d87c75c10 100644 --- a/map65.iss +++ b/map65.iss @@ -1,6 +1,6 @@ [Setup] AppName=MAP65 -AppVerName=MAP65 Version 2.4.1 r3120 +AppVerName=MAP65 Version 2.5 r3595 AppCopyright=Copyright (C) 2001-2013 by Joe Taylor, K1JT DefaultDirName=c:\MAP65 DefaultGroupName=MAP65 diff --git a/plotter.cpp b/plotter.cpp index 297b6b99d..356464a30 100644 --- a/plotter.cpp +++ b/plotter.cpp @@ -29,6 +29,7 @@ CPlotter::CPlotter(QWidget *parent) : //CPlotter Constructor m_ZoomScalePixmap = QPixmap(0,0); m_Size = QSize(0,0); m_fQSO = 125; + m_TXkHz = m_fQSO; m_line = 0; m_fSample = 96000; m_paintAllZoom = false; @@ -535,6 +536,8 @@ void CPlotter::setFQSO(int x, bool bf) //setFQSO() m_fQSO = int(FreqfromX(x)+0.5); m_xClick=x; } + if(m_bLockTxRx) m_TXkHz=m_fQSO; + m_TXfreq = floor(datcom_.fcenter) + 0.001*m_TXkHz; DrawOverlay(); update(); } @@ -562,15 +565,12 @@ void CPlotter::mousePressEvent(QMouseEvent *event) //mousePressEvent if(y < h+30) { // Wideband waterfall if(button==1) { setFQSO(x,false); - if(m_bLockTxRx) m_TXkHz=m_fQSO; - qDebug() << "c" << m_bLockTxRx << m_fQSO << m_TXkHz; } if(button==2 and !m_bLockTxRx) { if(x<0) x=0; // x is pixel number if(x>m_Size.width()) x=m_Size.width(); m_TXkHz = int(FreqfromX(x)+0.5); m_TXfreq = floor(datcom_.fcenter) + 0.001*m_TXkHz; - setTxFreq(m_TXfreq); } } else { // Zoomed waterfall if(button==1) m_DF=int(m_ZoomStartFreq + x*m_fSample/32768.0); @@ -741,11 +741,6 @@ double CPlotter::fGreen() return m_fGreen; } -void CPlotter::setTxFreq(double dfreq) -{ - qDebug() << "SetTxFreq()" << dfreq; -} - void CPlotter::setLockTxRx(bool b) { m_bLockTxRx=b; @@ -760,5 +755,6 @@ void CPlotter::setLockTxRx(bool b) double CPlotter::txFreq() { + qDebug() << "Q" << m_TXfreq << m_TxDF; return m_TXfreq + 0.000001*m_TxDF; } diff --git a/plotter.h b/plotter.h index 6bce409da..0f5d967b4 100644 --- a/plotter.h +++ b/plotter.h @@ -56,7 +56,6 @@ public: void setBinsPerPixel(int n); int binsPerPixel(); void setFQSO(int n, bool bf); - void setTxFreq(double dfreq); void setFcal(int n); void setNkhz(int n); void DrawOverlay(); diff --git a/soundin.cpp b/soundin.cpp index e8493f4c6..093a4e4ce 100644 --- a/soundin.cpp +++ b/soundin.cpp @@ -213,7 +213,7 @@ void SoundInThread::run() //SoundInThread::run() udata.b10db=m_10db; if(m_monitoring) { if(m_bForceCenterFreq) { - datcom_.fcenter=m_dForceCenterFreq;\ + datcom_.fcenter=m_dForceCenterFreq; } else { datcom_.fcenter=144.125; } diff --git a/widegraph.cpp b/widegraph.cpp index 67b00d979..f13413bfb 100644 --- a/widegraph.cpp +++ b/widegraph.cpp @@ -335,9 +335,11 @@ void WideGraph::on_cbLockTxRx_stateChanged(int n) void WideGraph::rx570() { double f=m_mult570*(1.0+0.000001*m_cal570)*m_dForceCenterFreq; - qDebug() << "Set Rx Freq" << m_dForceCenterFreq << f; + qDebug() << "Set Rx Freq" << f; #ifdef WIN32 - int iret=set570(f); +// int iret=set570(f); + int iret=0; + if(iret != 0) { QMessageBox mb; if(iret==-1) mb.setText("Failed to open Si570."); @@ -349,11 +351,16 @@ void WideGraph::rx570() void WideGraph::tx570() { - double f=floor(datcom_.fcenter) + ui->widePlot->txFreq(); + if(m_bForceCenterFreq) datcom_.fcenter=m_dForceCenterFreq; + + double f=ui->widePlot->txFreq(); double f1=m_mult570Tx*(1.0+0.000001*m_cal570) * f; - qDebug() << "Set Tx Freq" << f << f1; + int nHz = 1000000.0*f1 + 0.5; + qDebug() << "Set Tx Freq" << f1 << nHz; #ifdef WIN32 - int iret=set570(f1); +// int iret=set570(f1); + int iret=0; + if(iret != 0) { QMessageBox mb; if(iret==-1) mb.setText("Failed to open Si570.");