SVN r8568
This commit is contained in:
@@ -1,75 +0,0 @@
|
||||
subroutine jt9a()
|
||||
use, intrinsic :: iso_c_binding, only: c_f_pointer
|
||||
use prog_args
|
||||
use timer_module, only: timer
|
||||
use timer_impl, only: init_timer !, limtrace
|
||||
|
||||
include 'jt9com.f90'
|
||||
|
||||
! These routines connect the shared memory region to the decoder.
|
||||
interface
|
||||
function address_jt9()
|
||||
use, intrinsic :: iso_c_binding, only: c_ptr
|
||||
type(c_ptr) :: address_jt9
|
||||
end function address_jt9
|
||||
end interface
|
||||
|
||||
integer*1 attach_jt9
|
||||
! integer*1 lock_jt9,unlock_jt9
|
||||
integer size_jt9
|
||||
! Multiple instances:
|
||||
character*80 mykey
|
||||
type(dec_data), pointer :: shared_data
|
||||
type(params_block) :: local_params
|
||||
logical fileExists
|
||||
|
||||
! Multiple instances:
|
||||
i0 = len(trim(shm_key))
|
||||
|
||||
call init_timer (trim(data_dir)//'/timer.out')
|
||||
! open(23,file=trim(data_dir)//'/CALL3.TXT',status='unknown')
|
||||
|
||||
! limtrace=-1 !Disable all calls to timer()
|
||||
|
||||
! Multiple instances: set the shared memory key before attaching
|
||||
mykey=trim(repeat(shm_key,1))
|
||||
i0 = len(mykey)
|
||||
i0=setkey_jt9(trim(mykey))
|
||||
|
||||
i1=attach_jt9()
|
||||
|
||||
10 inquire(file=trim(temp_dir)//'/.lock',exist=fileExists)
|
||||
if(fileExists) then
|
||||
call sleep_msec(100)
|
||||
go to 10
|
||||
endif
|
||||
|
||||
inquire(file=trim(temp_dir)//'/.quit',exist=fileExists)
|
||||
if(fileExists) then
|
||||
i1=detach_jt9()
|
||||
go to 999
|
||||
endif
|
||||
if(i1.eq.999999) stop !Silence compiler warning
|
||||
|
||||
nbytes=size_jt9()
|
||||
if(nbytes.le.0) then
|
||||
print*,'jt9a: Shared memory mem_jt9 does not exist.'
|
||||
print*,"Must start 'jt9 -s <thekey>' from within WSJT-X."
|
||||
go to 999
|
||||
endif
|
||||
call c_f_pointer(address_jt9(),shared_data)
|
||||
local_params=shared_data%params !save a copy because wsjtx carries on accessing
|
||||
call flush(6)
|
||||
call timer('decoder ',0)
|
||||
call multimode_decoder(shared_data%ss,shared_data%id2,local_params,12000)
|
||||
call timer('decoder ',1)
|
||||
|
||||
100 inquire(file=trim(temp_dir)//'/.lock',exist=fileExists)
|
||||
if(fileExists) go to 10
|
||||
call sleep_msec(100)
|
||||
go to 100
|
||||
|
||||
999 call timer('decoder ',101)
|
||||
|
||||
return
|
||||
end subroutine jt9a
|
||||
@@ -1,54 +0,0 @@
|
||||
// Status=review
|
||||
|
||||
[[FIG_BAND_SETTINGS]]
|
||||
image::settings-frequencies.png[align="center",alt="Frequency Screen"]
|
||||
|
||||
_Working Frequencies_: By default the *Working Frequencies* table
|
||||
contains a list of frequencies conventionally used for modes JT4, JT9,
|
||||
JT65, MSK144, WSPR, and Echo. Conventions may change with time or
|
||||
by user preference; you can modify the frequency table as desired.
|
||||
|
||||
- To change an existing entry, click to select it, type a desired
|
||||
frequency in MHz, and hit *Enter* on the keyboard. The program will
|
||||
format your frequency value appropriately and add a band designator.
|
||||
|
||||
- To add a new entry, right-click anywhere on the frequency table and
|
||||
select *Insert*. Enter a frequency in MHz in the popup box and select
|
||||
the desired mode (or leave the Mode selection blank). Then click
|
||||
*OK*. The table may include more than one frequency for a given band.
|
||||
|
||||
- To delete an entry, right-click it and select *Delete*.
|
||||
|
||||
- Click the *Reset* button to return the table to its default
|
||||
configuration.
|
||||
|
||||
_Frequency Calibration_: If you have calibrated your radio using WWV
|
||||
or other reliable frequency references, or perhaps with the technique
|
||||
described in {fmt_wspr}, enter the measured values for _Intercept_ A
|
||||
and _Slope_ B in the equation
|
||||
|
||||
Dial error = A + B*f
|
||||
|
||||
where "`Dial error`" and A are in Hz, f is frequency in MHz, and B is
|
||||
in parts per million (ppm). Frequency values sent to the radio and
|
||||
received from it will then be adjusted so that frequencies displayed
|
||||
by _WSJT-X_ are accurate.
|
||||
|
||||
_Station Information_: You can save *Band*, *Offset* and *Antenna
|
||||
Description* information for your station. The antenna information
|
||||
will be included in reception reports sent to {pskreporter}. By
|
||||
default the frequency offset for each band is zero. Nonzero offsets
|
||||
may be added if (for example) a <<VHF_SETUP,transverter>> is in use.
|
||||
|
||||
- To simplify things you might want to delete any unwanted bands --
|
||||
for example, bands where you have no equipment. Then click on a
|
||||
*Frequency* entry and type *Ctrl+A* to "`select all,`" and
|
||||
drag-and-drop the entries onto the _Station Information_ table. You
|
||||
can then add any transverter offsets and antenna details.
|
||||
|
||||
- To avoid typing the same information many times, you can
|
||||
drag-and-drop entries between the lines of the _Station Information_
|
||||
table.
|
||||
|
||||
- When all settings have been configured to your liking, click *OK* to
|
||||
dismiss the *Settings* window.
|
||||
@@ -1,125 +0,0 @@
|
||||
#include "BeaconsModel.hpp"
|
||||
|
||||
#include <QStandardItem>
|
||||
#include <QFont>
|
||||
|
||||
namespace
|
||||
{
|
||||
char const * const headings[] = {
|
||||
QT_TRANSLATE_NOOP ("BeaconsModel", "Client"),
|
||||
QT_TRANSLATE_NOOP ("BeaconsModel", "Time"),
|
||||
QT_TRANSLATE_NOOP ("BeaconsModel", "Snr"),
|
||||
QT_TRANSLATE_NOOP ("BeaconsModel", "DT"),
|
||||
QT_TRANSLATE_NOOP ("BeaconsModel", "Frequency"),
|
||||
QT_TRANSLATE_NOOP ("BeaconsModel", "Drift"),
|
||||
QT_TRANSLATE_NOOP ("BeaconsModel", "Callsign"),
|
||||
QT_TRANSLATE_NOOP ("BeaconsModel", "Grid"),
|
||||
QT_TRANSLATE_NOOP ("BeaconsModel", "Power"),
|
||||
};
|
||||
|
||||
QFont text_font {"Courier", 10};
|
||||
|
||||
QList<QStandardItem *> make_row (QString const& client_id, QTime time, qint32 snr, float delta_time
|
||||
, Frequency frequency, qint32 drift, QString const& callsign
|
||||
, QString const& grid, qint32 power)
|
||||
{
|
||||
auto time_item = new QStandardItem {time.toString ("hh:mm")};
|
||||
time_item->setData (time);
|
||||
time_item->setTextAlignment (Qt::AlignRight);
|
||||
|
||||
auto snr_item = new QStandardItem {QString::number (snr)};
|
||||
snr_item->setData (snr);
|
||||
snr_item->setTextAlignment (Qt::AlignRight);
|
||||
|
||||
auto dt = new QStandardItem {QString::number (delta_time)};
|
||||
dt->setData (delta_time);
|
||||
dt->setTextAlignment (Qt::AlignRight);
|
||||
|
||||
auto freq = new QStandardItem {Radio::pretty_frequency_MHz_string (frequency)};
|
||||
freq->setData (frequency);
|
||||
freq->setTextAlignment (Qt::AlignRight);
|
||||
|
||||
auto dri = new QStandardItem {QString::number (drift)};
|
||||
dri->setData (drift);
|
||||
dri->setTextAlignment (Qt::AlignRight);
|
||||
|
||||
auto gd = new QStandardItem {grid};
|
||||
gd->setTextAlignment (Qt::AlignRight);
|
||||
|
||||
auto pwr = new QStandardItem {QString::number (power)};
|
||||
pwr->setData (power);
|
||||
pwr->setTextAlignment (Qt::AlignRight);
|
||||
|
||||
QList<QStandardItem *> row {
|
||||
new QStandardItem {client_id}, time_item, snr_item, dt, freq, dri, new QStandardItem {callsign}, gd, pwr};
|
||||
Q_FOREACH (auto& item, row)
|
||||
{
|
||||
item->setEditable (false);
|
||||
item->setFont (text_font);
|
||||
item->setTextAlignment (item->textAlignment () | Qt::AlignVCenter);
|
||||
}
|
||||
return row;
|
||||
}
|
||||
}
|
||||
|
||||
BeaconsModel::BeaconsModel (QObject * parent)
|
||||
: QStandardItemModel {0, 9, parent}
|
||||
{
|
||||
int column {0};
|
||||
for (auto const& heading : headings)
|
||||
{
|
||||
setHeaderData (column++, Qt::Horizontal, tr (heading));
|
||||
}
|
||||
}
|
||||
|
||||
void BeaconsModel::add_beacon_spot (bool is_new, QString const& client_id, QTime time, qint32 snr, float delta_time
|
||||
, Frequency frequency, qint32 drift, QString const& callsign
|
||||
, QString const& grid, qint32 power)
|
||||
{
|
||||
if (!is_new)
|
||||
{
|
||||
int target_row {-1};
|
||||
for (auto row = 0; row < rowCount (); ++row)
|
||||
{
|
||||
if (data (index (row, 0)).toString () == client_id)
|
||||
{
|
||||
auto row_time = item (row, 1)->data ().toTime ();
|
||||
if (row_time == time
|
||||
&& item (row, 2)->data ().toInt () == snr
|
||||
&& item (row, 3)->data ().toFloat () == delta_time
|
||||
&& item (row, 4)->data ().value<Frequency> () == frequency
|
||||
&& data (index (row, 5)).toInt () == drift
|
||||
&& data (index (row, 6)).toString () == callsign
|
||||
&& data (index (row, 7)).toString () == grid
|
||||
&& data (index (row, 8)).toInt () == power)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (time <= row_time)
|
||||
{
|
||||
target_row = row; // last row with same time
|
||||
}
|
||||
}
|
||||
}
|
||||
if (target_row >= 0)
|
||||
{
|
||||
insertRow (target_row + 1, make_row (client_id, time, snr, delta_time, frequency, drift, callsign, grid, power));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
appendRow (make_row (client_id, time, snr, delta_time, frequency, drift, callsign, grid, power));
|
||||
}
|
||||
|
||||
void BeaconsModel::clear_decodes (QString const& client_id)
|
||||
{
|
||||
for (auto row = rowCount () - 1; row >= 0; --row)
|
||||
{
|
||||
if (data (index (row, 0)).toString () == client_id)
|
||||
{
|
||||
removeRow (row);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#include "moc_BeaconsModel.cpp"
|
||||
Reference in New Issue
Block a user