mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-12-23 19:25:37 -05:00
More progress on FoxCalls...
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@8199 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
f01031fed5
commit
d4652ef0e5
20
foxcalls.cpp
20
foxcalls.cpp
@ -14,10 +14,9 @@ FoxCalls::FoxCalls(QSettings * settings, QWidget *parent) :
|
||||
setWindowTitle (QApplication::applicationName () + " - " + tr ("Fox Callers"));
|
||||
installEventFilter(parent); //Installing the filter
|
||||
|
||||
|
||||
//Restore user's settings
|
||||
m_settings->beginGroup("FoxCalls");
|
||||
restoreGeometry (m_settings->value ("geometry", saveGeometry ()).toByteArray ());
|
||||
restoreGeometry (m_settings->value("geometry").toByteArray());
|
||||
}
|
||||
|
||||
FoxCalls::~FoxCalls()
|
||||
@ -35,17 +34,22 @@ void FoxCalls::saveSettings()
|
||||
{
|
||||
//Save user's settings
|
||||
m_settings->beginGroup("FoxCalls");
|
||||
m_settings->setValue ("geometry", saveGeometry ());
|
||||
m_settings->setValue("geometry", saveGeometry());
|
||||
m_settings->endGroup();
|
||||
}
|
||||
|
||||
void FoxCalls::insertText(QString t)
|
||||
{
|
||||
QTextDocument *doc = ui->foxPlainTextEdit->document();
|
||||
QFont font = doc->defaultFont();
|
||||
font.setFamily("Courier New");
|
||||
doc->setDefaultFont(font);
|
||||
qDebug() << font;
|
||||
if(m_bFirst) {
|
||||
QTextDocument *doc = ui->foxPlainTextEdit->document();
|
||||
QFont font = doc->defaultFont();
|
||||
font.setFamily("Courier New");
|
||||
font.setPointSize(12);
|
||||
doc->setDefaultFont(font);
|
||||
ui->label_2->setFont(font);
|
||||
ui->label_2->setText("Call Grid dB Freq Age");
|
||||
m_bFirst=false;
|
||||
}
|
||||
ui->foxPlainTextEdit->setPlainText(t);
|
||||
ui->foxPlainTextEdit->setReadOnly (true);
|
||||
}
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include <QWidget>
|
||||
#include <QScopedPointer>
|
||||
#include <QFont>
|
||||
#include <QDebug>
|
||||
|
||||
namespace Ui {
|
||||
class FoxCalls;
|
||||
@ -30,6 +31,7 @@ private slots:
|
||||
// void on_binsPerPixelSpinBox_valueChanged(int n);
|
||||
|
||||
private:
|
||||
bool m_bFirst=true;
|
||||
QSettings * m_settings;
|
||||
QScopedPointer<Ui::FoxCalls> ui;
|
||||
};
|
||||
|
23
foxcalls.ui
23
foxcalls.ui
@ -17,7 +17,7 @@
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>19</x>
|
||||
<y>60</y>
|
||||
<y>30</y>
|
||||
<width>321</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
@ -78,7 +78,7 @@
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>90</y>
|
||||
<width>511</width>
|
||||
<width>411</width>
|
||||
<height>191</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -89,6 +89,25 @@
|
||||
</font>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>27</x>
|
||||
<y>70</y>
|
||||
<width>341</width>
|
||||
<height>16</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Courier New</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
|
@ -54,10 +54,13 @@ subroutine multimode_decoder(ss,id2,params,nfsample)
|
||||
10 if (params%nagain) then
|
||||
open(13,file=trim(temp_dir)//'/decoded.txt',status='unknown', &
|
||||
position='append',iostat=ios)
|
||||
if(params%nmode.eq.8) open(19,file=trim(temp_dir)//'/foxcalls.txt', &
|
||||
status='unknown',position='append',iostat=ios)
|
||||
else
|
||||
open(13,file=trim(temp_dir)//'/decoded.txt',status='unknown', &
|
||||
iostat=ios)
|
||||
end if
|
||||
open(13,file=trim(temp_dir)//'/decoded.txt',status='unknown',iostat=ios)
|
||||
if(params%nmode.eq.8) open(19,file=trim(temp_dir)//'/foxcalls.txt', &
|
||||
status='unknown',iostat=ios)
|
||||
endif
|
||||
if(ios.ne.0) then
|
||||
nfail=nfail+1
|
||||
if(nfail.le.3) then
|
||||
@ -76,6 +79,15 @@ subroutine multimode_decoder(ss,id2,params,nfsample)
|
||||
logical(params%lapon),params%napwid,params%mycall, &
|
||||
params%mygrid,params%hiscall,params%hisgrid)
|
||||
call timer('decft8 ',1)
|
||||
n15min=minval(n15fox)
|
||||
n15max=maxval(n15fox)
|
||||
print*,nfox,n15min,n15max
|
||||
do i=1,nfox
|
||||
n=n15max-n15fox(i)
|
||||
write(19,1004) c2fox(i),g2fox(i),nsnrfox(i),nfreqfox(i),n
|
||||
1004 format(a12,1x,a4,i5,i6,i5)
|
||||
enddo
|
||||
flush(19)
|
||||
go to 800
|
||||
endif
|
||||
|
||||
@ -400,11 +412,32 @@ contains
|
||||
real, intent(in) :: dt
|
||||
real, intent(in) :: freq
|
||||
character(len=22), intent(in) :: decoded
|
||||
character c2*6,g2*4,w*4
|
||||
integer i1,i2,i3,n15
|
||||
integer, intent(in) :: nap
|
||||
real, intent(in) :: qual
|
||||
character*2 annot
|
||||
character*22 decoded0
|
||||
|
||||
logical isgrid4,first
|
||||
data first/.true./
|
||||
save
|
||||
|
||||
isgrid4(w)=(len_trim(w).eq.4 .and. &
|
||||
ichar(w(1:1)).ge.ichar('A') .and. ichar(w(1:1)).le.ichar('R') .and. &
|
||||
ichar(w(2:2)).ge.ichar('A') .and. ichar(w(2:2)).le.ichar('R') .and. &
|
||||
ichar(w(3:3)).ge.ichar('0') .and. ichar(w(3:3)).le.ichar('9') .and. &
|
||||
ichar(w(4:4)).ge.ichar('0') .and. ichar(w(4:4)).le.ichar('9'))
|
||||
|
||||
if(first) then
|
||||
c2fox=' '
|
||||
g2fox=' '
|
||||
nsnrfox=-99
|
||||
nfreqfox=-99
|
||||
n15z=-99
|
||||
nfox=0
|
||||
first=.false.
|
||||
endif
|
||||
|
||||
decoded0=decoded
|
||||
annot=' '
|
||||
if(nap.ne.0) then
|
||||
@ -415,6 +448,24 @@ contains
|
||||
1000 format(i6.6,i4,f5.1,i5,' ~ ',1x,a22,1x,a2)
|
||||
write(13,1002) params%nutc,nint(sync),snr,dt,freq,0,decoded0
|
||||
1002 format(i6.6,i4,i5,f6.1,f8.0,i4,3x,a22,' FT8')
|
||||
|
||||
i1=index(decoded0,' ')
|
||||
i2=i1 + index(decoded0(i1+1:),' ')
|
||||
i3=i2 + index(decoded0(i2+1:),' ')
|
||||
c2=decoded0(i1+1:i2-1)
|
||||
g2=decoded0(i2+1:i3-1)
|
||||
if(i3-i2.eq.5 .and. isgrid4(g2)) then
|
||||
n=params%nutc
|
||||
n15=(3600*(n/10000) + 60*mod((n/100),100) + mod(n,100))/15
|
||||
nfox=nfox+1
|
||||
c2fox(nfox)=c2
|
||||
g2fox(nfox)=g2
|
||||
nsnrfox(nfox)=snr
|
||||
nfreqfox(nfox)=nint(freq)
|
||||
n15fox(nfox)=n15
|
||||
n15z=n15
|
||||
endif
|
||||
|
||||
call flush(6)
|
||||
call flush(13)
|
||||
|
||||
|
@ -1,5 +1,14 @@
|
||||
module ft8_decode
|
||||
|
||||
parameter (MAXFOX=1000)
|
||||
character*12 c2fox(MAXFOX)
|
||||
character*4 g2fox(MAXFOX)
|
||||
integer nsnrfox(MAXFOX)
|
||||
integer nfreqfox(MAXFOX)
|
||||
integer n15fox(MAXFOX)
|
||||
integer n15z
|
||||
integer nfox
|
||||
|
||||
type :: ft8_decoder
|
||||
procedure(ft8_decode_callback), pointer :: callback
|
||||
contains
|
||||
|
@ -2719,8 +2719,7 @@ void MainWindow::decodeDone ()
|
||||
m_RxLog=0;
|
||||
m_blankLine=true;
|
||||
if(m_config.bFox()) {
|
||||
QFile f(m_config.temp_dir ().absoluteFilePath ("decoded.txt"));
|
||||
|
||||
QFile f(m_config.temp_dir().absoluteFilePath("foxcalls.txt"));
|
||||
if(f.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||
QTextStream s(&f);
|
||||
QString t=s.readAll();
|
||||
@ -3401,8 +3400,6 @@ void MainWindow::guiUpdate()
|
||||
|
||||
//Once per second:
|
||||
if(nsec != m_sec0) {
|
||||
// qDebug() << "a" << m_foxCalls->font();
|
||||
// qDebug() << "b" << ui->decodedTextBrowser->font();
|
||||
if(m_freqNominal!=0 and m_freqNominal<50000000 and m_config.enable_VHF_features()) {
|
||||
if(!m_bVHFwarned) vhfWarning();
|
||||
} else {
|
||||
@ -4754,9 +4751,6 @@ void MainWindow::on_actionFT8_triggered()
|
||||
displayWidgets(nWidgets("111010000100111000010000"));
|
||||
if(m_config.bFox()) {
|
||||
if(!m_foxCalls->isVisible()) {
|
||||
// QStringList headers{"Call","Loc","dB","Freq","UTC"};
|
||||
// m_foxTable->setHorizontalHeaderLabels(headers);
|
||||
// m_foxTable->setGeometry(QRect(100,100,550,400));
|
||||
m_foxCalls->show();
|
||||
}
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user