mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-22 04:11:16 -05:00
Use a timer to establish length of an FT2 (to be FT4?) transmission.
This commit is contained in:
parent
7b7857cd77
commit
50c1daf61f
@ -459,6 +459,7 @@ set (wsjt_FSRCS
|
||||
lib/gen65.f90
|
||||
lib/gen9.f90
|
||||
lib/geniscat.f90
|
||||
lib/fsk4hf/genft2.f90
|
||||
lib/ft8/genft8.f90
|
||||
lib/genmsk_128_90.f90
|
||||
lib/genmsk40.f90
|
||||
|
@ -47,8 +47,6 @@ void Modulator::start (unsigned symbolsLength, double framesPerSymbol,
|
||||
SoundOutput * stream, Channel channel,
|
||||
bool synchronize, bool fastMode, double dBSNR, int TRperiod)
|
||||
{
|
||||
// qDebug() << "Mod AA" << symbolsLength << framesPerSymbol << frequency
|
||||
// << toneSpacing << synchronize << fastMode << dBSNR << TRperiod;
|
||||
Q_ASSERT (stream);
|
||||
// Time according to this computer which becomes our base time
|
||||
qint64 ms0 = QDateTime::currentMSecsSinceEpoch() % 86400000;
|
||||
@ -319,6 +317,8 @@ qint64 Modulator::readData (char * data, qint64 maxSize)
|
||||
|
||||
m_frequency0 = m_frequency;
|
||||
// done for this chunk - continue on next call
|
||||
// qint64 ms1=QDateTime::currentMSecsSinceEpoch() - m_ms0;
|
||||
// if(m_ic>=4*144*160) qDebug() << "Modulator finished" << m_ic << 0.001*ms1;
|
||||
return framesGenerated * bytesPerFrame ();
|
||||
}
|
||||
// fall through
|
||||
|
@ -33,6 +33,7 @@ public:
|
||||
void setSpread(double s) {m_fSpread=s;}
|
||||
void setTRPeriod(unsigned p) {m_period=p;}
|
||||
void set_nsym(int n) {m_symbolsLength=n;}
|
||||
void set_ms0(qint64 ms) {m_ms0=ms;}
|
||||
|
||||
Q_SLOT void start (unsigned symbolsLength, double framesPerSymbol, double frequency,
|
||||
double toneSpacing, SoundOutput *, Channel = Mono,
|
||||
@ -73,6 +74,7 @@ private:
|
||||
double m_fSpread;
|
||||
|
||||
qint64 m_silentFrames;
|
||||
qint64 m_ms0;
|
||||
qint32 m_TRperiod;
|
||||
qint16 m_ramp;
|
||||
|
||||
|
@ -463,7 +463,7 @@ void DisplayText::displayTransmittedText(QString text, QString modeTx, qint32 tx
|
||||
QString t2;
|
||||
t2.sprintf("%4d",txFreq);
|
||||
QString t;
|
||||
if(bFastMode or modeTx=="FT8") {
|
||||
if(bFastMode or modeTx=="FT8" or modeTx=="FT2") {
|
||||
t = QDateTime::currentDateTimeUtc().toString("hhmmss") + \
|
||||
" Tx " + t2 + t1 + text;
|
||||
} else if(modeTx.mid(0,6)=="FT8fox") {
|
||||
|
@ -727,6 +727,10 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
|
||||
connect(&m_guiTimer, &QTimer::timeout, this, &MainWindow::guiUpdate);
|
||||
m_guiTimer.start(100); //### Don't change the 100 ms! ###
|
||||
|
||||
|
||||
FT2_TxTimer.setSingleShot(true);
|
||||
connect(&FT2_TxTimer, &QTimer::timeout, this, &MainWindow::stopTx);
|
||||
|
||||
ptt0Timer.setSingleShot(true);
|
||||
connect(&ptt0Timer, &QTimer::timeout, this, &MainWindow::stopTx2);
|
||||
|
||||
@ -3553,7 +3557,7 @@ void MainWindow::guiUpdate()
|
||||
Q_EMIT m_config.transceiver_ptt (true); //Assert the PTT
|
||||
m_tx_when_ready = true;
|
||||
}
|
||||
if(!m_bTxTime and !m_tune) m_btxok=false; //Time to stop transmitting
|
||||
if(!m_bTxTime and !m_tune and m_mode!="FT2") m_btxok=false; //Time to stop transmitting
|
||||
}
|
||||
|
||||
if(m_mode.startsWith ("WSPR") and
|
||||
@ -3695,7 +3699,7 @@ void MainWindow::guiUpdate()
|
||||
}
|
||||
}
|
||||
|
||||
m_currentMessage = QString::fromLatin1(msgsent);
|
||||
if(m_mode!="FT2") m_currentMessage = QString::fromLatin1(msgsent);
|
||||
m_bCallingCQ = CALLING == m_QSOProgress
|
||||
|| m_currentMessage.contains (QRegularExpression {"^(CQ|QRZ) "});
|
||||
if(m_mode=="FT8") {
|
||||
@ -3925,6 +3929,7 @@ void MainWindow::guiUpdate()
|
||||
if(SpecOp::FOX==m_config.special_op_id() and ui->tabWidget->currentIndex()==2 and foxcom_.nslots==1) {
|
||||
t=m_fm1.trimmed();
|
||||
}
|
||||
if(m_mode=="FT2") t="Tx: "+ m_currentMessage;
|
||||
tx_status_label.setText(t.trimmed());
|
||||
}
|
||||
}
|
||||
@ -4000,7 +4005,6 @@ void MainWindow::startTx2()
|
||||
ui->decodedTextBrowser->appendText(t);
|
||||
}
|
||||
write_all("Tx",m_currentMessage);
|
||||
// write_transmit_entry ("ALL_WSPR.TXT");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -7217,7 +7221,8 @@ void MainWindow::replyToCQ (QTime time, qint32 snr, float delta_time, quint32 de
|
||||
}
|
||||
|
||||
QString format_string {"%1 %2 %3 %4 %5 %6"};
|
||||
auto const& time_string = time.toString ("~" == mode || "&" == mode ? "hhmmss" : "hhmm");
|
||||
auto const& time_string = time.toString ("~" == mode || "&" == mode
|
||||
|| "+" == mode ? "hhmmss" : "hhmm");
|
||||
auto message_line = format_string
|
||||
.arg (time_string)
|
||||
.arg (snr, 3)
|
||||
@ -8650,7 +8655,10 @@ void MainWindow::ft2_tx(int ntx)
|
||||
int itype=-1;
|
||||
genft2_(message, &ichk, msgsent, const_cast<int *>(itone), &itype, 37, 37);
|
||||
msgsent[37]=0;
|
||||
m_currentMessage = QString::fromLatin1(msgsent);
|
||||
m_currentMessage = QString::fromLatin1(msgsent).trimmed();
|
||||
tx_status_label.setStyleSheet("QLabel{background-color: #ffff33}");
|
||||
tx_status_label.setText("TX: " + m_currentMessage);
|
||||
|
||||
on_txb6_clicked();
|
||||
auto_tx_mode(true);
|
||||
|
||||
@ -8660,6 +8668,9 @@ void MainWindow::ft2_tx(int ntx)
|
||||
setXIT (ui->TxFreqSpinBox->value ());
|
||||
Q_EMIT m_config.transceiver_ptt (true); //Assert the PTT
|
||||
m_tx_when_ready = true;
|
||||
qint64 ms=QDateTime::currentMSecsSinceEpoch();
|
||||
m_modulator->set_ms0(ms);
|
||||
FT2_TxTimer.start(2200); //Slightly more than FT2 transmission length
|
||||
|
||||
if (g_iptt == 1 && m_iptt0 == 0) {
|
||||
auto const& current_message = QString::fromLatin1 (msgsent);
|
||||
|
@ -581,6 +581,7 @@ private:
|
||||
QTimer minuteTimer;
|
||||
QTimer splashTimer;
|
||||
QTimer p1Timer;
|
||||
QTimer FT2_TxTimer;
|
||||
|
||||
QString m_path;
|
||||
QString m_baseCall;
|
||||
|
Loading…
Reference in New Issue
Block a user