mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-06-18 06:13:23 -04:00
1. Allow Ftol down to 20 Hz in MSK144 mode.
2. Do not adjust Rx Freq automatically after an MSK144 decode. 3. Insert the Rcvd report in log window. 4. Send MSK144 decodes to PSK Reporter. NB: not all these are fully tested, yet. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7134 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
4fe86cef1e
commit
02ef8823ef
@ -78,8 +78,9 @@ float DecodedText::dt()
|
|||||||
// find and extract any report. Returns true if this is a standard message
|
// find and extract any report. Returns true if this is a standard message
|
||||||
bool DecodedText::report(QString const& myBaseCall, QString const& dxBaseCall, /*mod*/QString& report)
|
bool DecodedText::report(QString const& myBaseCall, QString const& dxBaseCall, /*mod*/QString& report)
|
||||||
{
|
{
|
||||||
QString msg=_string.mid(column_qsoText);
|
QString msg=_string.mid(column_qsoText).trimmed();
|
||||||
if(msg.trimmed().length() < 1) return false;
|
if(msg.length() < 1) return false;
|
||||||
|
msg=(msg+" ").mid(0,22);
|
||||||
int i1=msg.indexOf("\r");
|
int i1=msg.indexOf("\r");
|
||||||
if (i1>0)
|
if (i1>0)
|
||||||
msg=msg.mid(0,i1-1) + " ";
|
msg=msg.mid(0,i1-1) + " ";
|
||||||
@ -102,7 +103,7 @@ bool DecodedText::report(QString const& myBaseCall, QString const& dxBaseCall, /
|
|||||||
if (ok and i1>=-50 and i1<50)
|
if (ok and i1>=-50 and i1<50)
|
||||||
{
|
{
|
||||||
report = tt;
|
report = tt;
|
||||||
// qDebug() << "report for " << _string << "::" << report;
|
qDebug() << "A report for " << _string << "::" << report;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -112,7 +113,7 @@ bool DecodedText::report(QString const& myBaseCall, QString const& dxBaseCall, /
|
|||||||
if(ok and i1>=-50 and i1<50)
|
if(ok and i1>=-50 and i1<50)
|
||||||
{
|
{
|
||||||
report = tt.mid(1);
|
report = tt.mid(1);
|
||||||
// qDebug() << "report for " << _string << "::" << report;
|
qDebug() << "B report for " << _string << "::" << report;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1296,6 +1296,8 @@ void MainWindow::fastSink(qint64 frames)
|
|||||||
message=QString::fromLatin1(line);
|
message=QString::fromLatin1(line);
|
||||||
DecodedText decodedtext;
|
DecodedText decodedtext;
|
||||||
decodedtext=message.replace("\n","");
|
decodedtext=message.replace("\n","");
|
||||||
|
bool stdMsg = decodedtext.report(m_baseCall,
|
||||||
|
Radio::base_callsign(ui->dxCallEntry->text()), m_rptRcvd);
|
||||||
ui->decodedTextBrowser->displayDecodedText (decodedtext,m_baseCall,m_config.DXCC(),
|
ui->decodedTextBrowser->displayDecodedText (decodedtext,m_baseCall,m_config.DXCC(),
|
||||||
m_logBook,m_config.color_CQ(),m_config.color_MyCall(),m_config.color_DXCC(),
|
m_logBook,m_config.color_CQ(),m_config.color_MyCall(),m_config.color_DXCC(),
|
||||||
m_config.color_NewCall());
|
m_config.color_NewCall());
|
||||||
@ -2344,21 +2346,7 @@ void::MainWindow::fast_decode_done()
|
|||||||
|
|
||||||
// extract details and send to PSKreporter
|
// extract details and send to PSKreporter
|
||||||
if(m_config.spot_to_psk_reporter() and stdMsg and !m_diskData) {
|
if(m_config.spot_to_psk_reporter() and stdMsg and !m_diskData) {
|
||||||
QString msgmode=m_mode;
|
sendToPskReporter();
|
||||||
QString deCall;
|
|
||||||
QString grid;
|
|
||||||
decodedtext.deCallAndGrid(/*out*/deCall,grid);
|
|
||||||
int audioFrequency = decodedtext.frequencyOffset();
|
|
||||||
int snr = decodedtext.snr();
|
|
||||||
Frequency frequency = m_freqNominal + audioFrequency;
|
|
||||||
pskSetLocal();
|
|
||||||
if(grid_regexp.exactMatch (grid))
|
|
||||||
{
|
|
||||||
// qDebug() << "To PSKreporter:" << deCall << grid << frequency << msgmode << snr;
|
|
||||||
psk_Reporter->addRemoteStation(deCall,grid,QString::number(frequency),msgmode,
|
|
||||||
QString::number(snr),
|
|
||||||
QString::number(QDateTime::currentDateTime().toTime_t()));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2368,6 +2356,26 @@ void::MainWindow::fast_decode_done()
|
|||||||
m_bFastDone=false;
|
m_bFastDone=false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::sendToPskReporter()
|
||||||
|
{
|
||||||
|
QString msgmode=m_mode;
|
||||||
|
if(m_mode=="JT9+JT65") {
|
||||||
|
msgmode="JT9";
|
||||||
|
if (decodedtext.isJT65()) msgmode="JT65";
|
||||||
|
}
|
||||||
|
QString deCall;
|
||||||
|
QString grid;
|
||||||
|
decodedtext.deCallAndGrid(/*out*/deCall,grid);
|
||||||
|
int audioFrequency = decodedtext.frequencyOffset();
|
||||||
|
int snr = decodedtext.snr();
|
||||||
|
Frequency frequency = m_freqNominal + audioFrequency;
|
||||||
|
pskSetLocal();
|
||||||
|
if(grid_regexp.exactMatch (grid)) {
|
||||||
|
psk_Reporter->addRemoteStation(deCall,grid,QString::number(frequency),msgmode,
|
||||||
|
QString::number(snr),QString::number(QDateTime::currentDateTime().toTime_t()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::writeAllTxt(QString message)
|
void MainWindow::writeAllTxt(QString message)
|
||||||
{
|
{
|
||||||
// Write decoded text to file "ALL.TXT".
|
// Write decoded text to file "ALL.TXT".
|
||||||
@ -2524,22 +2532,7 @@ void MainWindow::readFromStdout() //readFromStdout
|
|||||||
int nsec=QDateTime::currentMSecsSinceEpoch()/1000-m_secBandChanged;
|
int nsec=QDateTime::currentMSecsSinceEpoch()/1000-m_secBandChanged;
|
||||||
bool okToPost=(nsec>50);
|
bool okToPost=(nsec>50);
|
||||||
if(m_config.spot_to_psk_reporter () and stdMsg and !m_diskData and okToPost) {
|
if(m_config.spot_to_psk_reporter () and stdMsg and !m_diskData and okToPost) {
|
||||||
QString msgmode="JT9";
|
sendToPskReporter();
|
||||||
if (decodedtext.isJT65()) msgmode="JT65";
|
|
||||||
QString deCall;
|
|
||||||
QString grid;
|
|
||||||
decodedtext.deCallAndGrid(/*out*/deCall,grid);
|
|
||||||
int audioFrequency = decodedtext.frequencyOffset();
|
|
||||||
int snr = decodedtext.snr();
|
|
||||||
Frequency frequency = m_freqNominal + audioFrequency;
|
|
||||||
pskSetLocal ();
|
|
||||||
if(grid_regexp.exactMatch (grid))
|
|
||||||
{
|
|
||||||
// qDebug() << "To PSKreporter:" << deCall << grid << frequency << msgmode << snr;
|
|
||||||
psk_Reporter->addRemoteStation(deCall,grid,QString::number(frequency),msgmode,
|
|
||||||
QString::number(snr),
|
|
||||||
QString::number(QDateTime::currentDateTime().toTime_t()));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if((m_mode=="JT4" or m_mode=="JT65" or m_mode=="QRA64") and m_msgAvgWidget!=NULL) {
|
if((m_mode=="JT4" or m_mode=="JT65" or m_mode=="QRA64") and m_msgAvgWidget!=NULL) {
|
||||||
@ -3313,18 +3306,17 @@ void MainWindow::processMessage(QString const& messages, int position, bool ctrl
|
|||||||
if(t4.size () < 6) return; //Skip the rest if no decoded text
|
if(t4.size () < 6) return; //Skip the rest if no decoded text
|
||||||
|
|
||||||
int frequency = decodedtext.frequencyOffset();
|
int frequency = decodedtext.frequencyOffset();
|
||||||
if (ui->RxFreqSpinBox->isEnabled ())
|
if(m_mode != "MSK144") {
|
||||||
{
|
if (ui->RxFreqSpinBox->isEnabled()) {
|
||||||
ui->RxFreqSpinBox->setValue (frequency); //Set Rx freq
|
ui->RxFreqSpinBox->setValue (frequency); //Set Rx freq
|
||||||
}
|
}
|
||||||
if (decodedtext.isTX())
|
if (decodedtext.isTX()) {
|
||||||
{
|
if (ctrl && ui->TxFreqSpinBox->isEnabled ()) {
|
||||||
if (ctrl && ui->TxFreqSpinBox->isEnabled ())
|
ui->TxFreqSpinBox->setValue(frequency); //Set Tx freq
|
||||||
{
|
}
|
||||||
ui->TxFreqSpinBox->setValue(frequency); //Set Tx freq
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int nmod=ntsec % (2*m_TRperiod);
|
int nmod=ntsec % (2*m_TRperiod);
|
||||||
m_txFirst=(nmod!=0);
|
m_txFirst=(nmod!=0);
|
||||||
@ -3378,14 +3370,13 @@ void MainWindow::processMessage(QString const& messages, int position, bool ctrl
|
|||||||
}
|
}
|
||||||
|
|
||||||
int i9=m_QSOText.indexOf(decodedtext.string());
|
int i9=m_QSOText.indexOf(decodedtext.string());
|
||||||
if (i9<0 and !decodedtext.isTX())
|
if (i9<0 and !decodedtext.isTX()) {
|
||||||
{
|
|
||||||
decodedtext=t2;
|
decodedtext=t2;
|
||||||
ui->decodedTextBrowser2->displayDecodedText(decodedtext, m_baseCall, false, m_logBook,
|
ui->decodedTextBrowser2->displayDecodedText(decodedtext, m_baseCall, false, m_logBook,
|
||||||
m_config.color_CQ(), m_config.color_MyCall(), m_config.color_DXCC(),
|
m_config.color_CQ(), m_config.color_MyCall(), m_config.color_DXCC(),
|
||||||
m_config.color_NewCall());
|
m_config.color_NewCall());
|
||||||
m_QSOText=decodedtext;
|
m_QSOText=decodedtext;
|
||||||
}
|
}
|
||||||
|
|
||||||
// prior DX call (possible QSO partner)
|
// prior DX call (possible QSO partner)
|
||||||
auto qso_partner_base_call = Radio::base_callsign (ui->dxCallEntry-> text ());
|
auto qso_partner_base_call = Radio::base_callsign (ui->dxCallEntry-> text ());
|
||||||
@ -4062,14 +4053,13 @@ void MainWindow::on_actionMSK144_triggered()
|
|||||||
ui->sbFtol->setVisible(true);
|
ui->sbFtol->setVisible(true);
|
||||||
ui->cbAutoSeq->setVisible(true);
|
ui->cbAutoSeq->setVisible(true);
|
||||||
ui->ClrAvgButton->setVisible(false);
|
ui->ClrAvgButton->setVisible(false);
|
||||||
|
|
||||||
ui->cbShMsgs->setVisible(true);
|
ui->cbShMsgs->setVisible(true);
|
||||||
ui->actionMSK144->setChecked(true);
|
ui->actionMSK144->setChecked(true);
|
||||||
ui->rptSpinBox->setMinimum(-8);
|
ui->rptSpinBox->setMinimum(-8);
|
||||||
ui->rptSpinBox->setMaximum(24);
|
ui->rptSpinBox->setMaximum(24);
|
||||||
ui->rptSpinBox->setValue(0);
|
ui->rptSpinBox->setValue(0);
|
||||||
ui->rptSpinBox->setSingleStep(1);
|
ui->rptSpinBox->setSingleStep(1);
|
||||||
ui->sbFtol->setMinimum(23);
|
ui->sbFtol->setMinimum(22);
|
||||||
ui->sbFtol->setMaximum(25);
|
ui->sbFtol->setMaximum(25);
|
||||||
bool b=m_config.my_callsign()=="K1JT" or m_config.my_callsign()=="K9AN";
|
bool b=m_config.my_callsign()=="K1JT" or m_config.my_callsign()=="K9AN";
|
||||||
ui->cbCQRx->setEnabled(b);
|
ui->cbCQRx->setEnabled(b);
|
||||||
|
@ -534,6 +534,7 @@ private:
|
|||||||
void transmit (double snr = 99.);
|
void transmit (double snr = 99.);
|
||||||
void rigFailure (QString const& reason);
|
void rigFailure (QString const& reason);
|
||||||
void pskSetLocal ();
|
void pskSetLocal ();
|
||||||
|
void sendToPskReporter();
|
||||||
void displayDialFrequency ();
|
void displayDialFrequency ();
|
||||||
void transmitDisplay (bool);
|
void transmitDisplay (bool);
|
||||||
void processMessage(QString const& messages, qint32 position, bool ctrl);
|
void processMessage(QString const& messages, qint32 position, bool ctrl);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user