Some progress in QRA01 --> QRA02. Correct minor flaws in mode setting and plotter.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6829 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2016-06-30 12:46:14 +00:00
parent 5536f72c17
commit b05833bbfb
2 changed files with 33 additions and 22 deletions

View File

@ -748,9 +748,6 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
on_actionWide_Waterfall_triggered();
m_wideGraph->setTol(500);
m_wideGraph->setLockTxFreq(m_lockTxFreq);
m_wideGraph->setMode(m_mode);
m_wideGraph->setModeTx(m_modeTx);
ui->sbSubmode->setValue(m_nSubMode);
ui->sbFtol->setValue(m_FtolIndex);
on_sbFtol_valueChanged(m_FtolIndex);
ui->cbEME->setChecked(m_bEME);
@ -833,6 +830,10 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
ui->actionMSK144->setEnabled(false); }
}
//###
m_wideGraph->setMode(m_mode);
m_wideGraph->setModeTx(m_modeTx);
ui->sbSubmode->setValue(m_nSubMode);
// this must be the last statement of constructor
if (!m_valid) throw std::runtime_error {"Fatal initialization exception"};
}
@ -2377,7 +2378,8 @@ void MainWindow::guiUpdate()
txDuration=0.0;
if(m_modeTx=="JT4") txDuration=1.0 + 207.0*2520/11025.0; // JT4
if(m_modeTx=="JT9") txDuration=1.0 + 85.0*m_nsps/12000.0; // JT9
if(m_modeTx=="JT65" or m_mode=="QRA65") txDuration=1.0 + 126*4096/11025.0; // JT65 or QRA65
if(m_modeTx=="JT65") txDuration=1.0 + 126*4096/11025.0; // JT65
if(m_mode=="QRA65") txDuration=1.0 + 84*6912/12000.0; // QRA65
if(m_mode=="WSPR-2") txDuration=2.0 + 162*8192/12000.0; // WSPR
if(m_mode=="ISCAT" or m_mode=="JTMSK" or m_mode=="MSK144" or m_bFast9) {
txDuration=m_TRperiod-0.25; // ISCAT, JT9-fast, JTMSK, MSK144
@ -2555,7 +2557,7 @@ void MainWindow::guiUpdate()
&m_currentMessageType, len1, len1);
if(m_modeTx=="JT65") gen65_(message, &ichk, msgsent, const_cast<int *> (itone),
&m_currentMessageType, len1, len1);
if(m_modeTx=="QRA65") genqra65_(message, &ichk, msgsent, const_cast<int *> (itone),
if(m_mode=="QRA65") genqra65_(message, &ichk, msgsent, const_cast<int *> (itone),
&m_currentMessageType, len1, len1);
if(m_mode.startsWith ("WSPR")) genwspr_(message, msgsent, const_cast<int *> (itone),
len1, len1);
@ -3787,7 +3789,7 @@ void MainWindow::on_actionQRA65_triggered()
mode_label->setStyleSheet("QLabel{background-color: #99ff33}");
QString t1=(QString)QChar(short(m_nSubMode+65));
// mode_label->setText(m_mode + " " + t1);
mode_label->setText("QRA01 " + t1);
mode_label->setText("QRA02 " + t1);
}
@ -4685,6 +4687,7 @@ void MainWindow::transmit (double snr)
if(m_nSubMode==0) toneSpacing=12000.0/6912.0;
if(m_nSubMode==1) toneSpacing=2*12000.0/6912.0;
if(m_nSubMode==2) toneSpacing=4*12000.0/6912.0;
qDebug() << "b" << m_modeTx << itone[0]<< itone[1]<< itone[2]<< itone[3]<< itone[4]<< itone[5] ;
Q_EMIT sendMessage (NUM_QRA65_SYMBOLS,
6912.0, ui->TxFreqSpinBox->value () - m_XIT,
toneSpacing, m_soundOutput, m_config.audio_output_channel (),

View File

@ -222,11 +222,11 @@ void CPlotter::draw(float swide[], bool bScroll) //dr
x1=XfromFreq(m_rxFreq+750);
painter2D.drawText(x1-4,y,"73");
}
update(); //trigger a new paintEvent
update(); //trigger a new paintEvent
m_bScaleOK=true;
}
void CPlotter::DrawOverlay() //DrawOverlay()
void CPlotter::DrawOverlay() //DrawOverlay()
{
if(m_OverlayPixmap.isNull()) return;
if(m_WaterfallPixmap.isNull()) return;
@ -238,10 +238,10 @@ void CPlotter::DrawOverlay() //DrawOverlay()
QRect rect;
QPen penOrange(QColor(255,165,0),3);
QPen penGreen(Qt::green, 3); //Mark Tol range with green line
QPen penRed(Qt::red, 3); //Mark Tx freq with red
QPen penRed(Qt::red, 3); //Mark Tx freq with red
QPainter painter(&m_OverlayPixmap);
painter.initFrom(this);
QLinearGradient gradient(0, 0, 0 ,m_h2); //fill background with gradient
QLinearGradient gradient(0, 0, 0 ,m_h2); //fill background with gradient
gradient.setColorAt(1, Qt::black);
gradient.setColorAt(0, Qt::darkBlue);
painter.setBrush(gradient);
@ -344,21 +344,29 @@ void CPlotter::DrawOverlay() //DrawOverlay()
}
}
if(m_modeTx=="JT9" and m_nSubMode>0) { //JT9
if(m_modeTx=="JT9" and m_nSubMode>0) { //JT9
bw=8.0*12000.0/m_nsps;
if(m_nSubMode==1) bw=2*bw;
if(m_nSubMode==2) bw=4*bw;
if(m_nSubMode==3) bw=8*bw;
if(m_nSubMode==4) bw=16*bw;
if(m_nSubMode==5) bw=32*bw;
if(m_nSubMode==6) bw=64*bw;
if(m_nSubMode==7) bw=128*bw;
if(m_nSubMode==1) bw=2*bw; //B
if(m_nSubMode==2) bw=4*bw; //C
if(m_nSubMode==3) bw=8*bw; //D
if(m_nSubMode==4) bw=16*bw; //E
if(m_nSubMode==5) bw=32*bw; //F
if(m_nSubMode==6) bw=64*bw; //G
if(m_nSubMode==7) bw=128*bw; //H
}
if(m_mode=="QRA65") { //QRA65
bw=63.0*12000.0/m_nsps;
if(m_nSubMode==1) bw=2*bw; //B
if(m_nSubMode==2) bw=4*bw; //C
if(m_nSubMode==3) bw=8*bw; //D
if(m_nSubMode==4) bw=16*bw; //E
}
if(m_modeTx=="JT65") { //JT65
bw=65.0*11025.0/4096.0;
if(m_nSubMode==1) bw=2*bw;
if(m_nSubMode==2) bw=4*bw;
if(m_nSubMode==1) bw=2*bw; //B
if(m_nSubMode==2) bw=4*bw; //C
}
painter0.setPen(penGreen);
@ -367,7 +375,7 @@ void CPlotter::DrawOverlay() //DrawOverlay()
x2=XfromFreq(1600);
painter0.drawLine(x1,29,x2,29);
}
if(m_mode=="JT9" or m_mode=="JT65" or m_mode=="JT9+JT65") {
if(m_mode=="JT9" or m_mode=="JT65" or m_mode=="JT9+JT65" or m_mode=="QRA65") {
if(g_single_decode and m_mode=="JT65") {
painter0.setPen(penGreen);
@ -399,7 +407,7 @@ void CPlotter::DrawOverlay() //DrawOverlay()
}
if(m_mode=="JT9" or m_mode=="JT65" or m_mode=="JT9+JT65" or
m_mode.mid(0,4)=="WSPR") {
m_mode.mid(0,4)=="WSPR" or m_mode=="QRA65") {
painter0.setPen(penRed);
x1=XfromFreq(m_txFreq);
x2=XfromFreq(m_txFreq+bw);