mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-02-03 09:44:24 -05:00
Fix many odds & ends for merging FST280 properly into the GUI.
This commit is contained in:
parent
f2b460231b
commit
f8d7489b4e
@ -897,7 +897,7 @@ subroutine pack77_03(nwords,w,i3,n3,c77)
|
||||
|
||||
ntx=-1
|
||||
j=len(trim(w(nwords-1)))-1
|
||||
read(w(nwords-1)(1:j),*,err=1) ntx !Number of transmitters
|
||||
read(w(nwords-1)(1:j),*,err=1,end=1) ntx !Number of transmitters
|
||||
1 if(ntx.lt.1 .or. ntx.gt.32) return
|
||||
nclass=ichar(w(nwords-1)(j+1:j+1))-ichar('A')
|
||||
|
||||
|
@ -678,7 +678,8 @@ contains
|
||||
return
|
||||
end subroutine ft4_decoded
|
||||
|
||||
subroutine fst280_decoded (this,nutc,sync,nsnr,dt,freq,decoded,nap,qual)
|
||||
subroutine fst280_decoded (this,nutc,sync,nsnr,dt,freq,decoded,nap, &
|
||||
qual,ntrperiod)
|
||||
|
||||
use fst280_decode
|
||||
implicit none
|
||||
@ -692,6 +693,7 @@ contains
|
||||
character(len=37), intent(in) :: decoded
|
||||
integer, intent(in) :: nap
|
||||
real, intent(in) :: qual
|
||||
integer, intent(in) :: ntrperiod
|
||||
character*2 annot
|
||||
character*37 decoded0
|
||||
|
||||
@ -702,10 +704,17 @@ contains
|
||||
if(qual.lt.0.17) decoded0(37:37)='?'
|
||||
endif
|
||||
|
||||
write(*,1001) nutc,nsnr,dt,nint(freq),decoded0,annot
|
||||
1001 format(i6.6,i4,f5.1,i5,' ` ',1x,a37,1x,a2)
|
||||
write(13,1002) nutc,nint(sync),nsnr,dt,freq,0,decoded0
|
||||
1002 format(i6.6,i4,i5,f6.1,f8.0,i4,3x,a37,' FST280')
|
||||
if(ntrperiod.lt.60) then
|
||||
write(*,1001) nutc,nsnr,dt,nint(freq),decoded0,annot
|
||||
1001 format(i6.6,i4,f5.1,i5,' ` ',1x,a37,1x,a2)
|
||||
write(13,1002) nutc,nint(sync),nsnr,dt,freq,0,decoded0
|
||||
1002 format(i6.6,i4,i5,f6.1,f8.0,i4,3x,a37,' FST280')
|
||||
else
|
||||
write(*,1003) nutc,nsnr,dt,nint(freq),decoded0,annot
|
||||
1003 format(i4.4,i4,f5.1,i5,' ` ',1x,a37,1x,a2)
|
||||
write(13,1004) nutc,nint(sync),nsnr,dt,freq,0,decoded0
|
||||
1004 format(i4.4,i4,i5,f6.1,f8.0,i4,3x,a37,' FST280')
|
||||
endif
|
||||
|
||||
call flush(6)
|
||||
call flush(13)
|
||||
|
@ -7,7 +7,7 @@ module fst280_decode
|
||||
|
||||
abstract interface
|
||||
subroutine fst280_decode_callback (this,nutc,sync,nsnr,dt,freq, &
|
||||
decoded,nap,qual)
|
||||
decoded,nap,qual,ntrperiod)
|
||||
import fst280_decoder
|
||||
implicit none
|
||||
class(fst280_decoder), intent(inout) :: this
|
||||
@ -19,6 +19,7 @@ module fst280_decode
|
||||
character(len=37), intent(in) :: decoded
|
||||
integer, intent(in) :: nap
|
||||
real, intent(in) :: qual
|
||||
integer, intent(in) :: ntrperiod
|
||||
end subroutine fst280_decode_callback
|
||||
end interface
|
||||
|
||||
@ -295,7 +296,7 @@ contains
|
||||
qual=0.
|
||||
fsig=fc_synced - 1.5*hmod*baud
|
||||
call this%callback(nutc,smax1,nsnr,xdt,fsig,msg, &
|
||||
iaptype,qual)
|
||||
iaptype,qual,ntrperiod)
|
||||
goto 2002
|
||||
else
|
||||
cycle
|
||||
|
@ -451,7 +451,8 @@ void DisplayText::displayDecodedText(DecodedText const& decodedText, QString con
|
||||
}
|
||||
|
||||
|
||||
void DisplayText::displayTransmittedText(QString text, QString modeTx, qint32 txFreq,bool bFastMode)
|
||||
void DisplayText::displayTransmittedText(QString text, QString modeTx, qint32 txFreq,
|
||||
bool bFastMode, double TRperiod)
|
||||
{
|
||||
QString t1=" @ ";
|
||||
if(modeTx=="FT4") t1=" + ";
|
||||
@ -459,10 +460,11 @@ void DisplayText::displayTransmittedText(QString text, QString modeTx, qint32 tx
|
||||
if(modeTx=="JT4") t1=" $ ";
|
||||
if(modeTx=="JT65") t1=" # ";
|
||||
if(modeTx=="MSK144") t1=" & ";
|
||||
if(modeTx=="FST280") t1=" ` ";
|
||||
QString t2;
|
||||
t2 = t2.asprintf("%4d",txFreq);
|
||||
QString t;
|
||||
if(bFastMode or modeTx=="FT8" or modeTx=="FT4") {
|
||||
if(bFastMode or modeTx=="FT8" or modeTx=="FT4" or (TRperiod<60)) {
|
||||
t = QDateTime::currentDateTimeUtc().toString("hhmmss") + \
|
||||
" Tx " + t2 + t1 + text;
|
||||
} else if(modeTx.mid(0,6)=="FT8fox") {
|
||||
|
@ -31,7 +31,7 @@ public:
|
||||
void displayDecodedText(DecodedText const& decodedText, QString const& myCall, QString const& mode,
|
||||
bool displayDXCCEntity, LogBook const& logBook,
|
||||
QString const& currentBand=QString {}, bool ppfx=false, bool bCQonly=false);
|
||||
void displayTransmittedText(QString text, QString modeTx, qint32 txFreq, bool bFastMode);
|
||||
void displayTransmittedText(QString text, QString modeTx, qint32 txFreq, bool bFastMode, double TRperiod);
|
||||
void displayQSY(QString text);
|
||||
void displayFoxToBeCalled(QString t, QColor bg = QColor {}, QColor fg = QColor {});
|
||||
void new_period ();
|
||||
|
@ -2890,9 +2890,9 @@ void MainWindow::decode() //decode()
|
||||
imin=imin % 60;
|
||||
if(m_TRperiod>=60) imin=imin - (imin % (int(m_TRperiod)/60));
|
||||
dec_data.params.nutc=100*ihr + imin;
|
||||
if(m_mode=="ISCAT" or m_mode=="MSK144" or m_bFast9 or m_mode=="FT8" or m_mode=="FT4") {
|
||||
if(m_TRperiod < 60) {
|
||||
qint64 ms=1000.0*(2.0-m_TRperiod);
|
||||
if(m_mode=="FT4") ms=1000.0*(2.0-m_TRperiod);
|
||||
if(m_mode=="FST280") ms=1000.0*(6.0-m_TRperiod);
|
||||
//Adjust for FT8 early decode:
|
||||
if(m_mode=="FT8" and m_ihsym==m_earlyDecode and !m_diskData) ms+=(m_hsymStop-m_earlyDecode)*288;
|
||||
if(m_mode=="FT8" and m_ihsym==m_earlyDecode2 and !m_diskData) ms+=(m_hsymStop-m_earlyDecode2)*288;
|
||||
@ -3244,7 +3244,7 @@ void MainWindow::readFromStdout() //readFromStdout
|
||||
//Right (Rx Frequency) window
|
||||
bool bDisplayRight=bAvgMsg;
|
||||
int audioFreq=decodedtext.frequencyOffset();
|
||||
if(m_mode=="FT8" or m_mode=="FT4") {
|
||||
if(m_mode=="FT8" or m_mode=="FT4" or m_mode=="FST280") {
|
||||
auto const& parts = decodedtext.string().remove("<").remove(">")
|
||||
.split (' ', SkipEmptyParts);
|
||||
if (parts.size() > 6) {
|
||||
@ -3327,7 +3327,8 @@ void MainWindow::readFromStdout() //readFromStdout
|
||||
|
||||
//### I think this is where we are preventing Hounds from spotting Fox ###
|
||||
if(m_mode!="FT8" or (SpecOp::HOUND != m_config.special_op_id())) {
|
||||
if(m_mode=="FT8" or m_mode=="FT4" or m_mode=="QRA64" or m_mode=="JT4" or m_mode=="JT65" or m_mode=="JT9") {
|
||||
if(m_mode=="FT8" or m_mode=="FT4" or m_mode=="QRA64" or m_mode=="JT4"
|
||||
or m_mode=="JT65" or m_mode=="JT9" or m_mode=="FST280") {
|
||||
auto_sequence (decodedtext, 25, 50);
|
||||
}
|
||||
|
||||
@ -3927,7 +3928,7 @@ void MainWindow::guiUpdate()
|
||||
write_all("Tx",m_currentMessage);
|
||||
if (m_config.TX_messages ()) {
|
||||
ui->decodedTextBrowser2->displayTransmittedText(m_currentMessage,m_modeTx,
|
||||
ui->TxFreqSpinBox->value(),m_bFastMode);
|
||||
ui->TxFreqSpinBox->value(),m_bFastMode,m_TRperiod);
|
||||
}
|
||||
}
|
||||
|
||||
@ -4030,7 +4031,7 @@ void MainWindow::guiUpdate()
|
||||
|
||||
if (m_config.TX_messages () && !m_tune && SpecOp::FOX!=m_config.special_op_id()) {
|
||||
ui->decodedTextBrowser2->displayTransmittedText(current_message, m_modeTx,
|
||||
ui->TxFreqSpinBox->value(),m_bFastMode);
|
||||
ui->TxFreqSpinBox->value(),m_bFastMode,m_TRperiod);
|
||||
}
|
||||
// }
|
||||
|
||||
@ -5824,12 +5825,13 @@ void MainWindow::on_actionFST280_triggered()
|
||||
WSPR_config(false);
|
||||
bool bVHF=m_config.enable_VHF_features();
|
||||
// 012345678901234567890123456789012
|
||||
displayWidgets(nWidgets("111011000000111100010000000000000"));
|
||||
displayWidgets(nWidgets("111011000100111100010000000100000"));
|
||||
setup_status_bar (bVHF);
|
||||
m_TRperiod = ui->sbTR->value ();
|
||||
ui->sbTR->setMinimum(15);
|
||||
ui->sbTR->setMaximum(300);
|
||||
on_sbTR_valueChanged(ui->sbTR->value());
|
||||
ui->cbAutoSeq->setChecked(true);
|
||||
statusChanged();
|
||||
}
|
||||
|
||||
@ -5872,7 +5874,6 @@ void MainWindow::on_actionFT4_triggered()
|
||||
m_wideGraph->setModeTx(m_modeTx);
|
||||
m_send_RR73=true;
|
||||
VHF_features_enabled(bVHF);
|
||||
// ui->cbAutoSeq->setChecked(false);
|
||||
m_fastGraph->hide();
|
||||
m_wideGraph->show();
|
||||
ui->decodedTextLabel2->setText(" UTC dB DT Freq " + tr ("Message"));
|
||||
@ -8256,7 +8257,7 @@ void MainWindow::on_cbFirst_toggled(bool b)
|
||||
void MainWindow::on_cbAutoSeq_toggled(bool b)
|
||||
{
|
||||
if(!b) ui->cbFirst->setChecked(false);
|
||||
ui->cbFirst->setVisible((m_mode=="FT8" or m_mode=="FT4") and b);
|
||||
ui->cbFirst->setVisible((m_mode=="FT8" or m_mode=="FT4" or m_mode=="FST280") and b);
|
||||
}
|
||||
|
||||
void MainWindow::on_measure_check_box_stateChanged (int state)
|
||||
@ -8819,7 +8820,7 @@ void MainWindow::foxGenWaveform(int i,QString fm)
|
||||
QString txModeArg;
|
||||
txModeArg = txModeArg.asprintf("FT8fox %d",i+1);
|
||||
ui->decodedTextBrowser2->displayTransmittedText(fm.trimmed(), txModeArg,
|
||||
ui->TxFreqSpinBox->value()+60*i,m_bFastMode);
|
||||
ui->TxFreqSpinBox->value()+60*i,m_bFastMode,m_TRperiod);
|
||||
foxcom_.i3bit[i]=0;
|
||||
if(fm.indexOf("<")>0) foxcom_.i3bit[i]=1;
|
||||
strncpy(&foxcom_.cmsg[i][0],fm.toLatin1(),40); //Copy this message into cmsg[i]
|
||||
|
@ -415,7 +415,16 @@ void CPlotter::DrawOverlay() //DrawOverlay()
|
||||
float bw=9.0*12000.0/m_nsps; //JT9
|
||||
if(m_mode=="FT4") bw=3*12000.0/576.0; //FT4 ### (3x, or 4x???) ###
|
||||
if(m_mode=="FT8") bw=7*12000.0/1920.0; //FT8
|
||||
|
||||
if(m_mode=="FST280") {
|
||||
int h=int(pow(2.0,m_nSubMode));
|
||||
int nsps=800;
|
||||
if(m_TRperiod==30) nsps=1680;
|
||||
if(m_TRperiod==60) nsps=4000;
|
||||
if(m_TRperiod==120) nsps=8400;
|
||||
if(m_TRperiod==300) nsps=21504;
|
||||
float baud=12000.0/nsps;
|
||||
bw=3.0*h*baud;
|
||||
}
|
||||
if(m_mode=="JT4") { //JT4
|
||||
bw=3*11025.0/2520.0; //Max tone spacing (3/4 of actual BW)
|
||||
if(m_nSubMode==1) bw=2*bw;
|
||||
@ -492,7 +501,7 @@ void CPlotter::DrawOverlay() //DrawOverlay()
|
||||
int yTxTop=12;
|
||||
int yRxBottom=yTxTop + 2*yh + 4;
|
||||
if(m_mode=="JT9" or m_mode=="JT65" or m_mode=="JT9+JT65"
|
||||
or m_mode=="QRA64" or m_mode=="FT8" or m_mode=="FT4") {
|
||||
or m_mode=="QRA64" or m_mode=="FT8" or m_mode=="FT4" or m_mode=="FST280") {
|
||||
|
||||
if(m_mode=="QRA64" or (m_mode=="JT65" and m_bVHF)) {
|
||||
painter0.setPen(penGreen);
|
||||
@ -529,7 +538,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" or m_mode=="QRA64" or m_mode=="FT8"
|
||||
or m_mode=="FT4") {
|
||||
or m_mode=="FT4" or m_mode=="FST280") {
|
||||
painter0.setPen(penRed);
|
||||
x1=XfromFreq(m_txFreq);
|
||||
x2=XfromFreq(m_txFreq+bw);
|
||||
|
Loading…
Reference in New Issue
Block a user