2017-12-25 13:52:16 -05:00
|
|
|
//---------------------------------------------------------- MainWindow
|
2012-05-22 13:09:48 -04:00
|
|
|
#include "mainwindow.h"
|
2020-09-24 12:57:06 -04:00
|
|
|
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
#include <cinttypes>
|
2018-12-06 00:41:16 -05:00
|
|
|
#include <cstring>
|
2018-12-06 12:11:57 -05:00
|
|
|
#include <cmath>
|
2015-03-17 13:35:39 -04:00
|
|
|
#include <limits>
|
2016-06-09 19:39:41 -04:00
|
|
|
#include <functional>
|
2017-02-20 21:13:13 -05:00
|
|
|
#include <fstream>
|
|
|
|
#include <iterator>
|
2018-11-25 17:13:15 -05:00
|
|
|
#include <algorithm>
|
2016-06-10 11:54:16 -04:00
|
|
|
#include <fftw3.h>
|
2019-06-25 09:35:58 -04:00
|
|
|
#include <QApplication>
|
2018-12-06 00:41:16 -05:00
|
|
|
#include <QStringListModel>
|
|
|
|
#include <QSettings>
|
|
|
|
#include <QKeyEvent>
|
2020-11-06 13:28:59 -05:00
|
|
|
#include <QProcessEnvironment>
|
2018-12-06 00:41:16 -05:00
|
|
|
#include <QSharedMemory>
|
|
|
|
#include <QFileDialog>
|
|
|
|
#include <QTextBlock>
|
|
|
|
#include <QProgressBar>
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
#include <QLineEdit>
|
2014-09-25 07:36:01 -04:00
|
|
|
#include <QRegExpValidator>
|
|
|
|
#include <QRegExp>
|
2016-06-28 11:53:50 -04:00
|
|
|
#include <QRegularExpression>
|
2014-10-04 07:47:03 -04:00
|
|
|
#include <QDesktopServices>
|
|
|
|
#include <QUrl>
|
2014-12-02 19:06:54 -05:00
|
|
|
#include <QStandardPaths>
|
2014-10-04 07:47:03 -04:00
|
|
|
#include <QDir>
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
#include <QDebug>
|
|
|
|
#include <QtConcurrent/QtConcurrentRun>
|
2015-02-14 19:48:38 -05:00
|
|
|
#include <QProgressDialog>
|
2015-04-15 12:40:49 -04:00
|
|
|
#include <QHostInfo>
|
2015-06-25 18:41:13 -04:00
|
|
|
#include <QVector>
|
2015-12-16 15:55:19 -05:00
|
|
|
#include <QCursor>
|
|
|
|
#include <QToolTip>
|
2016-04-17 19:39:12 -04:00
|
|
|
#include <QAction>
|
2019-01-14 14:47:08 -05:00
|
|
|
#include <QButtonGroup>
|
2016-04-17 19:39:12 -04:00
|
|
|
#include <QActionGroup>
|
2016-08-06 09:52:14 -04:00
|
|
|
#include <QSplashScreen>
|
2018-10-24 19:00:19 -04:00
|
|
|
#include <QUdpSocket>
|
2018-12-09 17:47:45 -05:00
|
|
|
#include <QAbstractItemView>
|
2019-05-28 07:18:54 -04:00
|
|
|
#include <QInputDialog>
|
2020-06-13 11:04:41 -04:00
|
|
|
#if QT_VERSION >= QT_VERSION_CHECK (5, 15, 0)
|
|
|
|
#include <QRandomGenerator>
|
|
|
|
#endif
|
2014-03-28 22:51:07 -04:00
|
|
|
|
2014-04-13 13:22:12 -04:00
|
|
|
#include "revision_utils.hpp"
|
2015-06-08 10:30:31 -04:00
|
|
|
#include "qt_helpers.hpp"
|
2019-07-02 11:19:43 -04:00
|
|
|
#include "Network/NetworkAccessManager.hpp"
|
2019-07-02 13:45:05 -04:00
|
|
|
#include "Audio/soundout.h"
|
|
|
|
#include "Audio/soundin.h"
|
|
|
|
#include "Modulator/Modulator.hpp"
|
2019-07-02 11:19:43 -04:00
|
|
|
#include "Detector/Detector.hpp"
|
2012-05-22 13:09:48 -04:00
|
|
|
#include "plotter.h"
|
2015-06-04 12:42:38 -04:00
|
|
|
#include "echoplot.h"
|
|
|
|
#include "echograph.h"
|
2015-11-17 20:28:12 -05:00
|
|
|
#include "fastplot.h"
|
|
|
|
#include "fastgraph.h"
|
2012-05-22 13:09:48 -04:00
|
|
|
#include "about.h"
|
2015-04-22 13:48:03 -04:00
|
|
|
#include "messageaveraging.h"
|
2018-08-25 11:19:43 -04:00
|
|
|
#include "colorhighlighting.h"
|
2012-05-22 13:09:48 -04:00
|
|
|
#include "widegraph.h"
|
|
|
|
#include "sleep.h"
|
2013-03-21 13:22:32 -04:00
|
|
|
#include "logqso.h"
|
2019-07-02 13:45:05 -04:00
|
|
|
#include "Decoder/decodedtext.h"
|
2015-03-14 15:13:18 -04:00
|
|
|
#include "Radio.hpp"
|
2018-11-07 12:49:45 -05:00
|
|
|
#include "models/Bands.hpp"
|
2019-07-02 11:19:43 -04:00
|
|
|
#include "Transceiver/TransceiverFactory.hpp"
|
2018-11-07 12:49:45 -05:00
|
|
|
#include "models/StationList.hpp"
|
|
|
|
#include "validators/LiveFrequencyValidator.hpp"
|
2019-07-02 11:19:43 -04:00
|
|
|
#include "Network/MessageClient.hpp"
|
2019-07-02 13:45:05 -04:00
|
|
|
#include "Network/wsprnet.h"
|
2015-06-25 18:41:13 -04:00
|
|
|
#include "signalmeter.h"
|
|
|
|
#include "HelpTextWindow.hpp"
|
2015-12-24 06:41:05 -05:00
|
|
|
#include "SampleDownloader.hpp"
|
2016-01-11 10:00:53 -05:00
|
|
|
#include "Audio/BWFFile.hpp"
|
2016-04-17 19:39:12 -04:00
|
|
|
#include "MultiSettings.hpp"
|
2018-11-07 12:49:45 -05:00
|
|
|
#include "validators/MaidenheadLocatorValidator.hpp"
|
|
|
|
#include "validators/CallsignValidator.hpp"
|
2019-07-02 14:00:32 -04:00
|
|
|
#include "EqualizationToolsDialog.hpp"
|
2019-07-02 13:45:05 -04:00
|
|
|
#include "Network/LotWUsers.hpp"
|
2018-10-25 22:24:36 -04:00
|
|
|
#include "logbook/AD1CCty.hpp"
|
2018-11-07 12:49:45 -05:00
|
|
|
#include "models/FoxLog.hpp"
|
2018-11-11 23:44:03 -05:00
|
|
|
#include "models/CabrilloLog.hpp"
|
2018-11-07 18:55:15 -05:00
|
|
|
#include "FoxLogWindow.hpp"
|
2018-11-11 23:44:03 -05:00
|
|
|
#include "CabrilloLogWindow.hpp"
|
|
|
|
#include "ExportCabrillo.h"
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
#include "ui_mainwindow.h"
|
2014-04-16 11:15:46 -04:00
|
|
|
#include "moc_mainwindow.cpp"
|
2012-05-22 13:09:48 -04:00
|
|
|
|
2015-12-17 15:29:55 -05:00
|
|
|
extern "C" {
|
|
|
|
//----------------------------------------------------- C and Fortran routines
|
2020-06-17 19:28:44 -04:00
|
|
|
void symspec_(struct dec_data *, int* k, double* trperiod, int* nsps, int* ingain,
|
2019-02-25 15:04:05 -05:00
|
|
|
bool* bLowSidelobes, int* minw, float* px, float s[], float* df3,
|
2020-07-23 10:58:10 -04:00
|
|
|
int* nhsym, int* npts8, float *m_pxmax, int* npct);
|
2015-12-17 15:29:55 -05:00
|
|
|
|
2016-09-24 20:16:29 -04:00
|
|
|
void hspec_(short int d2[], int* k, int* nutc0, int* ntrperiod, int* nrxfreq, int* ntol,
|
2020-03-19 11:43:22 -04:00
|
|
|
bool* bmsk144, bool* btrain, double const pcoeffs[], int* ingain,
|
2017-02-23 11:21:26 -05:00
|
|
|
char mycall[], char hiscall[], bool* bshmsg, bool* bswl, char ddir[], float green[],
|
2020-03-19 12:04:56 -04:00
|
|
|
float s[], int* jh, float *pxmax, float *rmsNoGain, char line[],
|
|
|
|
fortran_charlen_t, fortran_charlen_t, fortran_charlen_t, fortran_charlen_t);
|
2015-12-17 15:29:55 -05:00
|
|
|
|
2018-11-05 11:59:48 -05:00
|
|
|
void genft8_(char* msg, int* i3, int* n3, char* msgsent, char ft8msgbits[],
|
|
|
|
int itone[], fortran_charlen_t, fortran_charlen_t);
|
2017-06-19 16:38:03 -04:00
|
|
|
|
2019-04-18 15:16:39 -04:00
|
|
|
void genft4_(char* msg, int* ichk, char* msgsent, char ft4msgbits[], int itone[],
|
2019-01-18 16:22:25 -05:00
|
|
|
fortran_charlen_t, fortran_charlen_t);
|
|
|
|
|
2020-07-23 13:51:05 -04:00
|
|
|
void genfst4_(char* msg, int* ichk, char* msgsent, char fst4msgbits[],
|
2020-06-19 15:02:05 -04:00
|
|
|
int itone[], int* iwspr, fortran_charlen_t, fortran_charlen_t);
|
|
|
|
|
2019-04-12 18:11:26 -04:00
|
|
|
void gen_ft8wave_(int itone[], int* nsym, int* nsps, float* bt, float* fsample, float* f0,
|
2019-02-22 13:39:39 -05:00
|
|
|
float xjunk[], float wave[], int* icmplx, int* nwave);
|
|
|
|
|
2019-02-21 12:10:27 -05:00
|
|
|
void gen_ft4wave_(int itone[], int* nsym, int* nsps, float* fsample, float* f0,
|
2019-04-18 15:15:24 -04:00
|
|
|
float xjunk[], float wave[], int* icmplx, int* nwave);
|
2019-02-21 12:10:27 -05:00
|
|
|
|
2020-07-23 13:51:05 -04:00
|
|
|
void gen_fst4wave_(int itone[], int* nsym, int* nsps, int* nwave, float* fsample,
|
2020-06-19 15:02:05 -04:00
|
|
|
int* hmod, float* f0, int* icmplx, float xjunk[], float wave[]);
|
|
|
|
|
2015-12-17 15:29:55 -05:00
|
|
|
void gen4_(char* msg, int* ichk, char* msgsent, int itone[],
|
2018-02-22 18:36:29 -05:00
|
|
|
int* itext, fortran_charlen_t, fortran_charlen_t);
|
2015-12-17 15:29:55 -05:00
|
|
|
|
|
|
|
void gen9_(char* msg, int* ichk, char* msgsent, int itone[],
|
2018-02-22 18:36:29 -05:00
|
|
|
int* itext, fortran_charlen_t, fortran_charlen_t);
|
2015-12-17 15:29:55 -05:00
|
|
|
|
2018-09-19 11:19:40 -04:00
|
|
|
void genmsk_128_90_(char* msg, int* ichk, char* msgsent, int itone[], int* itype,
|
2018-07-11 14:42:48 -04:00
|
|
|
fortran_charlen_t, fortran_charlen_t);
|
2016-06-03 11:45:54 -04:00
|
|
|
|
2015-12-17 15:29:55 -05:00
|
|
|
void gen65_(char* msg, int* ichk, char* msgsent, int itone[],
|
2018-02-22 18:36:29 -05:00
|
|
|
int* itext, fortran_charlen_t, fortran_charlen_t);
|
2015-12-17 15:29:55 -05:00
|
|
|
|
2016-07-02 08:15:41 -04:00
|
|
|
void genqra64_(char* msg, int* ichk, char* msgsent, int itone[],
|
2018-02-22 18:36:29 -05:00
|
|
|
int* itext, fortran_charlen_t, fortran_charlen_t);
|
2016-06-28 10:56:02 -04:00
|
|
|
|
2018-02-22 18:36:29 -05:00
|
|
|
void genwspr_(char* msg, char* msgsent, int itone[], fortran_charlen_t, fortran_charlen_t);
|
2015-12-17 15:29:55 -05:00
|
|
|
|
2018-02-22 18:36:29 -05:00
|
|
|
void geniscat_(char* msg, char* msgsent, int itone[], fortran_charlen_t, fortran_charlen_t);
|
2015-12-17 15:29:55 -05:00
|
|
|
|
|
|
|
void azdist_(char* MyGrid, char* HisGrid, double* utch, int* nAz, int* nEl,
|
|
|
|
int* nDmiles, int* nDkm, int* nHotAz, int* nHotABetter,
|
2018-02-22 18:36:29 -05:00
|
|
|
fortran_charlen_t, fortran_charlen_t);
|
2015-12-17 15:29:55 -05:00
|
|
|
|
2018-02-22 18:36:29 -05:00
|
|
|
void morse_(char* msg, int* icw, int* ncw, fortran_charlen_t);
|
2015-12-17 15:29:55 -05:00
|
|
|
|
|
|
|
int ptt_(int nport, int ntx, int* iptt, int* nopen);
|
|
|
|
|
|
|
|
void wspr_downsample_(short int d2[], int* k);
|
2017-01-04 14:07:35 -05:00
|
|
|
|
2018-02-22 18:36:29 -05:00
|
|
|
int savec2_(char* fname, int* TR_seconds, double* dial_freq, fortran_charlen_t);
|
2015-12-17 15:29:55 -05:00
|
|
|
|
|
|
|
void avecho_( short id2[], int* dop, int* nfrit, int* nqual, float* f1,
|
|
|
|
float* level, float* sigdb, float* snr, float* dfreq,
|
|
|
|
float* width);
|
|
|
|
|
2019-06-30 07:17:17 -04:00
|
|
|
void fast_decode_(short id2[], int narg[], double * trperiod,
|
2016-09-01 17:50:52 -04:00
|
|
|
char msg[], char mycall[], char hiscall[],
|
2018-02-22 18:36:29 -05:00
|
|
|
fortran_charlen_t, fortran_charlen_t, fortran_charlen_t);
|
2016-02-23 14:37:38 -05:00
|
|
|
void degrade_snr_(short d2[], int* n, float* db, float* bandwidth);
|
2017-01-04 14:07:35 -05:00
|
|
|
|
2016-01-11 10:00:43 -05:00
|
|
|
void wav12_(short d2[], short d1[], int* nbytes, short* nbitsam2);
|
2017-01-04 14:07:35 -05:00
|
|
|
|
2017-07-15 20:10:37 -04:00
|
|
|
void refspectrum_(short int d2[], bool* bclearrefspec,
|
2018-02-22 18:36:29 -05:00
|
|
|
bool* brefspec, bool* buseref, const char* c_fname, fortran_charlen_t);
|
2017-01-04 14:07:35 -05:00
|
|
|
|
2017-01-05 13:35:26 -05:00
|
|
|
void freqcal_(short d2[], int* k, int* nkhz,int* noffset, int* ntol,
|
2018-02-22 18:36:29 -05:00
|
|
|
char line[], fortran_charlen_t);
|
2017-09-22 13:38:51 -04:00
|
|
|
|
2018-02-22 18:36:29 -05:00
|
|
|
void fix_contest_msg_(char* MyGrid, char* msg, fortran_charlen_t, fortran_charlen_t);
|
2017-09-27 08:39:50 -04:00
|
|
|
|
2017-09-27 21:35:09 -04:00
|
|
|
void calibrate_(char data_dir[], int* iz, double* a, double* b, double* rms,
|
2018-02-22 18:36:29 -05:00
|
|
|
double* sigmaa, double* sigmab, int* irc, fortran_charlen_t);
|
2017-11-16 16:32:07 -05:00
|
|
|
|
2017-11-30 15:34:05 -05:00
|
|
|
void foxgen_();
|
2018-01-17 12:56:01 -05:00
|
|
|
|
|
|
|
void plotsave_(float swide[], int* m_w , int* m_h1, int* irow);
|
2018-07-11 10:13:42 -04:00
|
|
|
|
2018-07-30 11:17:09 -04:00
|
|
|
void chkcall_(char* w, char* basc_call, bool cok, int len1, int len2);
|
2019-01-18 11:51:15 -05:00
|
|
|
|
2019-03-09 11:03:01 -05:00
|
|
|
void get_ft4msg_(int* idecode, char* line, int len);
|
2019-01-31 13:55:21 -05:00
|
|
|
|
2015-12-17 15:29:55 -05:00
|
|
|
}
|
|
|
|
|
2018-07-10 08:50:45 -04:00
|
|
|
int volatile itone[NUM_ISCAT_SYMBOLS]; //Audio tones for all Tx symbols
|
|
|
|
int volatile itone0[NUM_ISCAT_SYMBOLS]; //Dummy array, data not actually used
|
|
|
|
int volatile icw[NUM_CW_SYMBOLS]; //Dits for CW ID
|
2020-03-16 10:27:22 -04:00
|
|
|
dec_data_t dec_data; // for sharing with Fortran
|
2013-08-05 09:57:55 -04:00
|
|
|
|
2013-05-24 08:36:41 -04:00
|
|
|
int outBufSize;
|
2013-03-11 11:51:44 -04:00
|
|
|
int rc;
|
2016-06-10 11:54:16 -04:00
|
|
|
qint32 g_iptt {0};
|
2013-03-11 11:51:44 -04:00
|
|
|
wchar_t buffer[256];
|
2015-11-17 20:28:12 -05:00
|
|
|
float fast_green[703];
|
|
|
|
float fast_green2[703];
|
|
|
|
float fast_s[44992]; //44992=64*703
|
|
|
|
float fast_s2[44992];
|
2016-06-10 11:54:16 -04:00
|
|
|
int fast_jh {0};
|
2017-03-06 09:34:25 -05:00
|
|
|
int fast_jhpeak {0};
|
2016-06-10 11:54:16 -04:00
|
|
|
int fast_jh2 {0};
|
2016-02-03 15:23:52 -05:00
|
|
|
int narg[15];
|
2015-11-17 20:28:12 -05:00
|
|
|
QVector<QColor> g_ColorTbl;
|
2012-05-22 13:09:48 -04:00
|
|
|
|
2018-10-30 17:06:01 -04:00
|
|
|
using SpecOp = Configuration::SpecialOperatingActivity;
|
|
|
|
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
namespace
|
|
|
|
{
|
|
|
|
Radio::Frequency constexpr default_frequency {14076000};
|
2018-07-06 12:52:39 -04:00
|
|
|
QRegExp message_alphabet {"[- @A-Za-z0-9+./?#<>;]*"};
|
2017-07-24 15:27:23 -04:00
|
|
|
// grid exact match excluding RR73
|
|
|
|
QRegularExpression grid_regexp {"\\A(?![Rr]{2}73)[A-Ra-r]{2}[0-9]{2}([A-Xa-x]{2}){0,1}\\z"};
|
2019-06-25 09:35:58 -04:00
|
|
|
auto quint32_max = std::numeric_limits<quint32>::max ();
|
2020-09-16 17:02:40 -04:00
|
|
|
constexpr int N_WIDGETS {36};
|
2020-12-07 15:34:56 -05:00
|
|
|
constexpr int default_rx_audio_buffer_frames {-1}; // lets Qt decide
|
2020-12-04 13:59:41 -05:00
|
|
|
constexpr int default_tx_audio_buffer_frames {-1}; // lets Qt decide
|
2015-03-17 10:59:19 -04:00
|
|
|
|
|
|
|
bool message_is_73 (int type, QStringList const& msg_parts)
|
|
|
|
{
|
2017-07-24 15:27:23 -04:00
|
|
|
return type >= 0
|
|
|
|
&& (((type < 6 || 7 == type)
|
|
|
|
&& (msg_parts.contains ("73") || msg_parts.contains ("RR73")))
|
|
|
|
|| (type == 6 && !msg_parts.filter ("73").isEmpty ()));
|
2015-03-17 10:59:19 -04:00
|
|
|
}
|
2016-07-01 07:36:59 -04:00
|
|
|
|
2016-07-03 22:31:50 -04:00
|
|
|
int ms_minute_error ()
|
2016-07-01 07:36:59 -04:00
|
|
|
{
|
2018-12-01 13:16:57 -05:00
|
|
|
auto const& now = QDateTime::currentDateTimeUtc ();
|
2016-07-01 07:36:59 -04:00
|
|
|
auto const& time = now.time ();
|
2016-07-03 22:31:50 -04:00
|
|
|
auto second = time.second ();
|
|
|
|
return now.msecsTo (now.addSecs (second > 30 ? 60 - second : -second)) - time.msec ();
|
2016-07-01 07:36:59 -04:00
|
|
|
}
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
}
|
|
|
|
|
2014-01-30 13:40:16 -05:00
|
|
|
//--------------------------------------------------- MainWindow constructor
|
2016-04-20 17:59:22 -04:00
|
|
|
MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
|
|
|
|
MultiSettings * multi_settings, QSharedMemory *shdmem,
|
2016-12-04 09:17:01 -05:00
|
|
|
unsigned downSampleFactor,
|
2020-11-06 13:28:59 -05:00
|
|
|
QSplashScreen * splash, QProcessEnvironment const& env, QWidget *parent) :
|
2020-11-26 20:14:12 -05:00
|
|
|
MultiGeometryWidget {parent},
|
2020-11-06 13:28:59 -05:00
|
|
|
m_env {env},
|
2016-12-04 09:17:01 -05:00
|
|
|
m_network_manager {this},
|
2016-05-07 15:32:52 -04:00
|
|
|
m_valid {true},
|
2016-08-06 09:52:14 -04:00
|
|
|
m_splash {splash},
|
2015-02-21 19:20:42 -05:00
|
|
|
m_revision {revision ()},
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
m_multiple {multiple},
|
2016-04-17 19:39:12 -04:00
|
|
|
m_multi_settings {multi_settings},
|
2016-09-10 21:09:50 -04:00
|
|
|
m_configurations_button {0},
|
2016-04-17 19:39:12 -04:00
|
|
|
m_settings {multi_settings->settings ()},
|
2013-08-05 09:57:55 -04:00
|
|
|
ui(new Ui::MainWindow),
|
2018-11-30 11:26:46 -05:00
|
|
|
m_config {&m_network_manager, temp_directory, m_settings, &m_logBook, this},
|
2019-06-02 19:35:20 -04:00
|
|
|
m_logBook {&m_config},
|
2016-04-17 19:39:12 -04:00
|
|
|
m_WSPR_band_hopping {m_settings, &m_config, this},
|
2015-07-07 15:02:25 -04:00
|
|
|
m_WSPR_tx_next {false},
|
2016-07-03 16:31:19 -04:00
|
|
|
m_rigErrorMessageBox {MessageBox::Critical, tr ("Rig Control Error")
|
|
|
|
, MessageBox::Cancel | MessageBox::Ok | MessageBox::Retry},
|
2016-04-17 19:39:12 -04:00
|
|
|
m_wideGraph (new WideGraph(m_settings)),
|
|
|
|
m_echoGraph (new EchoGraph(m_settings)),
|
|
|
|
m_fastGraph (new FastGraph(m_settings)),
|
2018-01-12 21:38:28 -05:00
|
|
|
// no parent so that it has a taskbar icon
|
2019-05-29 18:35:18 -04:00
|
|
|
m_logDlg (new LogQSO (program_title (), m_settings, &m_config, &m_logBook, nullptr)),
|
2016-04-06 13:11:58 -04:00
|
|
|
m_lastDialFreq {0},
|
2016-06-10 11:54:16 -04:00
|
|
|
m_dialFreqRxWSPR {0},
|
2019-05-22 12:44:28 -04:00
|
|
|
m_detector {new Detector {RX_SAMPLE_RATE, double(NTMAX), downSampleFactor}},
|
2016-06-16 21:27:00 -04:00
|
|
|
m_FFTSize {6192 / 2}, // conservative value to avoid buffer overruns
|
2015-07-13 07:00:55 -04:00
|
|
|
m_soundInput {new SoundInput},
|
|
|
|
m_modulator {new Modulator {TX_SAMPLE_RATE, NTMAX}},
|
|
|
|
m_soundOutput {new SoundOutput},
|
2020-12-07 15:34:56 -05:00
|
|
|
m_rx_audio_buffer_frames {0},
|
2020-12-02 20:49:21 -05:00
|
|
|
m_tx_audio_buffer_frames {0},
|
2016-06-10 11:54:16 -04:00
|
|
|
m_msErase {0},
|
|
|
|
m_secBandChanged {0},
|
2016-04-06 13:11:58 -04:00
|
|
|
m_freqNominal {0},
|
|
|
|
m_freqTxNominal {0},
|
2020-11-06 13:28:59 -05:00
|
|
|
m_reverse_Doppler {"1" == env.value ("WSJT_REVERSE_DOPPLER", "0")},
|
2016-06-11 14:50:41 -04:00
|
|
|
m_s6 {0.},
|
|
|
|
m_tRemaining {0.},
|
2019-05-22 12:44:28 -04:00
|
|
|
m_TRperiod {60.0},
|
2016-06-10 11:54:16 -04:00
|
|
|
m_DTtol {3.0},
|
|
|
|
m_waterfallAvg {1},
|
|
|
|
m_ntx {1},
|
2017-05-12 16:46:19 -04:00
|
|
|
m_gen_message_is_cq {false},
|
2017-07-25 21:39:04 -04:00
|
|
|
m_send_RR73 {false},
|
2015-06-09 12:56:49 -04:00
|
|
|
m_XIT {0},
|
2016-06-10 11:54:16 -04:00
|
|
|
m_sec0 {-1},
|
2017-07-28 19:25:32 -04:00
|
|
|
m_RxLog {1}, //Write Date and Time to RxLog
|
2016-09-17 09:34:40 -04:00
|
|
|
m_nutc0 {999999},
|
2016-06-10 11:54:16 -04:00
|
|
|
m_ntr {0},
|
|
|
|
m_tx {0},
|
|
|
|
m_inGain {0},
|
|
|
|
m_secID {0},
|
2016-07-08 16:45:45 -04:00
|
|
|
m_idleMinutes {0},
|
2016-06-10 11:54:16 -04:00
|
|
|
m_nSubMode {0},
|
|
|
|
m_nclearave {1},
|
|
|
|
m_nseq {0},
|
|
|
|
m_nWSPRdecodes {0},
|
|
|
|
m_k0 {9999999},
|
|
|
|
m_nPick {0},
|
2017-01-09 17:54:32 -05:00
|
|
|
m_frequency_list_fcal_iter {m_config.frequencies ()->begin ()},
|
2016-06-10 11:54:16 -04:00
|
|
|
m_nTx73 {0},
|
|
|
|
m_btxok {false},
|
2014-04-11 18:50:44 -04:00
|
|
|
m_diskData {false},
|
2016-06-10 11:54:16 -04:00
|
|
|
m_loopall {false},
|
|
|
|
m_txFirst {false},
|
|
|
|
m_auto {false},
|
|
|
|
m_restart {false},
|
|
|
|
m_startAnother {false},
|
|
|
|
m_saveDecoded {false},
|
|
|
|
m_saveAll {false},
|
|
|
|
m_widebandDecode {false},
|
|
|
|
m_dataAvailable {false},
|
|
|
|
m_decodedText2 {false},
|
|
|
|
m_freeText {false},
|
2015-03-17 10:59:19 -04:00
|
|
|
m_sentFirst73 {false},
|
|
|
|
m_currentMessageType {-1},
|
|
|
|
m_lastMessageType {-1},
|
2016-06-10 11:54:16 -04:00
|
|
|
m_bShMsgs {false},
|
2016-12-30 16:46:29 -05:00
|
|
|
m_bSWL {false},
|
2015-06-09 10:30:23 -04:00
|
|
|
m_uploading {false},
|
2016-06-10 11:54:16 -04:00
|
|
|
m_grid6 {false},
|
2015-06-12 15:03:37 -04:00
|
|
|
m_tuneup {false},
|
2016-06-10 11:54:16 -04:00
|
|
|
m_bTxTime {false},
|
2020-07-29 11:58:28 -04:00
|
|
|
m_rxDone {true},
|
2015-06-11 18:42:41 -04:00
|
|
|
m_bSimplex {false},
|
2016-06-10 11:54:16 -04:00
|
|
|
m_bEchoTxOK {false},
|
|
|
|
m_bTransmittedEcho {false},
|
|
|
|
m_bEchoTxed {false},
|
|
|
|
m_bFastDecodeCalled {false},
|
|
|
|
m_bDoubleClickAfterCQnnn {false},
|
|
|
|
m_bRefSpec {false},
|
2016-12-24 15:05:28 -05:00
|
|
|
m_bClearRefSpec {false},
|
2017-01-15 16:43:40 -05:00
|
|
|
m_bTrain {false},
|
2017-07-24 15:27:23 -04:00
|
|
|
m_bAutoReply {false},
|
|
|
|
m_QSOProgress {CALLING},
|
2016-04-30 20:40:51 -04:00
|
|
|
m_ihsym {0},
|
|
|
|
m_nzap {0},
|
|
|
|
m_px {0.0},
|
|
|
|
m_iptt0 {0},
|
|
|
|
m_btxok0 {false},
|
|
|
|
m_nsendingsh {0},
|
|
|
|
m_onAirFreq0 {0.0},
|
|
|
|
m_first_error {true},
|
2020-05-19 07:15:58 -04:00
|
|
|
tx_status_label {tr ("Receiving")},
|
2016-12-04 09:17:01 -05:00
|
|
|
wsprNet {new WSPRNet {&m_network_manager, this}},
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
m_appDir {QApplication::applicationDirPath ()},
|
2020-01-08 09:41:47 -05:00
|
|
|
m_cqStr {""},
|
2016-06-10 11:54:16 -04:00
|
|
|
m_palette {"Linrad"},
|
|
|
|
m_mode {"JT9"},
|
|
|
|
m_rpt {"-15"},
|
|
|
|
m_pfx {
|
|
|
|
"1A", "1S",
|
|
|
|
"3A", "3B6", "3B8", "3B9", "3C", "3C0", "3D2", "3D2C",
|
|
|
|
"3D2R", "3DA", "3V", "3W", "3X", "3Y", "3YB", "3YP",
|
|
|
|
"4J", "4L", "4S", "4U1I", "4U1U", "4W", "4X",
|
|
|
|
"5A", "5B", "5H", "5N", "5R", "5T", "5U", "5V", "5W", "5X", "5Z",
|
|
|
|
"6W", "6Y",
|
|
|
|
"7O", "7P", "7Q", "7X",
|
|
|
|
"8P", "8Q", "8R",
|
|
|
|
"9A", "9G", "9H", "9J", "9K", "9L", "9M2", "9M6", "9N",
|
|
|
|
"9Q", "9U", "9V", "9X", "9Y",
|
|
|
|
"A2", "A3", "A4", "A5", "A6", "A7", "A9", "AP",
|
|
|
|
"BS7", "BV", "BV9", "BY",
|
|
|
|
"C2", "C3", "C5", "C6", "C9", "CE", "CE0X", "CE0Y",
|
|
|
|
"CE0Z", "CE9", "CM", "CN", "CP", "CT", "CT3", "CU",
|
|
|
|
"CX", "CY0", "CY9",
|
|
|
|
"D2", "D4", "D6", "DL", "DU",
|
|
|
|
"E3", "E4", "E5", "EA", "EA6", "EA8", "EA9", "EI", "EK",
|
|
|
|
"EL", "EP", "ER", "ES", "ET", "EU", "EX", "EY", "EZ",
|
|
|
|
"F", "FG", "FH", "FJ", "FK", "FKC", "FM", "FO", "FOA",
|
|
|
|
"FOC", "FOM", "FP", "FR", "FRG", "FRJ", "FRT", "FT5W",
|
|
|
|
"FT5X", "FT5Z", "FW", "FY",
|
|
|
|
"M", "MD", "MI", "MJ", "MM", "MU", "MW",
|
|
|
|
"H4", "H40", "HA", "HB", "HB0", "HC", "HC8", "HH",
|
|
|
|
"HI", "HK", "HK0", "HK0M", "HL", "HM", "HP", "HR",
|
|
|
|
"HS", "HV", "HZ",
|
|
|
|
"I", "IS", "IS0",
|
|
|
|
"J2", "J3", "J5", "J6", "J7", "J8", "JA", "JDM",
|
|
|
|
"JDO", "JT", "JW", "JX", "JY",
|
|
|
|
"K", "KC4", "KG4", "KH0", "KH1", "KH2", "KH3", "KH4", "KH5",
|
|
|
|
"KH5K", "KH6", "KH7", "KH8", "KH9", "KL", "KP1", "KP2",
|
|
|
|
"KP4", "KP5",
|
|
|
|
"LA", "LU", "LX", "LY", "LZ",
|
|
|
|
"OA", "OD", "OE", "OH", "OH0", "OJ0", "OK", "OM", "ON",
|
|
|
|
"OX", "OY", "OZ",
|
|
|
|
"P2", "P4", "PA", "PJ2", "PJ7", "PY", "PY0F", "PT0S", "PY0T", "PZ",
|
|
|
|
"R1F", "R1M",
|
|
|
|
"S0", "S2", "S5", "S7", "S9", "SM", "SP", "ST", "SU",
|
|
|
|
"SV", "SVA", "SV5", "SV9",
|
|
|
|
"T2", "T30", "T31", "T32", "T33", "T5", "T7", "T8", "T9", "TA",
|
|
|
|
"TF", "TG", "TI", "TI9", "TJ", "TK", "TL", "TN", "TR", "TT",
|
|
|
|
"TU", "TY", "TZ",
|
|
|
|
"UA", "UA2", "UA9", "UK", "UN", "UR",
|
|
|
|
"V2", "V3", "V4", "V5", "V6", "V7", "V8", "VE", "VK", "VK0H",
|
|
|
|
"VK0M", "VK9C", "VK9L", "VK9M", "VK9N", "VK9W", "VK9X", "VP2E",
|
|
|
|
"VP2M", "VP2V", "VP5", "VP6", "VP6D", "VP8", "VP8G", "VP8H",
|
|
|
|
"VP8O", "VP8S", "VP9", "VQ9", "VR", "VU", "VU4", "VU7",
|
|
|
|
"XE", "XF4", "XT", "XU", "XW", "XX9", "XZ",
|
|
|
|
"YA", "YB", "YI", "YJ", "YK", "YL", "YN", "YO", "YS", "YU", "YV", "YV0",
|
|
|
|
"Z2", "Z3", "ZA", "ZB", "ZC4", "ZD7", "ZD8", "ZD9", "ZF", "ZK1N",
|
|
|
|
"ZK1S", "ZK2", "ZK3", "ZL", "ZL7", "ZL8", "ZL9", "ZP", "ZS", "ZS8"
|
|
|
|
},
|
|
|
|
m_sfx {"P", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A"},
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
mem_jt9 {shdmem},
|
2013-10-04 15:00:29 -04:00
|
|
|
m_downSampleFactor (downSampleFactor),
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
m_audioThreadPriority (QThread::HighPriority),
|
|
|
|
m_bandEdited {false},
|
|
|
|
m_splitMode {false},
|
|
|
|
m_monitoring {false},
|
2017-06-30 20:19:58 -04:00
|
|
|
m_tx_when_ready {false},
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
m_transmitting {false},
|
|
|
|
m_tune {false},
|
2016-07-09 14:35:25 -04:00
|
|
|
m_tx_watchdog {false},
|
2015-12-16 15:55:19 -05:00
|
|
|
m_block_pwr_tooltip {false},
|
2016-10-25 16:24:09 -04:00
|
|
|
m_PwrBandSetOK {true},
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
m_lastMonitoredFrequency {default_frequency},
|
2015-02-14 19:48:38 -05:00
|
|
|
m_toneSpacing {0.},
|
|
|
|
m_firstDecode {0},
|
|
|
|
m_optimizingProgress {"Optimizing decoder FFTs for your CPU.\n"
|
|
|
|
"Please be patient,\n"
|
2015-04-15 12:40:49 -04:00
|
|
|
"this may take a few minutes", QString {}, 0, 1, this},
|
2015-11-17 20:28:12 -05:00
|
|
|
m_messageClient {new MessageClient {QApplication::applicationName (),
|
2016-12-03 19:55:15 -05:00
|
|
|
version (), revision (),
|
|
|
|
m_config.udp_server_name (), m_config.udp_server_port (),
|
2020-11-04 22:37:01 -05:00
|
|
|
m_config.udp_interface_names (), m_config.udp_TTL (),
|
2016-12-03 19:55:15 -05:00
|
|
|
this}},
|
2020-06-20 20:36:30 -04:00
|
|
|
m_psk_Reporter {&m_config, QString {"WSJT-X v" + version () + " " + m_revision}.simplified ()},
|
2019-06-25 09:35:58 -04:00
|
|
|
m_manual {&m_network_manager},
|
|
|
|
m_block_udp_status_updates {false}
|
2012-05-22 13:09:48 -04:00
|
|
|
{
|
|
|
|
ui->setupUi(this);
|
2019-06-07 12:21:57 -04:00
|
|
|
setUnifiedTitleAndToolBarOnMac (true);
|
2016-10-28 13:15:04 -04:00
|
|
|
createStatusBar();
|
2016-07-06 16:16:38 -04:00
|
|
|
add_child_to_event_filter (this);
|
2016-07-10 18:20:30 -04:00
|
|
|
ui->dxGridEntry->setValidator (new MaidenheadLocatorValidator {this});
|
|
|
|
ui->dxCallEntry->setValidator (new CallsignValidator {this});
|
2020-07-18 13:56:19 -04:00
|
|
|
ui->sbTR->values ({5, 10, 15, 30, 60, 120, 300, 900, 1800});
|
2020-07-24 11:13:48 -04:00
|
|
|
ui->sbTR_FST4W->values ({120, 300, 900, 1800});
|
2019-01-08 13:03:43 -05:00
|
|
|
ui->decodedTextBrowser->set_configuration (&m_config, true);
|
2018-10-16 19:26:04 -04:00
|
|
|
ui->decodedTextBrowser2->set_configuration (&m_config);
|
2013-08-07 19:09:13 -04:00
|
|
|
|
2016-06-10 11:54:16 -04:00
|
|
|
m_baseCall = Radio::base_callsign (m_config.my_callsign ());
|
|
|
|
|
2015-02-14 19:48:38 -05:00
|
|
|
m_optimizingProgress.setWindowModality (Qt::WindowModal);
|
|
|
|
m_optimizingProgress.setAutoReset (false);
|
|
|
|
m_optimizingProgress.setMinimumDuration (15000); // only show after 15s delay
|
|
|
|
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
// Closedown.
|
|
|
|
connect (ui->actionExit, &QAction::triggered, this, &QMainWindow::close);
|
|
|
|
|
|
|
|
// parts of the rig error message box that are fixed
|
|
|
|
m_rigErrorMessageBox.setInformativeText (tr ("Do you want to reconfigure the radio interface?"));
|
2016-07-03 16:31:19 -04:00
|
|
|
m_rigErrorMessageBox.setDefaultButton (MessageBox::Ok);
|
2013-08-07 19:09:13 -04:00
|
|
|
|
2013-08-17 15:21:14 -04:00
|
|
|
// start audio thread and hook up slots & signals for shutdown management
|
|
|
|
// these objects need to be in the audio thread so that invoking
|
2013-08-10 11:29:55 -04:00
|
|
|
// their slots is done in a thread safe way
|
2015-07-13 07:00:55 -04:00
|
|
|
m_soundOutput->moveToThread (&m_audioThread);
|
|
|
|
m_modulator->moveToThread (&m_audioThread);
|
|
|
|
m_soundInput->moveToThread (&m_audioThread);
|
|
|
|
m_detector->moveToThread (&m_audioThread);
|
2020-12-02 20:49:21 -05:00
|
|
|
bool ok;
|
2020-12-07 15:34:56 -05:00
|
|
|
auto buffer_size = env.value ("WSJT_RX_AUDIO_BUFFER_FRAMES", "0").toInt (&ok);
|
|
|
|
m_rx_audio_buffer_frames = ok && buffer_size ? buffer_size : default_rx_audio_buffer_frames;
|
|
|
|
buffer_size = env.value ("WSJT_TX_AUDIO_BUFFER_FRAMES", "0").toInt (&ok);
|
2020-12-02 20:49:21 -05:00
|
|
|
m_tx_audio_buffer_frames = ok && buffer_size ? buffer_size : default_tx_audio_buffer_frames;
|
2015-07-13 07:00:55 -04:00
|
|
|
|
|
|
|
// hook up sound output stream slots & signals and disposal
|
|
|
|
connect (this, &MainWindow::initializeAudioOutputStream, m_soundOutput, &SoundOutput::setFormat);
|
|
|
|
connect (m_soundOutput, &SoundOutput::error, this, &MainWindow::showSoundOutError);
|
2020-09-20 13:20:16 -04:00
|
|
|
connect (m_soundOutput, &SoundOutput::error, &m_config, &Configuration::invalidate_audio_output_device);
|
2015-07-13 07:00:55 -04:00
|
|
|
// connect (m_soundOutput, &SoundOutput::status, this, &MainWindow::showStatusMessage);
|
|
|
|
connect (this, &MainWindow::outAttenuationChanged, m_soundOutput, &SoundOutput::setAttenuation);
|
|
|
|
connect (&m_audioThread, &QThread::finished, m_soundOutput, &QObject::deleteLater);
|
|
|
|
|
|
|
|
// hook up Modulator slots and disposal
|
|
|
|
connect (this, &MainWindow::transmitFrequency, m_modulator, &Modulator::setFrequency);
|
|
|
|
connect (this, &MainWindow::endTransmitMessage, m_modulator, &Modulator::stop);
|
|
|
|
connect (this, &MainWindow::tune, m_modulator, &Modulator::tune);
|
|
|
|
connect (this, &MainWindow::sendMessage, m_modulator, &Modulator::start);
|
|
|
|
connect (&m_audioThread, &QThread::finished, m_modulator, &QObject::deleteLater);
|
|
|
|
|
|
|
|
// hook up the audio input stream signals, slots and disposal
|
|
|
|
connect (this, &MainWindow::startAudioInputStream, m_soundInput, &SoundInput::start);
|
|
|
|
connect (this, &MainWindow::suspendAudioInputStream, m_soundInput, &SoundInput::suspend);
|
|
|
|
connect (this, &MainWindow::resumeAudioInputStream, m_soundInput, &SoundInput::resume);
|
2020-08-08 12:12:48 -04:00
|
|
|
connect (this, &MainWindow::reset_audio_input_stream, m_soundInput, &SoundInput::reset);
|
2015-07-13 07:00:55 -04:00
|
|
|
connect (this, &MainWindow::finished, m_soundInput, &SoundInput::stop);
|
|
|
|
connect(m_soundInput, &SoundInput::error, this, &MainWindow::showSoundInError);
|
2020-09-20 13:20:16 -04:00
|
|
|
connect(m_soundInput, &SoundInput::error, &m_config, &Configuration::invalidate_audio_input_device);
|
2015-07-13 07:00:55 -04:00
|
|
|
// connect(m_soundInput, &SoundInput::status, this, &MainWindow::showStatusMessage);
|
|
|
|
connect (&m_audioThread, &QThread::finished, m_soundInput, &QObject::deleteLater);
|
2014-04-03 15:29:13 -04:00
|
|
|
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
connect (this, &MainWindow::finished, this, &MainWindow::close);
|
|
|
|
|
2015-07-13 07:00:55 -04:00
|
|
|
// hook up the detector signals, slots and disposal
|
2016-06-16 21:27:00 -04:00
|
|
|
connect (this, &MainWindow::FFTSize, m_detector, &Detector::setBlockSize);
|
2015-07-13 07:00:55 -04:00
|
|
|
connect(m_detector, &Detector::framesWritten, this, &MainWindow::dataSink);
|
|
|
|
connect (&m_audioThread, &QThread::finished, m_detector, &QObject::deleteLater);
|
2013-08-17 15:21:14 -04:00
|
|
|
|
2013-08-10 11:29:55 -04:00
|
|
|
// setup the waterfall
|
2015-11-17 20:28:12 -05:00
|
|
|
connect(m_wideGraph.data (), SIGNAL(freezeDecode2(int)),this,SLOT(freezeDecode(int)));
|
|
|
|
connect(m_wideGraph.data (), SIGNAL(f11f12(int)),this,SLOT(bumpFqso(int)));
|
|
|
|
connect(m_wideGraph.data (), SIGNAL(setXIT2(int)),this,SLOT(setXIT(int)));
|
|
|
|
|
2016-06-24 13:01:51 -04:00
|
|
|
connect (m_fastGraph.data (), &FastGraph::fastPick, this, &MainWindow::fastPick);
|
2013-08-10 11:29:55 -04:00
|
|
|
|
2015-11-17 20:28:12 -05:00
|
|
|
connect (this, &MainWindow::finished, m_wideGraph.data (), &WideGraph::close);
|
2015-06-04 13:16:55 -04:00
|
|
|
connect (this, &MainWindow::finished, m_echoGraph.data (), &EchoGraph::close);
|
2015-11-17 20:28:12 -05:00
|
|
|
connect (this, &MainWindow::finished, m_fastGraph.data (), &FastGraph::close);
|
2015-06-04 13:16:55 -04:00
|
|
|
|
2013-08-10 11:29:55 -04:00
|
|
|
// setup the log QSO dialog
|
2018-02-04 17:42:35 -05:00
|
|
|
connect (m_logDlg.data (), &LogQSO::acceptQSO, this, &MainWindow::acceptQSO);
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
connect (this, &MainWindow::finished, m_logDlg.data (), &LogQSO::close);
|
2013-08-10 11:29:55 -04:00
|
|
|
|
2018-11-30 11:26:46 -05:00
|
|
|
// hook up the log book
|
|
|
|
connect (&m_logBook, &LogBook::finished_loading, [this] (int record_count, QString const& error) {
|
|
|
|
if (error.size ())
|
|
|
|
{
|
|
|
|
MessageBox::warning_message (this, tr ("Error Scanning ADIF Log"), error);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
showStatusMessage (tr ("Scanned ADIF log, %1 worked before records created").arg (record_count));
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2015-04-15 12:40:49 -04:00
|
|
|
// Network message handlers
|
2019-06-25 09:35:58 -04:00
|
|
|
m_messageClient->enable (m_config.accept_udp_requests ());
|
2019-02-02 19:49:35 -05:00
|
|
|
connect (m_messageClient, &MessageClient::clear_decodes, [this] (quint8 window) {
|
|
|
|
++window;
|
|
|
|
if (window & 1)
|
|
|
|
{
|
|
|
|
ui->decodedTextBrowser->erase ();
|
|
|
|
}
|
|
|
|
if (window & 2)
|
|
|
|
{
|
|
|
|
ui->decodedTextBrowser2->erase ();
|
|
|
|
}
|
|
|
|
});
|
2015-04-15 12:40:49 -04:00
|
|
|
connect (m_messageClient, &MessageClient::reply, this, &MainWindow::replyToCQ);
|
2019-06-25 09:35:58 -04:00
|
|
|
connect (m_messageClient, &MessageClient::close, this, &MainWindow::close);
|
2015-04-15 12:40:49 -04:00
|
|
|
connect (m_messageClient, &MessageClient::replay, this, &MainWindow::replayDecodes);
|
2018-02-04 17:42:35 -05:00
|
|
|
connect (m_messageClient, &MessageClient::location, this, &MainWindow::locationChange);
|
2015-05-06 18:25:56 -04:00
|
|
|
connect (m_messageClient, &MessageClient::halt_tx, [this] (bool auto_only) {
|
2019-06-25 09:35:58 -04:00
|
|
|
if (auto_only) {
|
|
|
|
if (ui->autoButton->isChecked ()) {
|
|
|
|
ui->autoButton->click();
|
2015-05-06 18:25:56 -04:00
|
|
|
}
|
2019-06-25 09:35:58 -04:00
|
|
|
} else {
|
|
|
|
ui->stopTxButton->click();
|
2015-05-06 18:25:56 -04:00
|
|
|
}
|
|
|
|
});
|
2015-04-15 12:40:49 -04:00
|
|
|
connect (m_messageClient, &MessageClient::error, this, &MainWindow::networkError);
|
2015-05-28 13:33:39 -04:00
|
|
|
connect (m_messageClient, &MessageClient::free_text, [this] (QString const& text, bool send) {
|
2019-06-25 09:35:58 -04:00
|
|
|
tx_watchdog (false);
|
|
|
|
// send + non-empty text means set and send the free text
|
|
|
|
// message, !send + non-empty text means set the current free
|
|
|
|
// text message, send + empty text means send the current free
|
|
|
|
// text message without change, !send + empty text means clear
|
|
|
|
// the current free text message
|
|
|
|
if (0 == ui->tabWidget->currentIndex ()) {
|
|
|
|
if (!text.isEmpty ()) {
|
|
|
|
ui->tx5->setCurrentText (text);
|
|
|
|
}
|
|
|
|
if (send) {
|
|
|
|
ui->txb5->click ();
|
|
|
|
} else if (text.isEmpty ()) {
|
|
|
|
ui->tx5->setCurrentText (text);
|
|
|
|
}
|
2015-05-06 18:25:56 -04:00
|
|
|
}
|
2019-06-25 09:35:58 -04:00
|
|
|
QApplication::alert (this);
|
2015-07-27 07:34:11 -04:00
|
|
|
});
|
2015-04-15 12:40:49 -04:00
|
|
|
|
2018-03-28 18:25:46 -04:00
|
|
|
connect (m_messageClient, &MessageClient::highlight_callsign, ui->decodedTextBrowser, &DisplayText::highlight_callsign);
|
2019-06-12 20:44:28 -04:00
|
|
|
connect (m_messageClient, &MessageClient::switch_configuration, m_multi_settings, &MultiSettings::select_configuration);
|
2019-06-25 09:35:58 -04:00
|
|
|
connect (m_messageClient, &MessageClient::configure, this, &MainWindow::remote_configure);
|
2019-06-12 20:44:28 -04:00
|
|
|
|
2015-06-03 21:45:40 -04:00
|
|
|
// Hook up WSPR band hopping
|
|
|
|
connect (ui->band_hopping_schedule_push_button, &QPushButton::clicked
|
|
|
|
, &m_WSPR_band_hopping, &WSPRBandHopping::show_dialog);
|
|
|
|
connect (ui->sbTxPercent, static_cast<void (QSpinBox::*) (int)> (&QSpinBox::valueChanged)
|
|
|
|
, &m_WSPR_band_hopping, &WSPRBandHopping::set_tx_percent);
|
|
|
|
|
2015-04-15 12:40:49 -04:00
|
|
|
on_EraseButton_clicked ();
|
2012-05-22 13:09:48 -04:00
|
|
|
|
|
|
|
QActionGroup* modeGroup = new QActionGroup(this);
|
2020-07-23 13:51:05 -04:00
|
|
|
ui->actionFST4->setActionGroup(modeGroup);
|
|
|
|
ui->actionFST4W->setActionGroup(modeGroup);
|
2019-01-28 10:19:46 -05:00
|
|
|
ui->actionFT4->setActionGroup(modeGroup);
|
2017-06-17 09:48:45 -04:00
|
|
|
ui->actionFT8->setActionGroup(modeGroup);
|
2015-11-17 20:28:12 -05:00
|
|
|
ui->actionJT9->setActionGroup(modeGroup);
|
2013-07-08 09:17:22 -04:00
|
|
|
ui->actionJT65->setActionGroup(modeGroup);
|
|
|
|
ui->actionJT9_JT65->setActionGroup(modeGroup);
|
2015-04-22 13:48:03 -04:00
|
|
|
ui->actionJT4->setActionGroup(modeGroup);
|
2016-10-20 11:43:03 -04:00
|
|
|
ui->actionWSPR->setActionGroup(modeGroup);
|
2015-06-04 12:42:38 -04:00
|
|
|
ui->actionEcho->setActionGroup(modeGroup);
|
2015-11-17 20:28:12 -05:00
|
|
|
ui->actionISCAT->setActionGroup(modeGroup);
|
2016-06-03 11:45:54 -04:00
|
|
|
ui->actionMSK144->setActionGroup(modeGroup);
|
2016-07-02 08:15:41 -04:00
|
|
|
ui->actionQRA64->setActionGroup(modeGroup);
|
2017-01-03 16:37:38 -05:00
|
|
|
ui->actionFreqCal->setActionGroup(modeGroup);
|
2012-05-22 13:09:48 -04:00
|
|
|
|
|
|
|
QActionGroup* saveGroup = new QActionGroup(this);
|
|
|
|
ui->actionNone->setActionGroup(saveGroup);
|
2012-10-30 12:49:24 -04:00
|
|
|
ui->actionSave_decoded->setActionGroup(saveGroup);
|
|
|
|
ui->actionSave_all->setActionGroup(saveGroup);
|
2012-05-22 13:09:48 -04:00
|
|
|
|
|
|
|
QActionGroup* DepthGroup = new QActionGroup(this);
|
2012-10-31 14:33:56 -04:00
|
|
|
ui->actionQuickDecode->setActionGroup(DepthGroup);
|
|
|
|
ui->actionMediumDecode->setActionGroup(DepthGroup);
|
|
|
|
ui->actionDeepestDecode->setActionGroup(DepthGroup);
|
2012-05-22 13:09:48 -04:00
|
|
|
|
2016-12-04 09:17:01 -05:00
|
|
|
connect (ui->download_samples_action, &QAction::triggered, [this] () {
|
2015-12-24 06:41:05 -05:00
|
|
|
if (!m_sampleDownloader)
|
|
|
|
{
|
2016-12-04 09:17:01 -05:00
|
|
|
m_sampleDownloader.reset (new SampleDownloader {m_settings, &m_config, &m_network_manager, this});
|
2015-12-24 06:41:05 -05:00
|
|
|
}
|
|
|
|
m_sampleDownloader->show ();
|
|
|
|
});
|
|
|
|
|
2017-02-20 21:13:13 -05:00
|
|
|
connect (ui->view_phase_response_action, &QAction::triggered, [this] () {
|
2017-07-14 11:33:17 -04:00
|
|
|
if (!m_equalizationToolsDialog)
|
2017-02-20 21:13:13 -05:00
|
|
|
{
|
2017-07-14 11:33:17 -04:00
|
|
|
m_equalizationToolsDialog.reset (new EqualizationToolsDialog {m_settings, m_config.writeable_data_dir (), m_phaseEqCoefficients, this});
|
|
|
|
connect (m_equalizationToolsDialog.data (), &EqualizationToolsDialog::phase_equalization_changed,
|
2017-02-23 11:21:26 -05:00
|
|
|
[this] (QVector<double> const& coeffs) {
|
2017-02-20 21:13:13 -05:00
|
|
|
m_phaseEqCoefficients = coeffs;
|
|
|
|
});
|
|
|
|
}
|
2017-07-14 11:33:17 -04:00
|
|
|
m_equalizationToolsDialog->show ();
|
2017-02-20 21:13:13 -05:00
|
|
|
});
|
|
|
|
|
2018-10-01 17:43:13 -04:00
|
|
|
connect (&m_config.lotw_users (), &LotWUsers::LotW_users_error, this, [this] (QString const& reason) {
|
2018-10-01 07:37:52 -04:00
|
|
|
MessageBox::warning_message (this, tr ("Error Loading LotW Users Data"), reason);
|
|
|
|
}, Qt::QueuedConnection);
|
|
|
|
|
2016-06-10 11:54:16 -04:00
|
|
|
QButtonGroup* txMsgButtonGroup = new QButtonGroup {this};
|
2012-05-22 13:09:48 -04:00
|
|
|
txMsgButtonGroup->addButton(ui->txrb1,1);
|
|
|
|
txMsgButtonGroup->addButton(ui->txrb2,2);
|
|
|
|
txMsgButtonGroup->addButton(ui->txrb3,3);
|
|
|
|
txMsgButtonGroup->addButton(ui->txrb4,4);
|
|
|
|
txMsgButtonGroup->addButton(ui->txrb5,5);
|
|
|
|
txMsgButtonGroup->addButton(ui->txrb6,6);
|
2016-12-30 10:45:31 -05:00
|
|
|
set_dateTimeQSO(-1);
|
2012-05-22 13:09:48 -04:00
|
|
|
connect(txMsgButtonGroup,SIGNAL(buttonClicked(int)),SLOT(set_ntx(int)));
|
2018-02-06 16:49:57 -05:00
|
|
|
connect (ui->decodedTextBrowser, &DisplayText::selectCallsign, this, &MainWindow::doubleClickOnCall2);
|
|
|
|
connect (ui->decodedTextBrowser2, &DisplayText::selectCallsign, this, &MainWindow::doubleClickOnCall);
|
|
|
|
connect (ui->textBrowser4, &DisplayText::selectCallsign, this, &MainWindow::doubleClickOnFoxQueue);
|
|
|
|
connect (ui->decodedTextBrowser, &DisplayText::erased, this, &MainWindow::band_activity_cleared);
|
2017-09-16 16:27:33 -04:00
|
|
|
connect (ui->decodedTextBrowser2, &DisplayText::erased, this, &MainWindow::rx_frequency_activity_cleared);
|
2012-05-22 13:09:48 -04:00
|
|
|
|
2017-09-09 15:34:54 -04:00
|
|
|
// initialize decoded text font and hook up font change signals
|
|
|
|
// defer initialization until after construction otherwise menu
|
|
|
|
// fonts do not get set
|
|
|
|
QTimer::singleShot (0, this, SLOT (initialize_fonts ()));
|
|
|
|
connect (&m_config, &Configuration::text_font_changed, [this] (QFont const& font) {
|
|
|
|
set_application_font (font);
|
|
|
|
});
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
connect (&m_config, &Configuration::decoded_text_font_changed, [this] (QFont const& font) {
|
|
|
|
setDecodedTextFont (font);
|
|
|
|
});
|
2013-08-11 07:45:17 -04:00
|
|
|
|
2014-04-13 13:22:12 -04:00
|
|
|
setWindowTitle (program_title ());
|
2012-05-22 13:09:48 -04:00
|
|
|
|
2016-05-07 15:32:52 -04:00
|
|
|
connect(&proc_jt9, &QProcess::readyReadStandardOutput, this, &MainWindow::readFromStdout);
|
2020-05-06 21:56:57 -04:00
|
|
|
#if QT_VERSION < QT_VERSION_CHECK (5, 6, 0)
|
2016-05-07 15:32:52 -04:00
|
|
|
connect(&proc_jt9, static_cast<void (QProcess::*) (QProcess::ProcessError)> (&QProcess::error),
|
|
|
|
[this] (QProcess::ProcessError error) {
|
|
|
|
subProcessError (&proc_jt9, error);
|
|
|
|
});
|
2020-05-06 21:56:57 -04:00
|
|
|
#else
|
2020-06-13 11:04:41 -04:00
|
|
|
connect(&proc_jt9, &QProcess::errorOccurred, [this] (QProcess::ProcessError error) {
|
|
|
|
subProcessError (&proc_jt9, error);
|
|
|
|
});
|
2020-05-06 21:56:57 -04:00
|
|
|
#endif
|
2016-05-07 15:32:52 -04:00
|
|
|
connect(&proc_jt9, static_cast<void (QProcess::*) (int, QProcess::ExitStatus)> (&QProcess::finished),
|
|
|
|
[this] (int exitCode, QProcess::ExitStatus status) {
|
2020-06-26 16:35:29 -04:00
|
|
|
if (subProcessFailed (&proc_jt9, exitCode, status))
|
|
|
|
{
|
|
|
|
m_valid = false; // ensures exit if still
|
|
|
|
// constructing
|
|
|
|
QTimer::singleShot (0, this, SLOT (close ()));
|
|
|
|
}
|
2016-05-07 15:32:52 -04:00
|
|
|
});
|
2020-06-13 11:04:41 -04:00
|
|
|
connect(&p1, &QProcess::started, [this] () {
|
2020-07-26 19:51:12 -04:00
|
|
|
showStatusMessage (QString {"Started: %1 \"%2\""}.arg (p1.program ()).arg (p1.arguments ().join ("\" \"")));
|
2020-06-13 11:04:41 -04:00
|
|
|
});
|
2016-05-07 15:32:52 -04:00
|
|
|
connect(&p1, &QProcess::readyReadStandardOutput, this, &MainWindow::p1ReadFromStdout);
|
2020-05-06 21:56:57 -04:00
|
|
|
#if QT_VERSION < QT_VERSION_CHECK (5, 6, 0)
|
2018-03-09 08:19:27 -05:00
|
|
|
connect(&p1, static_cast<void (QProcess::*) (QProcess::ProcessError)> (&QProcess::error),
|
2016-05-07 15:32:52 -04:00
|
|
|
[this] (QProcess::ProcessError error) {
|
|
|
|
subProcessError (&p1, error);
|
|
|
|
});
|
2020-05-06 21:56:57 -04:00
|
|
|
#else
|
2020-06-13 11:04:41 -04:00
|
|
|
connect(&p1, &QProcess::errorOccurred, [this] (QProcess::ProcessError error) {
|
|
|
|
subProcessError (&p1, error);
|
|
|
|
});
|
2020-05-06 21:56:57 -04:00
|
|
|
#endif
|
2016-05-07 15:32:52 -04:00
|
|
|
connect(&p1, static_cast<void (QProcess::*) (int, QProcess::ExitStatus)> (&QProcess::finished),
|
|
|
|
[this] (int exitCode, QProcess::ExitStatus status) {
|
2020-06-26 16:35:29 -04:00
|
|
|
if (subProcessFailed (&p1, exitCode, status))
|
|
|
|
{
|
|
|
|
m_valid = false; // ensures exit if still
|
|
|
|
// constructing
|
|
|
|
QTimer::singleShot (0, this, SLOT (close ()));
|
|
|
|
}
|
2016-05-07 15:32:52 -04:00
|
|
|
});
|
|
|
|
|
2020-05-06 21:56:57 -04:00
|
|
|
#if QT_VERSION < QT_VERSION_CHECK (5, 6, 0)
|
2016-05-07 15:32:52 -04:00
|
|
|
connect(&p3, static_cast<void (QProcess::*) (QProcess::ProcessError)> (&QProcess::error),
|
|
|
|
[this] (QProcess::ProcessError error) {
|
2020-05-06 21:56:57 -04:00
|
|
|
#else
|
2020-06-13 11:04:41 -04:00
|
|
|
connect(&p3, &QProcess::errorOccurred, [this] (QProcess::ProcessError error) {
|
2020-05-06 21:56:57 -04:00
|
|
|
#endif
|
2020-07-26 19:51:12 -04:00
|
|
|
#if !defined(Q_OS_WIN)
|
2020-06-26 16:35:29 -04:00
|
|
|
if (QProcess::FailedToStart != error)
|
2020-07-26 19:51:12 -04:00
|
|
|
#else
|
|
|
|
if (QProcess::Crashed != error)
|
2020-06-26 16:35:29 -04:00
|
|
|
#endif
|
|
|
|
{
|
|
|
|
subProcessError (&p3, error);
|
|
|
|
}
|
|
|
|
});
|
2020-06-13 11:04:41 -04:00
|
|
|
connect(&p3, &QProcess::started, [this] () {
|
2020-07-26 19:51:12 -04:00
|
|
|
showStatusMessage (QString {"Started: %1 \"%2\""}.arg (p3.program ()).arg (p3.arguments ().join ("\" \"")));
|
2020-06-13 11:04:41 -04:00
|
|
|
});
|
2016-05-07 15:32:52 -04:00
|
|
|
connect(&p3, static_cast<void (QProcess::*) (int, QProcess::ExitStatus)> (&QProcess::finished),
|
|
|
|
[this] (int exitCode, QProcess::ExitStatus status) {
|
2020-06-26 16:35:29 -04:00
|
|
|
#if defined(Q_OS_WIN)
|
|
|
|
// We forgo detecting user_hardware failures with exit
|
|
|
|
// code 1 on Windows. This is because we use CMD.EXE to
|
|
|
|
// run the executable. CMD.EXE returns exit code 1 when it
|
|
|
|
// can't find the target executable.
|
|
|
|
if (exitCode != 1) // CMD.EXE couldn't find file to execute
|
2020-07-27 08:13:04 -04:00
|
|
|
#else
|
|
|
|
// We forgo detecting user_hardware failures with exit
|
|
|
|
// code 127 non-Windows. This is because we use /bin/sh to
|
|
|
|
// run the executable. /bin/sh returns exit code 127 when it
|
|
|
|
// can't find the target executable.
|
|
|
|
if (exitCode != 127) // /bin/sh couldn't find file to execute
|
2020-06-26 16:35:29 -04:00
|
|
|
#endif
|
|
|
|
{
|
|
|
|
subProcessFailed (&p3, exitCode, status);
|
|
|
|
}
|
2016-05-07 15:32:52 -04:00
|
|
|
});
|
2012-11-20 15:39:41 -05:00
|
|
|
|
2016-06-09 19:39:41 -04:00
|
|
|
// hook up save WAV file exit handling
|
|
|
|
connect (&m_saveWAVWatcher, &QFutureWatcher<QString>::finished, [this] {
|
|
|
|
// extract the promise from the future
|
|
|
|
auto const& result = m_saveWAVWatcher.future ().result ();
|
|
|
|
if (!result.isEmpty ()) // error
|
|
|
|
{
|
2016-07-03 16:31:19 -04:00
|
|
|
MessageBox::critical_message (this, tr("Error Writing WAV File"), result);
|
2016-06-09 19:39:41 -04:00
|
|
|
}
|
|
|
|
});
|
|
|
|
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
// Hook up working frequencies.
|
|
|
|
ui->bandComboBox->setModel (m_config.frequencies ());
|
2017-08-09 12:06:17 -04:00
|
|
|
ui->bandComboBox->setModelColumn (FrequencyList_v2::frequency_mhz_column);
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
|
2015-05-28 19:22:17 -04:00
|
|
|
// combo box drop down width defaults to the line edit + decorator width,
|
|
|
|
// here we change that to the column width size hint of the model column
|
2017-08-09 12:06:17 -04:00
|
|
|
ui->bandComboBox->view ()->setMinimumWidth (ui->bandComboBox->view ()->sizeHintForColumn (FrequencyList_v2::frequency_mhz_column));
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
|
|
|
|
// Enable live band combo box entry validation and action.
|
2016-04-06 13:11:58 -04:00
|
|
|
auto band_validator = new LiveFrequencyValidator {ui->bandComboBox
|
|
|
|
, m_config.bands ()
|
|
|
|
, m_config.frequencies ()
|
|
|
|
, &m_freqNominal
|
|
|
|
, this};
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
ui->bandComboBox->setValidator (band_validator);
|
|
|
|
|
|
|
|
// Hook up signals.
|
|
|
|
connect (band_validator, &LiveFrequencyValidator::valid, this, &MainWindow::band_changed);
|
|
|
|
connect (ui->bandComboBox->lineEdit (), &QLineEdit::textEdited, [this] (QString const&) {m_bandEdited = true;});
|
|
|
|
|
|
|
|
// hook up configuration signals
|
|
|
|
connect (&m_config, &Configuration::transceiver_update, this, &MainWindow::handle_transceiver_update);
|
|
|
|
connect (&m_config, &Configuration::transceiver_failure, this, &MainWindow::handle_transceiver_failure);
|
2015-04-15 12:40:49 -04:00
|
|
|
connect (&m_config, &Configuration::udp_server_changed, m_messageClient, &MessageClient::set_server);
|
|
|
|
connect (&m_config, &Configuration::udp_server_port_changed, m_messageClient, &MessageClient::set_server_port);
|
2020-11-02 10:33:44 -05:00
|
|
|
connect (&m_config, &Configuration::udp_TTL_changed, m_messageClient, &MessageClient::set_TTL);
|
2019-06-25 09:35:58 -04:00
|
|
|
connect (&m_config, &Configuration::accept_udp_requests_changed, m_messageClient, &MessageClient::enable);
|
2020-09-13 12:12:11 -04:00
|
|
|
connect (&m_config, &Configuration::enumerating_audio_devices, [this] () {
|
|
|
|
showStatusMessage (tr ("Enumerating audio devices"));
|
|
|
|
});
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
|
2016-04-17 19:39:12 -04:00
|
|
|
// set up configurations menu
|
2016-10-28 13:15:04 -04:00
|
|
|
connect (m_multi_settings, &MultiSettings::configurationNameChanged, [this] (QString const& name) {
|
|
|
|
if ("Default" != name) {
|
|
|
|
config_label.setText (name);
|
|
|
|
config_label.show ();
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
config_label.hide ();
|
|
|
|
}
|
2019-06-12 20:44:28 -04:00
|
|
|
statusUpdate ();
|
2016-10-28 13:15:04 -04:00
|
|
|
});
|
2016-04-17 19:39:12 -04:00
|
|
|
m_multi_settings->create_menu_actions (this, ui->menuConfig);
|
2016-09-10 21:09:50 -04:00
|
|
|
m_configurations_button = m_rigErrorMessageBox.addButton (tr ("Configurations...")
|
|
|
|
, QMessageBox::ActionRole);
|
2016-04-17 19:39:12 -04:00
|
|
|
|
2014-09-25 07:36:01 -04:00
|
|
|
// set up message text validators
|
|
|
|
ui->tx1->setValidator (new QRegExpValidator {message_alphabet, this});
|
|
|
|
ui->tx2->setValidator (new QRegExpValidator {message_alphabet, this});
|
|
|
|
ui->tx3->setValidator (new QRegExpValidator {message_alphabet, this});
|
|
|
|
ui->tx4->setValidator (new QRegExpValidator {message_alphabet, this});
|
|
|
|
ui->tx5->setValidator (new QRegExpValidator {message_alphabet, this});
|
|
|
|
ui->tx6->setValidator (new QRegExpValidator {message_alphabet, this});
|
|
|
|
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
// Free text macros model to widget hook up.
|
|
|
|
ui->tx5->setModel (m_config.macros ());
|
2016-10-30 17:38:52 -04:00
|
|
|
connect (ui->tx5->lineEdit(), &QLineEdit::editingFinished,
|
|
|
|
[this] () {on_tx5_currentTextChanged (ui->tx5->lineEdit()->text());});
|
2014-04-06 17:58:11 -04:00
|
|
|
connect(&m_guiTimer, &QTimer::timeout, this, &MainWindow::guiUpdate);
|
2015-05-27 09:08:28 -04:00
|
|
|
m_guiTimer.start(100); //### Don't change the 100 ms! ###
|
2013-08-07 19:09:13 -04:00
|
|
|
|
2016-06-10 11:54:16 -04:00
|
|
|
ptt0Timer.setSingleShot(true);
|
|
|
|
connect(&ptt0Timer, &QTimer::timeout, this, &MainWindow::stopTx2);
|
2016-10-26 15:01:46 -04:00
|
|
|
|
2016-06-10 11:54:16 -04:00
|
|
|
ptt1Timer.setSingleShot(true);
|
|
|
|
connect(&ptt1Timer, &QTimer::timeout, this, &MainWindow::startTx2);
|
2013-03-28 20:21:26 -04:00
|
|
|
|
2016-10-26 15:01:46 -04:00
|
|
|
p1Timer.setSingleShot(true);
|
|
|
|
connect(&p1Timer, &QTimer::timeout, this, &MainWindow::startP1);
|
|
|
|
|
2016-06-10 11:54:16 -04:00
|
|
|
logQSOTimer.setSingleShot(true);
|
|
|
|
connect(&logQSOTimer, &QTimer::timeout, this, &MainWindow::on_logQSOButton_clicked);
|
2013-04-17 11:53:43 -04:00
|
|
|
|
2016-06-10 11:54:16 -04:00
|
|
|
tuneButtonTimer.setSingleShot(true);
|
|
|
|
connect(&tuneButtonTimer, &QTimer::timeout, this, &MainWindow::on_stopTxButton_clicked);
|
2015-05-27 09:08:28 -04:00
|
|
|
|
2016-06-10 11:54:16 -04:00
|
|
|
tuneATU_Timer.setSingleShot(true);
|
|
|
|
connect(&tuneATU_Timer, &QTimer::timeout, this, &MainWindow::stopTuneATU);
|
2013-04-12 13:57:20 -04:00
|
|
|
|
2016-06-10 11:54:16 -04:00
|
|
|
killFileTimer.setSingleShot(true);
|
|
|
|
connect(&killFileTimer, &QTimer::timeout, this, &MainWindow::killFile);
|
2015-05-27 09:08:28 -04:00
|
|
|
|
2016-06-10 11:54:16 -04:00
|
|
|
uploadTimer.setSingleShot(true);
|
2020-07-25 21:58:04 -04:00
|
|
|
connect(&uploadTimer, &QTimer::timeout, [this] () {uploadWSPRSpots ();});
|
2015-11-17 20:28:12 -05:00
|
|
|
|
2016-06-10 11:54:16 -04:00
|
|
|
TxAgainTimer.setSingleShot(true);
|
|
|
|
connect(&TxAgainTimer, SIGNAL(timeout()), this, SLOT(TxAgain()));
|
2015-11-17 20:28:12 -05:00
|
|
|
|
2016-06-10 11:54:16 -04:00
|
|
|
connect(m_wideGraph.data (), SIGNAL(setFreq3(int,int)),this,
|
|
|
|
SLOT(setFreq4(int,int)));
|
2015-05-27 09:08:28 -04:00
|
|
|
|
2012-10-31 14:33:56 -04:00
|
|
|
decodeBusy(false);
|
2015-05-27 09:08:28 -04:00
|
|
|
|
2016-10-01 20:23:09 -04:00
|
|
|
m_msg[0][0]=0;
|
2017-10-30 11:18:54 -04:00
|
|
|
ui->labDXped->setVisible(false);
|
2018-07-09 14:33:56 -04:00
|
|
|
ui->labDXped->setStyleSheet("QLabel {background-color: red; color: white;}");
|
2018-10-04 14:50:02 -04:00
|
|
|
ui->labNextCall->setText("");
|
|
|
|
ui->labNextCall->setVisible(false);
|
2018-11-19 09:15:37 -05:00
|
|
|
ui->labNextCall->setToolTip(""); //### Possibly temporary ? ###
|
2016-10-01 20:23:09 -04:00
|
|
|
|
2020-05-12 23:06:40 -04:00
|
|
|
char const * const power[] = {"1 mW","2 mW","5 mW","10 mW","20 mW","50 mW","100 mW","200 mW","500 mW",
|
|
|
|
"1 W","2 W","5 W","10 W","20 W","50 W","100 W","200 W","500 W","1 kW"};
|
|
|
|
for(auto i = 0u; i < sizeof power / sizeof power[0]; ++i) { //Initialize dBm values
|
2020-06-03 12:43:27 -04:00
|
|
|
auto dBm = int ((10. * i / 3.) + .5);
|
|
|
|
ui->TxPowerComboBox->addItem (QString {"%1 dBm %2"}.arg (dBm).arg (power[i]), dBm);
|
2015-05-27 09:08:28 -04:00
|
|
|
}
|
|
|
|
|
2019-03-12 11:09:49 -04:00
|
|
|
m_dateTimeRcvdRR73=QDateTime::currentDateTimeUtc();
|
|
|
|
m_dateTimeSentTx3=QDateTime::currentDateTimeUtc();
|
|
|
|
|
2013-03-25 07:26:11 -04:00
|
|
|
ui->labAz->setStyleSheet("border: 0px;");
|
2019-01-09 08:47:29 -05:00
|
|
|
ui->labAz->setText("");
|
2020-05-19 07:15:58 -04:00
|
|
|
auto t = "UTC dB DT Freq " + tr ("Message");
|
2020-10-03 19:46:59 -04:00
|
|
|
ui->lh_decodes_headings_label->setText(t);
|
|
|
|
ui->rh_decodes_headings_label->setText(t);
|
2018-08-24 13:18:49 -04:00
|
|
|
readSettings(); //Restore user's setup parameters
|
2015-07-13 07:00:55 -04:00
|
|
|
m_audioThread.start (m_audioThreadPriority);
|
2016-12-30 10:45:31 -05:00
|
|
|
|
2013-07-15 16:01:25 -04:00
|
|
|
#ifdef WIN32
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
if (!m_multiple)
|
|
|
|
{
|
|
|
|
while(true)
|
|
|
|
{
|
|
|
|
int iret=killbyname("jt9.exe");
|
|
|
|
if(iret == 603) break;
|
2016-07-03 16:31:19 -04:00
|
|
|
if(iret != 0)
|
|
|
|
MessageBox::warning_message (this, tr ("Error Killing jt9.exe Process")
|
|
|
|
, tr ("KillByName return code: %1")
|
|
|
|
.arg (iret));
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
}
|
2013-07-15 16:01:25 -04:00
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2013-09-29 17:23:06 -04:00
|
|
|
{
|
|
|
|
//delete any .quit file that might have been left lying around
|
|
|
|
//since its presence will cause jt9 to exit a soon as we start it
|
|
|
|
//and decodes will hang
|
2014-12-02 19:06:54 -05:00
|
|
|
QFile quitFile {m_config.temp_dir ().absoluteFilePath (".quit")};
|
2013-09-29 17:23:06 -04:00
|
|
|
while (quitFile.exists ())
|
|
|
|
{
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
if (!quitFile.remove ())
|
|
|
|
{
|
2016-07-03 16:31:19 -04:00
|
|
|
MessageBox::query_message (this, tr ("Error removing \"%1\"").arg (quitFile.fileName ())
|
|
|
|
, tr ("Click OK to retry"));
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
}
|
2013-09-29 17:23:06 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-03-15 14:25:56 -04:00
|
|
|
to_jt9(0,0,0); //initialize IPC variables
|
2013-07-18 20:23:40 -04:00
|
|
|
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
QStringList jt9_args {
|
2015-02-13 11:55:47 -05:00
|
|
|
"-s", QApplication::applicationName () // shared memory key,
|
2016-12-03 19:55:07 -05:00
|
|
|
// includes rig
|
2015-04-20 11:20:38 -04:00
|
|
|
#ifdef NDEBUG
|
2015-05-27 09:08:28 -04:00
|
|
|
, "-w", "1" //FFTW patience - release
|
2015-04-20 11:20:38 -04:00
|
|
|
#else
|
|
|
|
, "-w", "1" //FFTW patience - debug builds for speed
|
|
|
|
#endif
|
2015-02-13 11:55:47 -05:00
|
|
|
// The number of threads for FFTW specified here is chosen as
|
|
|
|
// three because that gives the best throughput of the large
|
|
|
|
// FFTs used in jt9. The count is the minimum of (the number
|
|
|
|
// available CPU threads less one) and three. This ensures that
|
|
|
|
// there is always at least one free CPU thread to run the other
|
|
|
|
// mode decoder in parallel.
|
|
|
|
, "-m", QString::number (qMin (qMax (QThread::idealThreadCount () - 1, 1), 3)) //FFTW threads
|
|
|
|
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
, "-e", QDir::toNativeSeparators (m_appDir)
|
2017-07-07 19:11:41 -04:00
|
|
|
, "-a", QDir::toNativeSeparators (m_config.writeable_data_dir ().absolutePath ())
|
2014-12-02 19:06:54 -05:00
|
|
|
, "-t", QDir::toNativeSeparators (m_config.temp_dir ().absolutePath ())
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
};
|
2020-11-06 13:28:59 -05:00
|
|
|
QProcessEnvironment new_env {m_env};
|
|
|
|
new_env.insert ("OMP_STACKSIZE", "4M");
|
|
|
|
proc_jt9.setProcessEnvironment (new_env);
|
2014-11-20 14:01:52 -05:00
|
|
|
proc_jt9.start(QDir::toNativeSeparators (m_appDir) + QDir::separator () +
|
|
|
|
"jt9", jt9_args, QIODevice::ReadWrite | QIODevice::Unbuffered);
|
2013-04-14 10:11:20 -04:00
|
|
|
|
2017-07-07 19:11:41 -04:00
|
|
|
QString fname {QDir::toNativeSeparators(m_config.writeable_data_dir ().absoluteFilePath ("wsjtx_wisdom.dat"))};
|
2014-11-21 10:17:22 -05:00
|
|
|
QByteArray cfname=fname.toLocal8Bit();
|
2014-11-21 17:10:25 -05:00
|
|
|
fftwf_import_wisdom_from_filename(cfname);
|
2014-11-21 10:17:22 -05:00
|
|
|
|
2017-07-24 15:27:23 -04:00
|
|
|
//genStdMsgs(m_rpt);
|
2016-06-10 11:54:16 -04:00
|
|
|
m_ntx = 6;
|
2013-08-06 13:22:33 -04:00
|
|
|
ui->txrb6->setChecked(true);
|
2015-04-22 13:48:03 -04:00
|
|
|
|
2016-01-11 10:00:43 -05:00
|
|
|
connect (&m_wav_future_watcher, &QFutureWatcher<void>::finished, this, &MainWindow::diskDat);
|
2012-05-22 13:09:48 -04:00
|
|
|
|
2016-06-10 11:54:16 -04:00
|
|
|
connect(&watcher3, SIGNAL(finished()),this,SLOT(fast_decode_done()));
|
2020-08-08 12:12:48 -04:00
|
|
|
if (!m_config.audio_input_device ().isNull ())
|
|
|
|
{
|
|
|
|
Q_EMIT startAudioInputStream (m_config.audio_input_device ()
|
2020-12-07 15:34:56 -05:00
|
|
|
, m_rx_audio_buffer_frames
|
2020-08-08 12:12:48 -04:00
|
|
|
, m_detector, m_downSampleFactor, m_config.audio_input_channel ());
|
|
|
|
}
|
|
|
|
if (!m_config.audio_output_device ().isNull ())
|
|
|
|
{
|
|
|
|
Q_EMIT initializeAudioOutputStream (m_config.audio_output_device ()
|
|
|
|
, AudioDevice::Mono == m_config.audio_output_channel () ? 1 : 2
|
2020-12-02 20:49:21 -05:00
|
|
|
, m_tx_audio_buffer_frames);
|
2020-08-08 12:12:48 -04:00
|
|
|
}
|
2014-09-24 13:25:19 -04:00
|
|
|
Q_EMIT transmitFrequency (ui->TxFreqSpinBox->value () - m_XIT);
|
2012-05-22 13:09:48 -04:00
|
|
|
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
enable_DXCC_entity (m_config.DXCC ()); // sets text window proportions and (re)inits the logbook
|
2013-07-31 07:29:42 -04:00
|
|
|
|
2015-11-22 09:39:36 -05:00
|
|
|
// this must be done before initializing the mode as some modes need
|
2016-04-06 13:11:58 -04:00
|
|
|
// to turn off split on the rig e.g. WSPR
|
2016-04-20 15:33:33 -04:00
|
|
|
m_config.transceiver_online ();
|
2016-07-01 20:25:38 -04:00
|
|
|
bool vhf {m_config.enable_VHF_features ()};
|
2015-04-22 13:48:03 -04:00
|
|
|
|
2016-06-10 11:54:16 -04:00
|
|
|
ui->txFirstCheckBox->setChecked(m_txFirst);
|
|
|
|
morse_(const_cast<char *> (m_config.my_callsign ().toLatin1().constData()),
|
|
|
|
const_cast<int *> (icw), &m_ncw, m_config.my_callsign ().length());
|
|
|
|
on_actionWide_Waterfall_triggered();
|
2016-07-12 11:45:27 -04:00
|
|
|
ui->cbShMsgs->setChecked(m_bShMsgs);
|
2016-12-30 16:46:29 -05:00
|
|
|
ui->cbSWL->setChecked(m_bSWL);
|
2016-06-10 11:54:16 -04:00
|
|
|
if(m_bFast9) m_bFastMode=true;
|
2017-06-07 15:58:25 -04:00
|
|
|
ui->cbFast9->setChecked(m_bFast9 or m_bFastMode);
|
2016-06-11 14:50:41 -04:00
|
|
|
|
2019-06-25 09:35:58 -04:00
|
|
|
set_mode (m_mode);
|
2017-01-03 16:37:38 -05:00
|
|
|
if(m_mode=="Echo") monitor(false); //Don't auto-start Monitor in Echo mode.
|
2016-06-11 14:50:41 -04:00
|
|
|
|
2020-05-26 10:28:14 -04:00
|
|
|
ui->sbSubmode->setValue (vhf ? m_nSubMode : 0); //Submodes require VHF features
|
|
|
|
if(m_mode=="ISCAT" and !vhf) mode_label.setText("ISCAT A");
|
2016-09-13 13:52:45 -04:00
|
|
|
if(m_mode=="MSK144") {
|
2016-09-06 11:36:17 -04:00
|
|
|
Q_EMIT transmitFrequency (1000.0);
|
|
|
|
} else {
|
|
|
|
Q_EMIT transmitFrequency (ui->TxFreqSpinBox->value() - m_XIT);
|
|
|
|
}
|
2016-06-10 11:54:16 -04:00
|
|
|
m_saveDecoded=ui->actionSave_decoded->isChecked();
|
|
|
|
m_saveAll=ui->actionSave_all->isChecked();
|
2020-05-12 23:06:40 -04:00
|
|
|
ui->TxPowerComboBox->setCurrentIndex(int(.3 * m_dBm + .2));
|
2020-07-25 21:58:04 -04:00
|
|
|
ui->cbUploadWSPR_Spots->setChecked(m_uploadWSPRSpots);
|
2016-06-10 11:54:16 -04:00
|
|
|
if((m_ndepth&7)==1) ui->actionQuickDecode->setChecked(true);
|
|
|
|
if((m_ndepth&7)==2) ui->actionMediumDecode->setChecked(true);
|
|
|
|
if((m_ndepth&7)==3) ui->actionDeepestDecode->setChecked(true);
|
2017-01-06 08:53:06 -05:00
|
|
|
ui->actionInclude_averaging->setChecked(m_ndepth&16);
|
|
|
|
ui->actionInclude_correlation->setChecked(m_ndepth&32);
|
|
|
|
ui->actionEnable_AP_DXcall->setChecked(m_ndepth&64);
|
2016-06-10 11:54:16 -04:00
|
|
|
|
2016-09-17 09:34:40 -04:00
|
|
|
m_UTCdisk=-1;
|
2016-09-29 09:29:20 -04:00
|
|
|
m_fCPUmskrtd=0.0;
|
2016-09-28 15:08:19 -04:00
|
|
|
m_bFastDone=false;
|
2016-10-17 12:51:14 -04:00
|
|
|
m_bAltV=false;
|
2016-10-31 10:24:02 -04:00
|
|
|
m_bNoMoreFiles=false;
|
2016-11-22 10:47:59 -05:00
|
|
|
m_bDoubleClicked=false;
|
2017-07-09 15:25:28 -04:00
|
|
|
m_bCallingCQ=false;
|
2017-09-20 15:11:04 -04:00
|
|
|
m_bCheckedContest=false;
|
2017-11-02 14:45:19 -04:00
|
|
|
m_bDisplayedOnce=false;
|
2016-10-19 14:09:27 -04:00
|
|
|
m_wait=0;
|
2017-11-02 16:35:22 -04:00
|
|
|
m_isort=-3;
|
2019-12-08 13:39:37 -05:00
|
|
|
m_max_dB=70;
|
2017-08-25 12:59:58 -04:00
|
|
|
m_CQtype="CQ";
|
2016-09-07 15:00:55 -04:00
|
|
|
fixStop();
|
2016-03-21 12:03:11 -04:00
|
|
|
VHF_features_enabled(m_config.enable_VHF_features());
|
2016-10-24 10:56:14 -04:00
|
|
|
m_wideGraph->setVHF(m_config.enable_VHF_features());
|
2016-03-21 12:03:11 -04:00
|
|
|
|
2015-05-27 09:08:28 -04:00
|
|
|
connect( wsprNet, SIGNAL(uploadStatus(QString)), this, SLOT(uploadResponse(QString)));
|
2017-05-27 16:04:44 -04:00
|
|
|
|
2016-06-10 11:54:16 -04:00
|
|
|
statusChanged();
|
2016-08-04 11:20:16 -04:00
|
|
|
|
2016-10-21 14:07:12 -04:00
|
|
|
m_fastGraph->setMode(m_mode);
|
2016-06-30 08:46:14 -04:00
|
|
|
m_wideGraph->setMode(m_mode);
|
|
|
|
m_wideGraph->setModeTx(m_modeTx);
|
|
|
|
|
2016-07-01 07:36:59 -04:00
|
|
|
connect (&minuteTimer, &QTimer::timeout, this, &MainWindow::on_the_minute);
|
|
|
|
minuteTimer.setSingleShot (true);
|
2016-07-03 22:31:50 -04:00
|
|
|
minuteTimer.start (ms_minute_error () + 60 * 1000);
|
2016-08-06 09:52:14 -04:00
|
|
|
|
|
|
|
connect (&splashTimer, &QTimer::timeout, this, &MainWindow::splash_done);
|
|
|
|
splashTimer.setSingleShot (true);
|
|
|
|
splashTimer.start (20 * 1000);
|
2018-07-02 10:40:50 -04:00
|
|
|
|
2018-12-09 19:47:31 -05:00
|
|
|
if(QCoreApplication::applicationVersion().contains("-devel") or
|
|
|
|
QCoreApplication::applicationVersion().contains("-rc")) {
|
2020-05-03 13:56:25 -04:00
|
|
|
QTimer::singleShot (0, this, SLOT (not_GA_warning_message ()));
|
2018-12-09 19:47:31 -05:00
|
|
|
}
|
2018-09-10 13:07:30 -04:00
|
|
|
|
2019-04-08 12:36:05 -04:00
|
|
|
ui->pbBestSP->setVisible(m_mode=="FT4");
|
2020-11-26 20:14:12 -05:00
|
|
|
|
2018-11-14 11:33:46 -05:00
|
|
|
// this must be the last statement of constructor
|
2016-05-07 15:32:52 -04:00
|
|
|
if (!m_valid) throw std::runtime_error {"Fatal initialization exception"};
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
}
|
2012-07-18 09:35:54 -04:00
|
|
|
|
2018-02-24 19:57:45 -05:00
|
|
|
void MainWindow::not_GA_warning_message ()
|
|
|
|
{
|
2020-11-14 20:12:55 -05:00
|
|
|
MessageBox::critical_message (this,
|
|
|
|
"This is a pre-release version of WSJT-X 2.3.0 made\n"
|
|
|
|
"available for testing purposes. By design it will\n"
|
2021-01-24 19:46:23 -05:00
|
|
|
"be nonfunctional after 0000 UTC on Feb 2, 2021.");
|
2020-11-14 20:12:55 -05:00
|
|
|
auto now = QDateTime::currentDateTimeUtc ();
|
2021-01-24 19:28:30 -05:00
|
|
|
if (now >= QDateTime {{2021, 2, 2}, {0, 0}, Qt::UTC}) {
|
2020-11-14 20:12:55 -05:00
|
|
|
Q_EMIT finished ();
|
|
|
|
}
|
2018-02-24 19:57:45 -05:00
|
|
|
}
|
|
|
|
|
2017-09-09 15:34:54 -04:00
|
|
|
void MainWindow::initialize_fonts ()
|
|
|
|
{
|
|
|
|
set_application_font (m_config.text_font ());
|
|
|
|
setDecodedTextFont (m_config.decoded_text_font ());
|
|
|
|
}
|
|
|
|
|
2016-08-06 09:52:14 -04:00
|
|
|
void MainWindow::splash_done ()
|
|
|
|
{
|
2016-08-12 12:12:52 -04:00
|
|
|
m_splash && m_splash->close ();
|
2016-08-06 09:52:14 -04:00
|
|
|
}
|
|
|
|
|
2016-07-01 07:36:59 -04:00
|
|
|
void MainWindow::on_the_minute ()
|
|
|
|
{
|
|
|
|
if (minuteTimer.isSingleShot ())
|
|
|
|
{
|
|
|
|
minuteTimer.setSingleShot (false);
|
|
|
|
minuteTimer.start (60 * 1000); // run free
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2016-07-03 22:31:50 -04:00
|
|
|
auto const& ms_error = ms_minute_error ();
|
|
|
|
if (qAbs (ms_error) > 1000) // keep drift within +-1s
|
2016-07-01 07:36:59 -04:00
|
|
|
{
|
|
|
|
minuteTimer.setSingleShot (true);
|
2016-07-03 22:31:50 -04:00
|
|
|
minuteTimer.start (ms_error + 60 * 1000);
|
2016-07-01 07:36:59 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-07-23 13:51:05 -04:00
|
|
|
if (m_config.watchdog () && m_mode!="WSPR" && m_mode!="FST4W") {
|
2020-07-02 09:39:11 -04:00
|
|
|
if (m_idleMinutes < m_config.watchdog ()) ++m_idleMinutes;
|
|
|
|
update_watchdog_label ();
|
|
|
|
} else {
|
|
|
|
tx_watchdog (false);
|
|
|
|
}
|
2016-07-01 07:36:59 -04:00
|
|
|
}
|
|
|
|
|
2012-07-18 09:35:54 -04:00
|
|
|
//--------------------------------------------------- MainWindow destructor
|
2012-05-22 13:09:48 -04:00
|
|
|
MainWindow::~MainWindow()
|
|
|
|
{
|
2016-04-06 13:11:58 -04:00
|
|
|
m_astroWidget.reset ();
|
2017-07-07 19:11:41 -04:00
|
|
|
QString fname {QDir::toNativeSeparators(m_config.writeable_data_dir ().absoluteFilePath ("wsjtx_wisdom.dat"))};
|
2014-11-21 10:17:22 -05:00
|
|
|
QByteArray cfname=fname.toLocal8Bit();
|
|
|
|
fftwf_export_wisdom_to_filename(cfname);
|
2015-07-13 07:00:55 -04:00
|
|
|
m_audioThread.quit ();
|
|
|
|
m_audioThread.wait ();
|
2016-07-06 16:16:38 -04:00
|
|
|
remove_child_from_event_filter (this);
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
//-------------------------------------------------------- writeSettings()
|
|
|
|
void MainWindow::writeSettings()
|
|
|
|
{
|
2013-08-10 11:29:55 -04:00
|
|
|
m_settings->beginGroup("MainWindow");
|
2020-11-26 20:14:12 -05:00
|
|
|
if (ui->actionSWL_Mode->isChecked ())
|
|
|
|
{
|
|
|
|
m_settings->setValue ("SWLView", true);
|
|
|
|
m_settings->setValue ("ShowMenus", ui->cbMenus->isChecked ());
|
|
|
|
m_settings->setValue ("geometry", geometries ()[0]);
|
|
|
|
m_settings->setValue ("SWLModeGeometry", saveGeometry ());
|
|
|
|
m_settings->setValue ("geometryNoControls", geometries ()[2]);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if (ui->cbMenus->isChecked())
|
|
|
|
{
|
|
|
|
m_settings->setValue ("SWLView", ui->actionSWL_Mode->isChecked ());
|
|
|
|
m_settings->setValue ("ShowMenus", true);
|
|
|
|
m_settings->setValue ("geometry", saveGeometry ());
|
|
|
|
m_settings->setValue ("SWLModeGeometry", geometries ()[1]);
|
|
|
|
m_settings->setValue ("geometryNoControls", geometries ()[2]);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
m_settings->setValue ("SWLView", ui->actionSWL_Mode->isChecked ());
|
|
|
|
m_settings->setValue ("ShowMenus", false);
|
|
|
|
m_settings->setValue ("geometry", geometries ()[0]);
|
|
|
|
m_settings->setValue ("SWLModeGeometry", geometries ()[1]);
|
|
|
|
m_settings->setValue ("geometryNoControls", saveGeometry ());
|
|
|
|
}
|
|
|
|
}
|
2013-08-10 11:29:55 -04:00
|
|
|
m_settings->setValue ("state", saveState ());
|
|
|
|
m_settings->setValue("MRUdir", m_path);
|
|
|
|
m_settings->setValue("TxFirst",m_txFirst);
|
|
|
|
m_settings->setValue("DXcall",ui->dxCallEntry->text());
|
|
|
|
m_settings->setValue("DXgrid",ui->dxGridEntry->text());
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
m_settings->setValue ("AstroDisplayed", m_astroWidget && m_astroWidget->isVisible());
|
2018-11-07 12:49:45 -05:00
|
|
|
m_settings->setValue ("MsgAvgDisplayed", m_msgAvgWidget && m_msgAvgWidget->isVisible ());
|
|
|
|
m_settings->setValue ("FoxLogDisplayed", m_foxLogWindow && m_foxLogWindow->isVisible ());
|
2018-11-11 23:44:03 -05:00
|
|
|
m_settings->setValue ("ContestLogDisplayed", m_contestLogWindow && m_contestLogWindow->isVisible ());
|
2017-07-09 15:25:28 -04:00
|
|
|
m_settings->setValue("CallFirst",ui->cbFirst->isChecked());
|
2017-12-01 15:54:35 -05:00
|
|
|
m_settings->setValue("HoundSort",ui->comboBoxHoundSort->currentIndex());
|
2017-12-07 12:09:03 -05:00
|
|
|
m_settings->setValue("FoxNlist",ui->sbNlist->value());
|
2017-11-15 15:47:24 -05:00
|
|
|
m_settings->setValue("FoxNslots",ui->sbNslots->value());
|
2019-12-08 13:39:37 -05:00
|
|
|
m_settings->setValue("FoxMaxDB_v2",ui->sbMax_dB->value()); // original key abandoned
|
2018-11-11 23:09:27 -05:00
|
|
|
m_settings->setValue ("SerialNumber",ui->sbSerialNumber->value ());
|
2013-08-10 11:29:55 -04:00
|
|
|
m_settings->endGroup();
|
|
|
|
|
|
|
|
m_settings->beginGroup("Common");
|
|
|
|
m_settings->setValue("Mode",m_mode);
|
|
|
|
m_settings->setValue("ModeTx",m_modeTx);
|
|
|
|
m_settings->setValue("SaveNone",ui->actionNone->isChecked());
|
|
|
|
m_settings->setValue("SaveDecoded",ui->actionSave_decoded->isChecked());
|
|
|
|
m_settings->setValue("SaveAll",ui->actionSave_all->isChecked());
|
|
|
|
m_settings->setValue("NDepth",m_ndepth);
|
2015-04-22 13:48:03 -04:00
|
|
|
m_settings->setValue("RxFreq",ui->RxFreqSpinBox->value());
|
|
|
|
m_settings->setValue("TxFreq",ui->TxFreqSpinBox->value());
|
2015-05-27 09:08:28 -04:00
|
|
|
m_settings->setValue("WSPRfreq",ui->WSPRfreqSpinBox->value());
|
2020-09-05 10:34:55 -04:00
|
|
|
m_settings->setValue("FST4W_RxFreq",ui->sbFST4W_RxFreq->value());
|
|
|
|
m_settings->setValue("FST4W_FTol",ui->sbFST4W_FTol->value());
|
2020-09-16 17:02:40 -04:00
|
|
|
m_settings->setValue("FST4_FLow",ui->sbF_Low->value());
|
|
|
|
m_settings->setValue("FST4_FHigh",ui->sbF_High->value());
|
2015-04-22 13:48:03 -04:00
|
|
|
m_settings->setValue("SubMode",ui->sbSubmode->value());
|
|
|
|
m_settings->setValue("DTtol",m_DTtol);
|
2017-05-27 16:04:44 -04:00
|
|
|
m_settings->setValue("Ftol", ui->sbFtol->value ());
|
2015-05-27 09:08:28 -04:00
|
|
|
m_settings->setValue("MinSync",m_minSync);
|
2016-12-22 09:24:56 -05:00
|
|
|
m_settings->setValue ("AutoSeq", ui->cbAutoSeq->isChecked ());
|
2017-12-19 16:02:01 -05:00
|
|
|
m_settings->setValue ("RxAll", ui->cbRxAll->isChecked ());
|
2016-07-12 11:45:27 -04:00
|
|
|
m_settings->setValue("ShMsgs",m_bShMsgs);
|
2016-12-30 16:46:29 -05:00
|
|
|
m_settings->setValue("SWL",ui->cbSWL->isChecked());
|
2016-12-22 09:24:56 -05:00
|
|
|
m_settings->setValue ("DialFreq", QVariant::fromValue(m_lastMonitoredFrequency));
|
2013-08-10 11:29:55 -04:00
|
|
|
m_settings->setValue("OutAttenuation", ui->outAttenuation->value ());
|
|
|
|
m_settings->setValue("NoSuffix",m_noSuffix);
|
|
|
|
m_settings->setValue("GUItab",ui->tabWidget->currentIndex());
|
|
|
|
m_settings->setValue("OutBufSize",outBufSize);
|
2018-02-10 21:29:27 -05:00
|
|
|
m_settings->setValue ("HoldTxFreq", ui->cbHoldTxFreq->isChecked ());
|
2020-08-14 21:57:23 -04:00
|
|
|
m_settings->setValue("PctTx", ui->sbTxPercent->value ());
|
2020-09-04 15:38:04 -04:00
|
|
|
m_settings->setValue("RoundRobin",ui->RoundRobin->currentText());
|
2015-05-27 09:08:28 -04:00
|
|
|
m_settings->setValue("dBm",m_dBm);
|
2018-07-30 11:48:18 -04:00
|
|
|
m_settings->setValue("RR73",m_send_RR73);
|
2016-12-22 09:24:56 -05:00
|
|
|
m_settings->setValue ("WSPRPreferType1", ui->WSPR_prefer_type_1_check_box->isChecked ());
|
2020-07-25 21:58:04 -04:00
|
|
|
m_settings->setValue("UploadSpots",m_uploadWSPRSpots);
|
2018-11-16 09:30:40 -05:00
|
|
|
m_settings->setValue("NoOwnCall",ui->cbNoOwnCall->isChecked());
|
2016-12-22 09:24:56 -05:00
|
|
|
m_settings->setValue ("BandHopping", ui->band_hopping_group_box->isChecked ());
|
2017-05-27 16:04:44 -04:00
|
|
|
m_settings->setValue ("TRPeriod", ui->sbTR->value ());
|
2020-07-23 13:51:05 -04:00
|
|
|
m_settings->setValue ("TRPeriod_FST4W", ui->sbTR_FST4W->value ());
|
2015-11-17 20:28:12 -05:00
|
|
|
m_settings->setValue("FastMode",m_bFastMode);
|
|
|
|
m_settings->setValue("Fast9",m_bFast9);
|
2016-12-22 09:24:56 -05:00
|
|
|
m_settings->setValue ("CQTxfreq", ui->sbCQTxFreq->value ());
|
2016-10-25 16:24:09 -04:00
|
|
|
m_settings->setValue("pwrBandTxMemory",m_pwrBandTxMemory);
|
|
|
|
m_settings->setValue("pwrBandTuneMemory",m_pwrBandTuneMemory);
|
2017-11-04 13:03:56 -04:00
|
|
|
m_settings->setValue ("FT8AP", ui->actionEnable_AP_FT8->isChecked ());
|
2017-12-02 11:04:52 -05:00
|
|
|
m_settings->setValue ("JT65AP", ui->actionEnable_AP_JT65->isChecked ());
|
2020-11-26 20:14:12 -05:00
|
|
|
m_settings->setValue("SplitterState",ui->decodes_splitter->saveState());
|
2020-07-23 10:58:10 -04:00
|
|
|
m_settings->setValue("Blanker",ui->sbNB->value());
|
2020-07-14 11:27:41 -04:00
|
|
|
|
2017-02-20 21:13:13 -05:00
|
|
|
{
|
|
|
|
QList<QVariant> coeffs; // suitable for QSettings
|
|
|
|
for (auto const& coeff : m_phaseEqCoefficients)
|
|
|
|
{
|
2017-02-23 11:21:26 -05:00
|
|
|
coeffs << coeff;
|
2017-02-20 21:13:13 -05:00
|
|
|
}
|
|
|
|
m_settings->setValue ("PhaseEqualizationCoefficients", QVariant {coeffs});
|
|
|
|
}
|
2013-08-10 11:29:55 -04:00
|
|
|
m_settings->endGroup();
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
//---------------------------------------------------------- readSettings()
|
|
|
|
void MainWindow::readSettings()
|
|
|
|
{
|
2018-03-21 16:15:46 -04:00
|
|
|
ui->cbAutoSeq->setVisible(false);
|
|
|
|
ui->cbFirst->setVisible(false);
|
2013-08-10 11:29:55 -04:00
|
|
|
m_settings->beginGroup("MainWindow");
|
2020-11-26 20:14:12 -05:00
|
|
|
std::array<QByteArray, 3> the_geometries;
|
|
|
|
the_geometries[0] = m_settings->value ("geometry", saveGeometry ()).toByteArray ();
|
|
|
|
the_geometries[1] = m_settings->value ("SWLModeGeometry", saveGeometry ()).toByteArray ();
|
|
|
|
the_geometries[2] = m_settings->value ("geometryNoControls", saveGeometry ()).toByteArray ();
|
|
|
|
auto SWL_mode = m_settings->value ("SWLView", false).toBool ();
|
|
|
|
auto show_menus = m_settings->value ("ShowMenus", true).toBool ();
|
|
|
|
ui->actionSWL_Mode->setChecked (SWL_mode);
|
|
|
|
ui->cbMenus->setChecked (show_menus);
|
|
|
|
auto current_view_mode = SWL_mode ? 1 : show_menus ? 0 : 2;
|
|
|
|
change_layout (current_view_mode);
|
|
|
|
geometries (current_view_mode, the_geometries);
|
2013-08-10 11:29:55 -04:00
|
|
|
restoreState (m_settings->value ("state", saveState ()).toByteArray ());
|
2016-07-10 18:20:30 -04:00
|
|
|
ui->dxCallEntry->setText (m_settings->value ("DXcall", QString {}).toString ());
|
|
|
|
ui->dxGridEntry->setText (m_settings->value ("DXgrid", QString {}).toString ());
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
m_path = m_settings->value("MRUdir", m_config.save_directory ().absolutePath ()).toString ();
|
2013-08-10 11:29:55 -04:00
|
|
|
m_txFirst = m_settings->value("TxFirst",false).toBool();
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
auto displayAstro = m_settings->value ("AstroDisplayed", false).toBool ();
|
2015-04-22 13:48:03 -04:00
|
|
|
auto displayMsgAvg = m_settings->value ("MsgAvgDisplayed", false).toBool ();
|
2018-11-07 12:49:45 -05:00
|
|
|
auto displayFoxLog = m_settings->value ("FoxLogDisplayed", false).toBool ();
|
2018-11-11 23:44:03 -05:00
|
|
|
auto displayContestLog = m_settings->value ("ContestLogDisplayed", false).toBool ();
|
2017-07-09 15:25:28 -04:00
|
|
|
ui->cbFirst->setChecked(m_settings->value("CallFirst",true).toBool());
|
2017-12-01 15:54:35 -05:00
|
|
|
ui->comboBoxHoundSort->setCurrentIndex(m_settings->value("HoundSort",3).toInt());
|
2017-12-07 12:09:03 -05:00
|
|
|
ui->sbNlist->setValue(m_settings->value("FoxNlist",12).toInt());
|
2018-10-15 11:09:54 -04:00
|
|
|
m_Nslots=m_settings->value("FoxNslots",5).toInt();
|
|
|
|
ui->sbNslots->setValue(m_Nslots);
|
2019-12-08 13:39:37 -05:00
|
|
|
ui->sbMax_dB->setValue(m_settings->value("FoxMaxDB_v2",70).toInt());
|
2018-11-11 23:09:27 -05:00
|
|
|
ui->sbSerialNumber->setValue (m_settings->value ("SerialNumber", 1).toInt ());
|
2013-08-10 11:29:55 -04:00
|
|
|
m_settings->endGroup();
|
2012-05-22 13:09:48 -04:00
|
|
|
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
// do this outside of settings group because it uses groups internally
|
2016-04-06 13:11:58 -04:00
|
|
|
ui->actionAstronomical_data->setChecked (displayAstro);
|
2015-11-17 20:28:12 -05:00
|
|
|
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
m_settings->beginGroup("Common");
|
2013-08-10 11:29:55 -04:00
|
|
|
m_mode=m_settings->value("Mode","JT9").toString();
|
|
|
|
m_modeTx=m_settings->value("ModeTx","JT9").toString();
|
2014-03-05 13:20:40 -05:00
|
|
|
if(m_modeTx.mid(0,3)=="JT9") ui->pbTxMode->setText("Tx JT9 @");
|
2013-07-08 15:57:01 -04:00
|
|
|
if(m_modeTx=="JT65") ui->pbTxMode->setText("Tx JT65 #");
|
2013-08-10 11:29:55 -04:00
|
|
|
ui->actionNone->setChecked(m_settings->value("SaveNone",true).toBool());
|
2015-05-27 09:08:28 -04:00
|
|
|
ui->actionSave_decoded->setChecked(m_settings->value("SaveDecoded",false).toBool());
|
2013-08-10 11:29:55 -04:00
|
|
|
ui->actionSave_all->setChecked(m_settings->value("SaveAll",false).toBool());
|
2015-03-18 12:28:49 -04:00
|
|
|
ui->RxFreqSpinBox->setValue(0); // ensure a change is signaled
|
2014-09-24 13:25:19 -04:00
|
|
|
ui->RxFreqSpinBox->setValue(m_settings->value("RxFreq",1500).toInt());
|
2020-09-05 10:34:55 -04:00
|
|
|
ui->sbFST4W_RxFreq->setValue(0);
|
|
|
|
ui->sbFST4W_RxFreq->setValue(m_settings->value("FST4W_RxFreq",1500).toInt());
|
2020-09-16 17:02:40 -04:00
|
|
|
ui->sbF_Low->setValue(m_settings->value("FST4_FLow",600).toInt());
|
|
|
|
ui->sbF_High->setValue(m_settings->value("FST4_FHigh",1400).toInt());
|
2015-04-22 13:48:03 -04:00
|
|
|
m_nSubMode=m_settings->value("SubMode",0).toInt();
|
2018-11-01 12:20:51 -04:00
|
|
|
ui->sbFtol->setValue (m_settings->value("Ftol", 50).toInt());
|
2020-09-05 10:34:55 -04:00
|
|
|
ui->sbFST4W_FTol->setValue(m_settings->value("FST4W_FTol",100).toInt());
|
2016-12-08 10:38:54 -05:00
|
|
|
m_minSync=m_settings->value("MinSync",0).toInt();
|
|
|
|
ui->syncSpinBox->setValue(m_minSync);
|
2016-11-26 20:34:43 -05:00
|
|
|
ui->cbAutoSeq->setChecked (m_settings->value ("AutoSeq", false).toBool());
|
2017-12-19 16:02:01 -05:00
|
|
|
ui->cbRxAll->setChecked (m_settings->value ("RxAll", false).toBool());
|
2016-07-12 11:45:27 -04:00
|
|
|
m_bShMsgs=m_settings->value("ShMsgs",false).toBool();
|
2016-12-30 16:46:29 -05:00
|
|
|
m_bSWL=m_settings->value("SWL",false).toBool();
|
2015-11-17 20:28:12 -05:00
|
|
|
m_bFast9=m_settings->value("Fast9",false).toBool();
|
|
|
|
m_bFastMode=m_settings->value("FastMode",false).toBool();
|
2018-11-02 09:12:43 -04:00
|
|
|
ui->sbTR->setValue (m_settings->value ("TRPeriod", 15).toInt());
|
2020-07-23 13:51:05 -04:00
|
|
|
ui->sbTR_FST4W->setValue (m_settings->value ("TRPeriod_FST4W", 15).toInt());
|
2015-05-27 09:08:28 -04:00
|
|
|
m_lastMonitoredFrequency = m_settings->value ("DialFreq",
|
2017-05-27 16:04:44 -04:00
|
|
|
QVariant::fromValue<Frequency> (default_frequency)).value<Frequency> ();
|
2015-05-27 09:08:28 -04:00
|
|
|
ui->WSPRfreqSpinBox->setValue(0); // ensure a change is signaled
|
|
|
|
ui->WSPRfreqSpinBox->setValue(m_settings->value("WSPRfreq",1500).toInt());
|
2015-03-18 12:28:49 -04:00
|
|
|
ui->TxFreqSpinBox->setValue(0); // ensure a change is signaled
|
2014-09-24 13:25:19 -04:00
|
|
|
ui->TxFreqSpinBox->setValue(m_settings->value("TxFreq",1500).toInt());
|
2013-08-10 11:29:55 -04:00
|
|
|
m_ndepth=m_settings->value("NDepth",3).toInt();
|
2020-08-14 21:57:23 -04:00
|
|
|
ui->sbTxPercent->setValue (m_settings->value ("PctTx", 20).toInt ());
|
|
|
|
on_sbTxPercent_valueChanged (ui->sbTxPercent->value ());
|
2020-09-04 15:38:04 -04:00
|
|
|
ui->RoundRobin->setCurrentText(m_settings->value("RoundRobin",tr("Random")).toString());
|
2015-05-27 09:08:28 -04:00
|
|
|
m_dBm=m_settings->value("dBm",37).toInt();
|
2020-05-23 09:05:01 -04:00
|
|
|
m_send_RR73=m_settings->value("RR73",false).toBool();
|
2018-07-30 11:48:18 -04:00
|
|
|
if(m_send_RR73) {
|
|
|
|
m_send_RR73=false;
|
|
|
|
on_txrb4_doubleClicked();
|
|
|
|
}
|
2016-09-03 19:33:13 -04:00
|
|
|
ui->WSPR_prefer_type_1_check_box->setChecked (m_settings->value ("WSPRPreferType1", true).toBool ());
|
2020-07-25 21:58:04 -04:00
|
|
|
m_uploadWSPRSpots=m_settings->value("UploadSpots",false).toBool();
|
2018-11-16 09:30:40 -05:00
|
|
|
ui->cbNoOwnCall->setChecked(m_settings->value("NoOwnCall",false).toBool());
|
2015-06-03 21:45:40 -04:00
|
|
|
ui->band_hopping_group_box->setChecked (m_settings->value ("BandHopping", false).toBool());
|
2013-08-10 11:29:55 -04:00
|
|
|
// setup initial value of tx attenuator
|
2016-06-11 14:50:34 -04:00
|
|
|
m_block_pwr_tooltip = true;
|
2013-08-10 11:29:55 -04:00
|
|
|
ui->outAttenuation->setValue (m_settings->value ("OutAttenuation", 0).toInt ());
|
2016-06-11 14:50:34 -04:00
|
|
|
m_block_pwr_tooltip = false;
|
2017-07-09 10:16:09 -04:00
|
|
|
ui->sbCQTxFreq->setValue (m_settings->value ("CQTxFreq", 260).toInt());
|
2013-08-10 11:29:55 -04:00
|
|
|
m_noSuffix=m_settings->value("NoSuffix",false).toBool();
|
|
|
|
int n=m_settings->value("GUItab",0).toInt();
|
2013-04-08 14:31:21 -04:00
|
|
|
ui->tabWidget->setCurrentIndex(n);
|
2013-08-10 11:29:55 -04:00
|
|
|
outBufSize=m_settings->value("OutBufSize",4096).toInt();
|
2018-02-10 21:29:27 -05:00
|
|
|
ui->cbHoldTxFreq->setChecked (m_settings->value ("HoldTxFreq", false).toBool ());
|
2016-10-25 16:24:09 -04:00
|
|
|
m_pwrBandTxMemory=m_settings->value("pwrBandTxMemory").toHash();
|
|
|
|
m_pwrBandTuneMemory=m_settings->value("pwrBandTuneMemory").toHash();
|
2017-11-04 13:03:56 -04:00
|
|
|
ui->actionEnable_AP_FT8->setChecked (m_settings->value ("FT8AP", false).toBool());
|
2017-12-02 11:04:52 -05:00
|
|
|
ui->actionEnable_AP_JT65->setChecked (m_settings->value ("JT65AP", false).toBool());
|
2020-11-26 20:14:12 -05:00
|
|
|
ui->decodes_splitter->restoreState(m_settings->value("SplitterState").toByteArray());
|
2020-07-23 10:58:10 -04:00
|
|
|
ui->sbNB->setValue(m_settings->value("Blanker",0).toInt());
|
2017-02-20 21:13:13 -05:00
|
|
|
{
|
|
|
|
auto const& coeffs = m_settings->value ("PhaseEqualizationCoefficients"
|
|
|
|
, QList<QVariant> {0., 0., 0., 0., 0.}).toList ();
|
|
|
|
m_phaseEqCoefficients.clear ();
|
|
|
|
for (auto const& coeff : coeffs)
|
|
|
|
{
|
|
|
|
m_phaseEqCoefficients.append (coeff.value<double> ());
|
|
|
|
}
|
|
|
|
}
|
2013-08-10 11:29:55 -04:00
|
|
|
m_settings->endGroup();
|
2013-04-11 12:51:57 -04:00
|
|
|
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
// use these initialisation settings to tune the audio o/p buffer
|
2013-09-26 21:06:23 -04:00
|
|
|
// size and audio thread priority
|
|
|
|
m_settings->beginGroup ("Tune");
|
|
|
|
m_audioThreadPriority = static_cast<QThread::Priority> (m_settings->value ("Audio/ThreadPriority", QThread::HighPriority).toInt () % 8);
|
|
|
|
m_settings->endGroup ();
|
|
|
|
|
2018-10-30 17:06:01 -04:00
|
|
|
checkMSK144ContestType();
|
2018-10-10 13:18:40 -04:00
|
|
|
if(displayMsgAvg) on_actionMessage_averaging_triggered();
|
2018-11-11 23:44:03 -05:00
|
|
|
if (displayFoxLog) on_fox_log_action_triggered ();
|
|
|
|
if (displayContestLog) on_contest_log_action_triggered ();
|
2018-07-27 09:30:00 -04:00
|
|
|
}
|
|
|
|
|
2018-10-30 17:06:01 -04:00
|
|
|
void MainWindow::checkMSK144ContestType()
|
2018-07-27 09:30:00 -04:00
|
|
|
{
|
2018-10-31 19:09:04 -04:00
|
|
|
if(SpecOp::NONE != m_config.special_op_id())
|
2018-10-27 18:21:29 -04:00
|
|
|
{
|
2018-10-30 17:06:01 -04:00
|
|
|
if(m_mode=="MSK144" && SpecOp::EU_VHF < m_config.special_op_id())
|
2018-10-27 18:21:29 -04:00
|
|
|
{
|
|
|
|
MessageBox::warning_message (this, tr ("Improper mode"),
|
2020-01-24 12:26:36 -05:00
|
|
|
"Mode will be changed to FT8. MSK144 not available if Field Day, WW Digi, RTTY or Fox/Hound is selected.");
|
2018-10-27 18:21:29 -04:00
|
|
|
on_actionFT8_triggered();
|
|
|
|
}
|
|
|
|
}
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
|
|
|
|
2017-09-09 15:34:54 -04:00
|
|
|
void MainWindow::set_application_font (QFont const& font)
|
|
|
|
{
|
|
|
|
qApp->setFont (font);
|
|
|
|
// set font in the application style sheet as well in case it has
|
|
|
|
// been modified in the style sheet which has priority
|
2018-12-16 20:48:45 -05:00
|
|
|
QString ss;
|
|
|
|
if (qApp->styleSheet ().size ())
|
|
|
|
{
|
|
|
|
auto sheet = qApp->styleSheet ();
|
|
|
|
sheet.remove ("file:///");
|
|
|
|
QFile sf {sheet};
|
|
|
|
if (sf.open (QFile::ReadOnly | QFile::Text))
|
|
|
|
{
|
|
|
|
ss = sf.readAll () + ss;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
qApp->setStyleSheet (ss + "* {" + font_as_stylesheet (font) + '}');
|
2017-09-09 15:34:54 -04:00
|
|
|
for (auto& widget : qApp->topLevelWidgets ())
|
|
|
|
{
|
|
|
|
widget->updateGeometry ();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
void MainWindow::setDecodedTextFont (QFont const& font)
|
|
|
|
{
|
2015-04-05 08:22:01 -04:00
|
|
|
ui->decodedTextBrowser->setContentFont (font);
|
|
|
|
ui->decodedTextBrowser2->setContentFont (font);
|
2017-11-16 11:33:15 -05:00
|
|
|
ui->textBrowser4->setContentFont(font);
|
2018-10-16 19:26:04 -04:00
|
|
|
ui->textBrowser4->displayFoxToBeCalled(" ");
|
2017-11-30 13:45:51 -05:00
|
|
|
ui->textBrowser4->setText("");
|
2015-04-07 08:08:55 -04:00
|
|
|
auto style_sheet = "QLabel {" + font_as_stylesheet (font) + '}';
|
2020-10-03 19:46:59 -04:00
|
|
|
ui->lh_decodes_headings_label->setStyleSheet (ui->lh_decodes_headings_label->styleSheet () + style_sheet);
|
|
|
|
ui->rh_decodes_headings_label->setStyleSheet (ui->rh_decodes_headings_label->styleSheet () + style_sheet);
|
2016-05-18 19:22:24 -04:00
|
|
|
if (m_msgAvgWidget) {
|
|
|
|
m_msgAvgWidget->changeFont (font);
|
|
|
|
}
|
2018-11-07 12:49:45 -05:00
|
|
|
if (m_foxLogWindow) {
|
2018-11-22 20:18:39 -05:00
|
|
|
m_foxLogWindow->set_log_view_font (font);
|
2018-11-07 12:49:45 -05:00
|
|
|
}
|
2018-11-11 23:44:03 -05:00
|
|
|
if (m_contestLogWindow) {
|
2018-11-22 20:18:39 -05:00
|
|
|
m_contestLogWindow->set_log_view_font (font);
|
2018-11-11 23:44:03 -05:00
|
|
|
}
|
2015-06-25 18:41:13 -04:00
|
|
|
updateGeometry ();
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
}
|
|
|
|
|
2016-09-07 15:00:55 -04:00
|
|
|
void MainWindow::fixStop()
|
|
|
|
{
|
2016-09-09 13:46:09 -04:00
|
|
|
m_hsymStop=179;
|
2016-10-14 10:15:34 -04:00
|
|
|
if(m_mode=="WSPR") {
|
2016-09-07 15:00:55 -04:00
|
|
|
m_hsymStop=396;
|
|
|
|
} else if(m_mode=="Echo") {
|
2017-12-22 20:04:12 -05:00
|
|
|
m_hsymStop=9;
|
2016-09-07 15:00:55 -04:00
|
|
|
} else if (m_mode=="JT4"){
|
|
|
|
m_hsymStop=176;
|
2016-10-26 12:11:21 -04:00
|
|
|
if(m_config.decode_at_52s()) m_hsymStop=179;
|
2016-09-07 15:00:55 -04:00
|
|
|
} else if (m_mode=="JT9"){
|
|
|
|
m_hsymStop=173;
|
|
|
|
if(m_config.decode_at_52s()) m_hsymStop=179;
|
|
|
|
} else if (m_mode=="JT65" or m_mode=="JT9+JT65"){
|
|
|
|
m_hsymStop=174;
|
2016-10-26 12:11:21 -04:00
|
|
|
if(m_config.decode_at_52s()) m_hsymStop=179;
|
2016-09-07 15:00:55 -04:00
|
|
|
} else if (m_mode=="QRA64"){
|
2016-10-26 12:11:21 -04:00
|
|
|
m_hsymStop=179;
|
2016-12-16 11:25:07 -05:00
|
|
|
if(m_config.decode_at_52s()) m_hsymStop=186;
|
2017-01-03 16:37:38 -05:00
|
|
|
} else if (m_mode=="FreqCal"){
|
2017-01-12 13:21:58 -05:00
|
|
|
m_hsymStop=((int(m_TRperiod/0.288))/8)*8;
|
2017-06-17 09:48:45 -04:00
|
|
|
} else if (m_mode=="FT8") {
|
2017-07-06 12:12:32 -04:00
|
|
|
m_hsymStop=50;
|
2019-04-01 14:23:10 -04:00
|
|
|
} else if (m_mode=="FT4") {
|
2019-05-23 09:23:58 -04:00
|
|
|
m_hsymStop=21;
|
2020-07-23 13:51:05 -04:00
|
|
|
} else if(m_mode=="FST4" or m_mode=="FST4W") {
|
2020-07-18 13:52:09 -04:00
|
|
|
int stop[] = {39,85,187,387,1003,3107,6232};
|
|
|
|
int stop_EME[] = {48,95,197,396,1012,3107,6232};
|
2020-06-25 17:18:48 -04:00
|
|
|
int i=0;
|
|
|
|
if(m_TRperiod==30) i=1;
|
|
|
|
if(m_TRperiod==60) i=2;
|
|
|
|
if(m_TRperiod==120) i=3;
|
|
|
|
if(m_TRperiod==300) i=4;
|
2020-07-18 13:50:08 -04:00
|
|
|
if(m_TRperiod==900) i=5;
|
2020-07-21 14:56:20 -04:00
|
|
|
if(m_TRperiod==1800) i=6;
|
2020-06-25 17:18:48 -04:00
|
|
|
if(m_config.decode_at_52s()) {
|
|
|
|
m_hsymStop=stop_EME[i];
|
|
|
|
} else {
|
|
|
|
m_hsymStop=stop[i];
|
|
|
|
}
|
2020-06-17 10:56:18 -04:00
|
|
|
}
|
2016-09-07 15:00:55 -04:00
|
|
|
}
|
|
|
|
|
2012-05-22 13:09:48 -04:00
|
|
|
//-------------------------------------------------------------- dataSink()
|
2013-08-10 11:29:55 -04:00
|
|
|
void MainWindow::dataSink(qint64 frames)
|
2012-05-22 13:09:48 -04:00
|
|
|
{
|
2013-07-08 09:17:22 -04:00
|
|
|
static float s[NSMAX];
|
2017-01-05 13:35:26 -05:00
|
|
|
char line[80];
|
2019-04-02 11:39:28 -04:00
|
|
|
int k(frames);
|
2017-07-07 19:11:41 -04:00
|
|
|
QString fname {QDir::toNativeSeparators(m_config.writeable_data_dir ().absoluteFilePath ("refspec.dat"))};
|
2016-04-11 16:53:54 -04:00
|
|
|
QByteArray bafname = fname.toLatin1();
|
|
|
|
const char *c_fname = bafname.data();
|
|
|
|
int len=fname.length();
|
2016-04-08 11:23:32 -04:00
|
|
|
|
2012-05-22 13:09:48 -04:00
|
|
|
if(m_diskData) {
|
2015-12-17 15:29:55 -05:00
|
|
|
dec_data.params.ndiskdat=1;
|
2012-05-22 13:09:48 -04:00
|
|
|
} else {
|
2015-12-17 15:29:55 -05:00
|
|
|
dec_data.params.ndiskdat=0;
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
2012-10-21 15:35:10 -04:00
|
|
|
|
2016-06-13 15:52:23 -04:00
|
|
|
m_bUseRef=m_wideGraph->useRef();
|
2020-07-23 10:58:10 -04:00
|
|
|
if(!m_diskData) {
|
|
|
|
refspectrum_(&dec_data.d2[k-m_nsps/2],&m_bClearRefSpec,&m_bRefSpec,
|
|
|
|
&m_bUseRef,c_fname,len);
|
|
|
|
}
|
2016-12-24 15:05:28 -05:00
|
|
|
m_bClearRefSpec=false;
|
2016-06-13 15:52:23 -04:00
|
|
|
|
2017-03-20 15:35:17 -04:00
|
|
|
if(m_mode=="ISCAT" or m_mode=="MSK144" or m_bFast9) {
|
|
|
|
fastSink(frames);
|
2017-06-07 15:58:25 -04:00
|
|
|
if(m_bFastMode) return;
|
2017-03-20 15:35:17 -04:00
|
|
|
}
|
|
|
|
|
2016-06-03 11:45:54 -04:00
|
|
|
// Get power, spectrum, and ihsym
|
2015-12-17 15:29:55 -05:00
|
|
|
dec_data.params.nfa=m_wideGraph->nStartFreq();
|
|
|
|
dec_data.params.nfb=m_wideGraph->Fmax();
|
2020-09-16 17:02:40 -04:00
|
|
|
if(m_mode=="FST4") {
|
|
|
|
dec_data.params.nfa=ui->sbF_Low->value();
|
|
|
|
dec_data.params.nfb=ui->sbF_High->value();
|
|
|
|
}
|
2015-11-17 20:28:12 -05:00
|
|
|
int nsps=m_nsps;
|
|
|
|
if(m_bFastMode) nsps=6912;
|
2015-05-27 09:08:28 -04:00
|
|
|
int nsmo=m_wideGraph->smoothYellow()-1;
|
2019-02-25 15:04:05 -05:00
|
|
|
bool bLowSidelobes=m_config.lowSidelobes();
|
2020-07-14 11:27:41 -04:00
|
|
|
int npct=0;
|
2020-07-23 13:51:05 -04:00
|
|
|
if(m_mode.startsWith("FST4")) npct=ui->sbNB->value();
|
2020-06-17 19:28:44 -04:00
|
|
|
symspec_(&dec_data,&k,&m_TRperiod,&nsps,&m_inGain,&bLowSidelobes,&nsmo,&m_px,s,
|
2020-07-23 10:58:10 -04:00
|
|
|
&m_df3,&m_ihsym,&m_npts8,&m_pxmax,&npct);
|
2020-07-23 13:51:05 -04:00
|
|
|
if(m_mode=="WSPR" or m_mode=="FST4W") wspr_downsample_(dec_data.d2,&k);
|
2016-04-30 20:40:51 -04:00
|
|
|
if(m_ihsym <=0) return;
|
2017-03-06 10:52:09 -05:00
|
|
|
if(ui) ui->signal_meter_widget->setValue(m_px,m_pxmax); // Update thermometer
|
2012-09-25 16:26:12 -04:00
|
|
|
if(m_monitoring || m_diskData) {
|
2016-04-30 20:40:51 -04:00
|
|
|
m_wideGraph->dataSink2(s,m_df3,m_ihsym,m_diskData);
|
2012-07-12 17:22:55 -04:00
|
|
|
}
|
2019-04-01 14:23:10 -04:00
|
|
|
if(m_mode=="MSK144") return;
|
2012-07-12 17:22:55 -04:00
|
|
|
|
2016-09-07 15:00:55 -04:00
|
|
|
fixStop();
|
2017-01-09 20:39:27 -05:00
|
|
|
if (m_mode == "FreqCal"
|
|
|
|
// only calculate after 1st chunk, also skip chunk where rig
|
|
|
|
// changed frequency
|
2017-01-12 13:21:58 -05:00
|
|
|
&& !(m_ihsym % 8) && m_ihsym > 8 && m_ihsym <= m_hsymStop) {
|
2017-01-08 20:09:58 -05:00
|
|
|
int RxFreq=ui->RxFreqSpinBox->value ();
|
|
|
|
int nkhz=(m_freqNominal+RxFreq)/1000;
|
2017-05-27 16:04:44 -04:00
|
|
|
int ftol = ui->sbFtol->value ();
|
|
|
|
freqcal_(&dec_data.d2[0],&k,&nkhz,&RxFreq,&ftol,&line[0],80);
|
2017-01-04 14:07:35 -05:00
|
|
|
QString t=QString::fromLatin1(line);
|
2018-07-11 13:25:01 -04:00
|
|
|
DecodedText decodedtext {t};
|
2018-10-24 19:00:19 -04:00
|
|
|
ui->decodedTextBrowser->displayDecodedText (decodedtext,m_baseCall,m_mode,m_config.DXCC(),
|
2018-08-24 13:18:49 -04:00
|
|
|
m_logBook,m_currentBand, m_config.ppfx());
|
Improved frequency calibration
Measure check box added to FreqCal mode, check to record to fmt.all
with current calibration correction disabled, uncheck to see the
impact of the current calibration parameters.
The fmt.all file is now optionally renamed to fmt.bak when a
calibration solution is accepted. This allows users to preserve an
fmt.all file that they might have edited for best fit.
A calibration procedure might proceed thus:-
1) select FreqCal mode,
2) step through suggested calibration test frequencies deleting those
that have no usable signal,
3) enable "Menu->Tools->Execute frequency calibration cycle" and check
that suitable signals are present,
4) select a suitable FTol and T/R period,
5) check "Measure" and let the cycle complete a few times to gather
data,
6) uncheck "Measure" to complete the data capture, optionally tidy the
fmt.all file with your favourite editor,
7) push "Menu->Tools->Solve for calibration parameters" and accept if
you like what you see,
8) sit back and admire your accurately frequency calibrated station.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@8167 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2017-10-13 18:34:21 -04:00
|
|
|
if (ui->measure_check_box->isChecked ()) {
|
|
|
|
// Append results text to file "fmt.all".
|
|
|
|
QFile f {m_config.writeable_data_dir ().absoluteFilePath ("fmt.all")};
|
|
|
|
if (f.open(QIODevice::WriteOnly | QIODevice::Text | QIODevice::Append)) {
|
|
|
|
QTextStream out(&f);
|
2020-06-13 11:04:41 -04:00
|
|
|
out << t
|
|
|
|
#if QT_VERSION >= QT_VERSION_CHECK (5, 15, 0)
|
|
|
|
<< Qt::endl
|
|
|
|
#else
|
|
|
|
<< endl
|
|
|
|
#endif
|
|
|
|
;
|
Improved frequency calibration
Measure check box added to FreqCal mode, check to record to fmt.all
with current calibration correction disabled, uncheck to see the
impact of the current calibration parameters.
The fmt.all file is now optionally renamed to fmt.bak when a
calibration solution is accepted. This allows users to preserve an
fmt.all file that they might have edited for best fit.
A calibration procedure might proceed thus:-
1) select FreqCal mode,
2) step through suggested calibration test frequencies deleting those
that have no usable signal,
3) enable "Menu->Tools->Execute frequency calibration cycle" and check
that suitable signals are present,
4) select a suitable FTol and T/R period,
5) check "Measure" and let the cycle complete a few times to gather
data,
6) uncheck "Measure" to complete the data capture, optionally tidy the
fmt.all file with your favourite editor,
7) push "Menu->Tools->Solve for calibration parameters" and accept if
you like what you see,
8) sit back and admire your accurately frequency calibrated station.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@8167 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2017-10-13 18:34:21 -04:00
|
|
|
f.close();
|
|
|
|
} else {
|
|
|
|
MessageBox::warning_message (this, tr ("File Open Error")
|
|
|
|
, tr ("Cannot open \"%1\" for append: %2")
|
|
|
|
.arg (f.fileName ()).arg (f.errorString ()));
|
|
|
|
}
|
2017-01-05 15:20:43 -05:00
|
|
|
}
|
2017-01-12 16:03:30 -05:00
|
|
|
if(m_ihsym==m_hsymStop && ui->actionFrequency_calibration->isChecked()) {
|
2017-01-12 13:21:58 -05:00
|
|
|
freqCalStep();
|
2017-01-05 15:20:43 -05:00
|
|
|
}
|
2017-01-04 14:07:35 -05:00
|
|
|
}
|
|
|
|
|
2016-04-30 20:40:51 -04:00
|
|
|
if(m_ihsym==3*m_hsymStop/4) {
|
2016-04-06 13:11:58 -04:00
|
|
|
m_dialFreqRxWSPR=m_freqNominal;
|
2015-05-27 09:08:28 -04:00
|
|
|
}
|
|
|
|
|
2020-03-10 16:26:42 -04:00
|
|
|
if(m_mode=="FT8") {
|
2020-03-14 17:06:54 -04:00
|
|
|
to_jt9(m_ihsym,-1,-1); //Allow jt9 to bail out early, if necessary
|
2020-03-13 14:25:12 -04:00
|
|
|
if(m_ihsym==40 and m_decoderBusy) {
|
2020-04-22 11:34:06 -04:00
|
|
|
qDebug() << "Clearing hung decoder status";
|
2020-03-13 14:25:12 -04:00
|
|
|
decodeDone(); //Clear a hung decoder status
|
|
|
|
}
|
2020-03-10 16:26:42 -04:00
|
|
|
}
|
|
|
|
|
2020-03-11 16:03:51 -04:00
|
|
|
bool bCallDecoder=false;
|
|
|
|
if(m_ihsym==m_hsymStop) bCallDecoder=true;
|
|
|
|
if(m_mode=="FT8" and !m_diskData) {
|
|
|
|
if(m_ihsym==m_earlyDecode) bCallDecoder=true;
|
|
|
|
if(m_ihsym==m_earlyDecode2) bCallDecoder=true;
|
|
|
|
}
|
|
|
|
if(bCallDecoder) {
|
2015-06-08 10:20:30 -04:00
|
|
|
if(m_mode=="Echo") {
|
2015-06-08 15:42:20 -04:00
|
|
|
float snr=0;
|
|
|
|
int nfrit=0;
|
|
|
|
int nqual=0;
|
|
|
|
float f1=1500.0;
|
2015-06-09 15:04:21 -04:00
|
|
|
float xlevel=0.0;
|
2015-06-08 15:42:20 -04:00
|
|
|
float sigdb=0.0;
|
|
|
|
float dfreq=0.0;
|
|
|
|
float width=0.0;
|
|
|
|
echocom_.nclearave=m_nclearave;
|
2015-06-08 20:43:07 -04:00
|
|
|
int nDop=0;
|
2015-12-17 15:29:55 -05:00
|
|
|
avecho_(dec_data.d2,&nDop,&nfrit,&nqual,&f1,&xlevel,&sigdb,
|
2015-06-08 15:42:20 -04:00
|
|
|
&snr,&dfreq,&width);
|
2015-06-09 15:04:21 -04:00
|
|
|
QString t;
|
2020-05-06 21:56:57 -04:00
|
|
|
t = t.asprintf("%3d %7.1f %7.1f %7.1f %7.1f %3d",echocom_.nsum,xlevel,sigdb,
|
2015-06-09 15:04:21 -04:00
|
|
|
dfreq,width,nqual);
|
|
|
|
t=QDateTime::currentDateTimeUtc().toString("hh:mm:ss ") + t;
|
2016-05-17 16:45:40 -04:00
|
|
|
if (ui) ui->decodedTextBrowser->appendText(t);
|
2015-06-08 10:20:30 -04:00
|
|
|
if(m_echoGraph->isVisible()) m_echoGraph->plotSpec();
|
2015-06-08 15:42:20 -04:00
|
|
|
m_nclearave=0;
|
2015-06-11 11:32:55 -04:00
|
|
|
//Don't restart Monitor after an Echo transmission
|
2015-06-11 11:48:00 -04:00
|
|
|
if(m_bEchoTxed and !m_auto) {
|
|
|
|
monitor(false);
|
|
|
|
m_bEchoTxed=false;
|
|
|
|
}
|
2015-06-08 10:20:30 -04:00
|
|
|
return;
|
|
|
|
}
|
2017-01-03 16:37:38 -05:00
|
|
|
if(m_mode=="FreqCal") {
|
|
|
|
return;
|
|
|
|
}
|
2016-04-06 13:11:58 -04:00
|
|
|
if( m_dialFreqRxWSPR==0) m_dialFreqRxWSPR=m_freqNominal;
|
2012-11-01 15:54:40 -04:00
|
|
|
m_dataAvailable=true;
|
2016-04-30 20:40:51 -04:00
|
|
|
dec_data.params.npts8=(m_ihsym*m_nsps)/16;
|
2015-12-17 15:29:55 -05:00
|
|
|
dec_data.params.newdat=1;
|
|
|
|
dec_data.params.nagain=0;
|
|
|
|
dec_data.params.nzhsym=m_hsymStop;
|
2020-02-13 15:05:37 -05:00
|
|
|
if(m_mode=="FT8" and m_ihsym==m_earlyDecode and !m_diskData) dec_data.params.nzhsym=m_earlyDecode;
|
2020-03-05 15:37:31 -05:00
|
|
|
if(m_mode=="FT8" and m_ihsym==m_earlyDecode2 and !m_diskData) dec_data.params.nzhsym=m_earlyDecode2;
|
2016-06-24 13:01:51 -04:00
|
|
|
QDateTime now {QDateTime::currentDateTimeUtc ()};
|
|
|
|
m_dateTime = now.toString ("yyyy-MMM-dd hh:mm");
|
2020-07-02 09:39:11 -04:00
|
|
|
if(m_mode!="WSPR") decode(); //Start decoder
|
|
|
|
|
2020-03-05 15:37:31 -05:00
|
|
|
if(m_mode=="FT8" and !m_diskData and (m_ihsym==m_earlyDecode or m_ihsym==m_earlyDecode2)) return;
|
2020-08-08 12:12:48 -04:00
|
|
|
if (!m_diskData)
|
|
|
|
{
|
2020-11-14 15:50:27 -05:00
|
|
|
Q_EMIT reset_audio_input_stream (true); // reports dropped samples
|
2020-08-08 12:12:48 -04:00
|
|
|
}
|
2020-07-23 13:51:05 -04:00
|
|
|
if(!m_diskData and (m_saveAll or m_saveDecoded or m_mode=="WSPR" or m_mode=="FST4W")) {
|
2020-07-02 09:39:11 -04:00
|
|
|
//Always save unless "Save None"; may delete later
|
2020-06-17 10:56:18 -04:00
|
|
|
if(m_TRperiod < 60) {
|
2019-05-22 12:44:28 -04:00
|
|
|
int n=fmod(double(now.time().second()),m_TRperiod);
|
2017-06-17 09:48:45 -04:00
|
|
|
if(n<(m_TRperiod/2)) n=n+m_TRperiod;
|
|
|
|
auto const& period_start=now.addSecs(-n);
|
|
|
|
m_fnameWE=m_config.save_directory().absoluteFilePath (period_start.toString("yyMMdd_hhmmss"));
|
|
|
|
} else {
|
2019-05-22 12:44:28 -04:00
|
|
|
auto const& period_start = now.addSecs (-(now.time ().minute () % (int(m_TRperiod) / 60)) * 60);
|
2017-06-17 09:48:45 -04:00
|
|
|
m_fnameWE=m_config.save_directory ().absoluteFilePath (period_start.toString ("yyMMdd_hhmm"));
|
|
|
|
}
|
2019-04-02 13:04:40 -04:00
|
|
|
int samples=m_TRperiod*12000;
|
2019-05-22 18:02:15 -04:00
|
|
|
if(m_mode=="FT4") samples=21*3456;
|
2017-06-17 09:48:45 -04:00
|
|
|
|
2016-01-11 10:00:43 -05:00
|
|
|
// the following is potential a threading hazard - not a good
|
|
|
|
// idea to pass pointer to be processed in another thread
|
2016-10-17 09:28:30 -04:00
|
|
|
m_saveWAVWatcher.setFuture (QtConcurrent::run (std::bind (&MainWindow::save_wave_file,
|
2019-04-02 13:04:40 -04:00
|
|
|
this, m_fnameWE, &dec_data.d2[0], samples, m_config.my_callsign(),
|
2016-10-17 09:28:30 -04:00
|
|
|
m_config.my_grid(), m_mode, m_nSubMode, m_freqNominal, m_hisCall, m_hisGrid)));
|
2020-12-15 10:52:50 -05:00
|
|
|
if (m_mode=="WSPR") {
|
2016-06-24 13:01:51 -04:00
|
|
|
QString c2name_string {m_fnameWE + ".c2"};
|
2016-06-10 11:54:16 -04:00
|
|
|
int len1=c2name_string.length();
|
2015-05-27 09:08:28 -04:00
|
|
|
char c2name[80];
|
2016-06-10 11:54:16 -04:00
|
|
|
strcpy(c2name,c2name_string.toLatin1 ().constData ());
|
2015-05-27 09:08:28 -04:00
|
|
|
int nsec=120;
|
2016-12-22 09:24:56 -05:00
|
|
|
int nbfo=1500;
|
|
|
|
double f0m1500=m_freqNominal/1000000.0 + nbfo - 1500;
|
2016-08-29 13:01:38 -04:00
|
|
|
int err = savec2_(c2name,&nsec,&f0m1500,len1);
|
|
|
|
if (err!=0) MessageBox::warning_message (this, tr ("Error saving c2 file"), c2name);
|
2015-05-27 09:08:28 -04:00
|
|
|
}
|
|
|
|
}
|
2020-07-02 09:39:11 -04:00
|
|
|
if(m_mode=="WSPR") {
|
2020-06-13 11:04:41 -04:00
|
|
|
QStringList t2;
|
|
|
|
QStringList depth_args;
|
2020-07-25 21:58:04 -04:00
|
|
|
t2 << "-f" << QString {"%1"}.arg (m_dialFreqRxWSPR / 1e6, 0, 'f', 6);
|
2020-06-13 11:04:41 -04:00
|
|
|
if((m_ndepth&7)==1) depth_args << "-qB"; //2 pass w subtract, no Block detection, no shift jittering
|
|
|
|
if((m_ndepth&7)==2) depth_args << "-C" << "500" << "-o" << "4"; //3 pass, subtract, Block detection, OSD
|
|
|
|
if((m_ndepth&7)==3) depth_args << "-C" << "500" << "-o" << "4" << "-d"; //3 pass, subtract, Block detect, OSD, more candidates
|
|
|
|
QStringList degrade;
|
|
|
|
degrade << "-d" << QString {"%1"}.arg (m_config.degrade(), 4, 'f', 1);
|
|
|
|
m_cmndP1.clear ();
|
2017-05-19 11:52:48 -04:00
|
|
|
if(m_diskData) {
|
2020-06-13 11:04:41 -04:00
|
|
|
m_cmndP1 << depth_args << "-a"
|
|
|
|
<< QDir::toNativeSeparators (m_config.writeable_data_dir ().absolutePath()) << m_path;
|
2015-05-27 09:08:28 -04:00
|
|
|
} else {
|
2020-06-16 16:59:40 -04:00
|
|
|
m_cmndP1 << depth_args << "-a"
|
|
|
|
<< QDir::toNativeSeparators (m_config.writeable_data_dir ().absolutePath())
|
|
|
|
<< t2 << m_fnameWE + ".wav";
|
2015-05-27 09:08:28 -04:00
|
|
|
}
|
2016-05-17 16:45:40 -04:00
|
|
|
if (ui) ui->DecodeButton->setChecked (true);
|
2016-10-26 15:01:46 -04:00
|
|
|
p1Timer.start(1000);
|
2016-05-24 06:08:35 -04:00
|
|
|
m_decoderBusy = true;
|
|
|
|
statusUpdate ();
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
2015-05-27 09:08:28 -04:00
|
|
|
m_rxDone=true;
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-10-26 15:01:46 -04:00
|
|
|
void MainWindow::startP1()
|
|
|
|
{
|
2020-06-16 16:59:40 -04:00
|
|
|
p1.start (QDir::toNativeSeparators (QDir {QApplication::applicationDirPath ()}.absoluteFilePath ("wsprd")), m_cmndP1);
|
2016-10-26 15:01:46 -04:00
|
|
|
}
|
|
|
|
|
2019-02-21 10:08:18 -05:00
|
|
|
QString MainWindow::save_wave_file (QString const& name, short const * data, int samples,
|
2016-10-17 09:28:30 -04:00
|
|
|
QString const& my_callsign, QString const& my_grid, QString const& mode, qint32 sub_mode,
|
|
|
|
Frequency frequency, QString const& his_call, QString const& his_grid) const
|
2016-01-11 10:00:43 -05:00
|
|
|
{
|
2016-06-09 19:39:41 -04:00
|
|
|
//
|
|
|
|
// This member function runs in a thread and should not access
|
|
|
|
// members that may be changed in the GUI thread or any other thread
|
|
|
|
// without suitable synchronization.
|
|
|
|
//
|
2016-01-11 10:00:43 -05:00
|
|
|
QAudioFormat format;
|
|
|
|
format.setCodec ("audio/pcm");
|
|
|
|
format.setSampleRate (12000);
|
|
|
|
format.setChannelCount (1);
|
|
|
|
format.setSampleSize (16);
|
|
|
|
format.setSampleType (QAudioFormat::SignedInt);
|
2020-08-11 08:48:01 -04:00
|
|
|
auto source = QString {"%1; %2"}.arg (my_callsign).arg (my_grid);
|
|
|
|
auto comment = QString {"Mode=%1%2; Freq=%3%4"}
|
|
|
|
.arg (mode)
|
|
|
|
.arg (QString {(mode.contains ('J') && !mode.contains ('+'))
|
|
|
|
|| mode.startsWith ("FST4") || mode.startsWith ("QRA")
|
|
|
|
? QString {"; Sub Mode="} + QString::number (int (samples / 12000)) + QChar {'A' + sub_mode}
|
|
|
|
: QString {}})
|
|
|
|
.arg (Radio::frequency_MHz_string (frequency))
|
|
|
|
.arg (QString {mode!="WSPR" ? QString {"; DXCall=%1; DXGrid=%2"}
|
2016-06-09 19:39:41 -04:00
|
|
|
.arg (his_call)
|
|
|
|
.arg (his_grid).toLocal8Bit () : ""});
|
2016-01-11 10:00:43 -05:00
|
|
|
BWFFile::InfoDictionary list_info {
|
2016-01-20 15:50:24 -05:00
|
|
|
{{{'I','S','R','C'}}, source.toLocal8Bit ()},
|
|
|
|
{{{'I','S','F','T'}}, program_title (revision ()).simplified ().toLocal8Bit ()},
|
2018-12-01 13:16:57 -05:00
|
|
|
{{{'I','C','R','D'}}, QDateTime::currentDateTimeUtc ()
|
2016-01-11 10:00:43 -05:00
|
|
|
.toString ("yyyy-MM-ddTHH:mm:ss.zzzZ").toLocal8Bit ()},
|
2016-01-20 15:50:24 -05:00
|
|
|
{{{'I','C','M','T'}}, comment.toLocal8Bit ()},
|
2018-04-21 15:10:02 -04:00
|
|
|
};
|
|
|
|
auto file_name = name + ".wav";
|
|
|
|
BWFFile wav {format, file_name, list_info};
|
2016-06-09 19:39:41 -04:00
|
|
|
if (!wav.open (BWFFile::WriteOnly)
|
|
|
|
|| 0 > wav.write (reinterpret_cast<char const *> (data)
|
2019-02-21 10:08:18 -05:00
|
|
|
, sizeof (short) * samples))
|
2016-06-09 19:39:41 -04:00
|
|
|
{
|
2018-04-21 15:10:02 -04:00
|
|
|
return file_name + ": " + wav.errorString ();
|
2016-06-09 19:39:41 -04:00
|
|
|
}
|
|
|
|
return QString {};
|
2016-01-11 10:00:43 -05:00
|
|
|
}
|
|
|
|
|
2015-11-17 20:28:12 -05:00
|
|
|
//-------------------------------------------------------------- fastSink()
|
|
|
|
void MainWindow::fastSink(qint64 frames)
|
|
|
|
{
|
|
|
|
int k (frames);
|
|
|
|
bool decodeNow=false;
|
2016-06-24 13:01:51 -04:00
|
|
|
if(k < m_k0) { //New sequence ?
|
|
|
|
memcpy(fast_green2,fast_green,4*703); //Copy fast_green[] to fast_green2[]
|
|
|
|
memcpy(fast_s2,fast_s,4*703*64); //Copy fast_s[] into fast_s2[]
|
|
|
|
fast_jh2=fast_jh;
|
|
|
|
if(!m_diskData) memset(dec_data.d2,0,2*30*12000); //Zero the d2[] array
|
2015-11-17 20:28:12 -05:00
|
|
|
m_bFastDecodeCalled=false;
|
2016-10-17 09:28:30 -04:00
|
|
|
m_bDecoded=false;
|
2015-11-17 20:28:12 -05:00
|
|
|
}
|
|
|
|
|
2016-09-20 12:25:25 -04:00
|
|
|
QDateTime tnow=QDateTime::currentDateTimeUtc();
|
|
|
|
int ihr=tnow.toString("hh").toInt();
|
|
|
|
int imin=tnow.toString("mm").toInt();
|
|
|
|
int isec=tnow.toString("ss").toInt();
|
2019-05-22 12:44:28 -04:00
|
|
|
isec=isec - fmod(double(isec),m_TRperiod);
|
2016-09-20 12:25:25 -04:00
|
|
|
int nutc0=10000*ihr + 100*imin + isec;
|
|
|
|
if(m_diskData) nutc0=m_UTCdisk;
|
|
|
|
char line[80];
|
|
|
|
bool bmsk144=((m_mode=="MSK144") and (m_monitoring or m_diskData));
|
|
|
|
line[0]=0;
|
2016-09-28 15:08:19 -04:00
|
|
|
|
2017-01-08 20:09:58 -05:00
|
|
|
int RxFreq=ui->RxFreqSpinBox->value ();
|
2016-09-28 16:41:41 -04:00
|
|
|
int nTRpDepth=m_TRperiod + 1000*(m_ndepth & 3);
|
2016-09-29 09:29:20 -04:00
|
|
|
qint64 ms0 = QDateTime::currentMSecsSinceEpoch();
|
2019-07-02 20:51:40 -04:00
|
|
|
// ::memcpy(dec_data.params.mycall, (m_baseCall+" ").toLatin1(),sizeof dec_data.params.mycall);
|
|
|
|
::memcpy(dec_data.params.mycall,(m_config.my_callsign () + " ").toLatin1(),sizeof dec_data.params.mycall);
|
2016-10-04 10:01:02 -04:00
|
|
|
QString hisCall {ui->dxCallEntry->text ()};
|
|
|
|
bool bshmsg=ui->cbShMsgs->isChecked();
|
2016-12-30 21:05:51 -05:00
|
|
|
bool bswl=ui->cbSWL->isChecked();
|
2019-07-02 20:51:40 -04:00
|
|
|
// ::memcpy(dec_data.params.hiscall,(Radio::base_callsign (hisCall) + " ").toLatin1 ().constData (), sizeof dec_data.params.hiscall);
|
|
|
|
::memcpy(dec_data.params.hiscall,(hisCall + " ").toLatin1 ().constData (), sizeof dec_data.params.hiscall);
|
|
|
|
::memcpy(dec_data.params.mygrid, (m_config.my_grid()+" ").toLatin1(), sizeof dec_data.params.mygrid);
|
2017-01-21 22:20:46 -05:00
|
|
|
QString dataDir;
|
2017-07-07 19:11:41 -04:00
|
|
|
dataDir = m_config.writeable_data_dir ().absolutePath ();
|
2017-01-21 22:20:46 -05:00
|
|
|
char ddir[512];
|
2019-07-02 20:51:40 -04:00
|
|
|
::strncpy(ddir,dataDir.toLatin1(), sizeof (ddir) - 1);
|
2017-03-06 09:34:25 -05:00
|
|
|
float pxmax = 0;
|
|
|
|
float rmsNoGain = 0;
|
2017-05-27 16:04:44 -04:00
|
|
|
int ftol = ui->sbFtol->value ();
|
2020-03-19 11:43:22 -04:00
|
|
|
hspec_(dec_data.d2,&k,&nutc0,&nTRpDepth,&RxFreq,&ftol,&bmsk144,
|
2017-02-20 21:13:13 -05:00
|
|
|
&m_bTrain,m_phaseEqCoefficients.constData(),&m_inGain,&dec_data.params.mycall[0],
|
|
|
|
&dec_data.params.hiscall[0],&bshmsg,&bswl,
|
2020-03-19 12:04:56 -04:00
|
|
|
&ddir[0],fast_green,fast_s,&fast_jh,&pxmax,&rmsNoGain,&line[0],12,12,512,80);
|
2016-09-13 08:51:34 -04:00
|
|
|
float px = fast_green[fast_jh];
|
2015-11-17 20:28:12 -05:00
|
|
|
QString t;
|
2020-05-06 21:56:57 -04:00
|
|
|
t = t.asprintf(" Rx noise: %5.1f ",px);
|
2017-03-06 09:34:25 -05:00
|
|
|
ui->signal_meter_widget->setValue(rmsNoGain,pxmax); // Update thermometer
|
2016-09-17 09:34:40 -04:00
|
|
|
m_fastGraph->plotSpec(m_diskData,m_UTCdisk);
|
2015-11-17 20:28:12 -05:00
|
|
|
|
2016-09-20 12:25:25 -04:00
|
|
|
if(bmsk144 and (line[0]!=0)) {
|
2017-08-29 22:27:57 -04:00
|
|
|
QString message {QString::fromLatin1 (line)};
|
2018-07-11 13:25:01 -04:00
|
|
|
DecodedText decodedtext {message.replace (QChar::LineFeed, "")};
|
2018-10-24 19:00:19 -04:00
|
|
|
ui->decodedTextBrowser->displayDecodedText (decodedtext,m_baseCall,m_mode,m_config.DXCC(),
|
2018-08-24 13:18:49 -04:00
|
|
|
m_logBook,m_currentBand,m_config.ppfx());
|
2016-09-20 12:25:25 -04:00
|
|
|
m_bDecoded=true;
|
2017-09-01 01:11:57 -04:00
|
|
|
auto_sequence (decodedtext, ui->sbFtol->value (), std::numeric_limits<unsigned>::max ());
|
2016-12-16 14:36:21 -05:00
|
|
|
if (m_mode != "ISCAT") postDecode (true, decodedtext.string ());
|
2019-01-03 12:15:48 -05:00
|
|
|
// writeAllTxt(message);
|
|
|
|
write_all("Rx",message);
|
2016-10-02 19:16:47 -04:00
|
|
|
bool stdMsg = decodedtext.report(m_baseCall,
|
|
|
|
Radio::base_callsign(ui->dxCallEntry->text()),m_rptRcvd);
|
2017-07-26 17:18:59 -04:00
|
|
|
if (stdMsg) pskPost (decodedtext);
|
2016-09-28 15:08:19 -04:00
|
|
|
}
|
2016-10-02 19:16:47 -04:00
|
|
|
|
2016-09-28 15:08:19 -04:00
|
|
|
float fracTR=float(k)/(12000.0*m_TRperiod);
|
2015-11-17 20:28:12 -05:00
|
|
|
decodeNow=false;
|
2016-10-17 12:51:14 -04:00
|
|
|
if(fracTR>0.92) {
|
2016-09-28 16:41:41 -04:00
|
|
|
m_dataAvailable=true;
|
2016-09-28 15:08:19 -04:00
|
|
|
fast_decode_done();
|
2016-09-30 11:55:53 -04:00
|
|
|
m_bFastDone=true;
|
2016-09-28 15:08:19 -04:00
|
|
|
}
|
|
|
|
|
2015-11-17 20:28:12 -05:00
|
|
|
m_k0=k;
|
2016-06-16 21:27:00 -04:00
|
|
|
if(m_diskData and m_k0 >= dec_data.params.kin - 7 * 512) decodeNow=true;
|
2015-11-17 20:28:12 -05:00
|
|
|
if(!m_diskData and m_tRemaining<0.35 and !m_bFastDecodeCalled) decodeNow=true;
|
2016-10-12 14:21:45 -04:00
|
|
|
if(m_mode=="MSK144") decodeNow=false;
|
2015-11-17 20:28:12 -05:00
|
|
|
|
|
|
|
if(decodeNow) {
|
|
|
|
m_dataAvailable=true;
|
|
|
|
m_t0=0.0;
|
|
|
|
m_t1=k/12000.0;
|
|
|
|
m_kdone=k;
|
2015-12-17 15:29:55 -05:00
|
|
|
dec_data.params.newdat=1;
|
2015-11-17 20:28:12 -05:00
|
|
|
if(!m_decoderBusy) {
|
|
|
|
m_bFastDecodeCalled=true;
|
|
|
|
decode();
|
|
|
|
}
|
2016-09-28 15:08:19 -04:00
|
|
|
}
|
2016-10-17 12:51:14 -04:00
|
|
|
|
2016-09-28 15:08:19 -04:00
|
|
|
if(decodeNow or m_bFastDone) {
|
2020-03-19 14:46:41 -04:00
|
|
|
if(!m_diskData and (m_saveAll or m_saveDecoded)) {
|
2016-06-24 13:01:51 -04:00
|
|
|
QDateTime now {QDateTime::currentDateTimeUtc()};
|
2019-05-22 12:44:28 -04:00
|
|
|
int n=fmod(double(now.time().second()),m_TRperiod);
|
2016-07-14 10:22:05 -04:00
|
|
|
if(n<(m_TRperiod/2)) n=n+m_TRperiod;
|
|
|
|
auto const& period_start = now.addSecs (-n);
|
2016-06-24 13:01:51 -04:00
|
|
|
m_fnameWE = m_config.save_directory ().absoluteFilePath (period_start.toString ("yyMMdd_hhmmss"));
|
2016-10-17 12:51:14 -04:00
|
|
|
if(m_saveAll or m_bAltV or (m_bDecoded and m_saveDecoded) or (m_mode!="MSK144")) {
|
|
|
|
m_bAltV=false;
|
2016-10-17 09:28:30 -04:00
|
|
|
// the following is potential a threading hazard - not a good
|
|
|
|
// idea to pass pointer to be processed in another thread
|
|
|
|
m_saveWAVWatcher.setFuture (QtConcurrent::run (std::bind (&MainWindow::save_wave_file,
|
2019-05-22 12:44:28 -04:00
|
|
|
this, m_fnameWE, &dec_data.d2[0], int(m_TRperiod*12000.0), m_config.my_callsign(),
|
2016-10-17 09:28:30 -04:00
|
|
|
m_config.my_grid(), m_mode, m_nSubMode, m_freqNominal, m_hisCall, m_hisGrid)));
|
|
|
|
}
|
|
|
|
if(m_mode!="MSK144") {
|
2019-05-22 12:44:28 -04:00
|
|
|
killFileTimer.start (int(750.0*m_TRperiod)); //Kill 3/4 period from now
|
2016-10-17 09:28:30 -04:00
|
|
|
}
|
2015-11-17 20:28:12 -05:00
|
|
|
}
|
2016-09-30 11:55:53 -04:00
|
|
|
m_bFastDone=false;
|
2015-11-17 20:28:12 -05:00
|
|
|
}
|
2016-10-03 09:48:30 -04:00
|
|
|
float tsec=0.001*(QDateTime::currentMSecsSinceEpoch() - ms0);
|
|
|
|
m_fCPUmskrtd=0.9*m_fCPUmskrtd + 0.1*tsec;
|
2015-11-17 20:28:12 -05:00
|
|
|
}
|
|
|
|
|
2012-05-22 13:09:48 -04:00
|
|
|
void MainWindow::showSoundInError(const QString& errorMsg)
|
2016-08-12 12:12:52 -04:00
|
|
|
{
|
|
|
|
if (m_splash && m_splash->isVisible ()) m_splash->hide ();
|
|
|
|
MessageBox::critical_message (this, tr ("Error in Sound Input"), errorMsg);
|
|
|
|
}
|
2013-08-05 09:57:55 -04:00
|
|
|
|
|
|
|
void MainWindow::showSoundOutError(const QString& errorMsg)
|
2016-08-12 12:12:52 -04:00
|
|
|
{
|
|
|
|
if (m_splash && m_splash->isVisible ()) m_splash->hide ();
|
|
|
|
MessageBox::critical_message (this, tr ("Error in Sound Output"), errorMsg);
|
|
|
|
}
|
2012-05-22 13:09:48 -04:00
|
|
|
|
|
|
|
void MainWindow::showStatusMessage(const QString& statusMsg)
|
2018-11-30 11:03:20 -05:00
|
|
|
{
|
|
|
|
statusBar()->showMessage(statusMsg, 5000);
|
|
|
|
}
|
2013-04-23 16:46:04 -04:00
|
|
|
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
void MainWindow::on_actionSettings_triggered() //Setup Dialog
|
|
|
|
{
|
2015-04-15 12:40:49 -04:00
|
|
|
// things that might change that we need know about
|
2015-03-04 07:22:33 -05:00
|
|
|
auto callsign = m_config.my_callsign ();
|
2018-02-04 17:42:35 -05:00
|
|
|
auto my_grid = m_config.my_grid ();
|
2018-10-30 17:06:01 -04:00
|
|
|
SpecOp nContest0=m_config.special_op_id();
|
2020-08-15 19:38:19 -04:00
|
|
|
auto psk_on = m_config.spot_to_psk_reporter ();
|
2016-10-13 12:19:24 -04:00
|
|
|
if (QDialog::Accepted == m_config.exec ()) {
|
2018-10-30 17:06:01 -04:00
|
|
|
checkMSK144ContestType();
|
2016-10-13 12:19:24 -04:00
|
|
|
if (m_config.my_callsign () != callsign) {
|
|
|
|
m_baseCall = Radio::base_callsign (m_config.my_callsign ());
|
2020-11-12 08:30:48 -05:00
|
|
|
ui->tx1->setEnabled (elide_tx1_not_allowed () || ui->tx1->isEnabled ());
|
2016-10-13 12:19:24 -04:00
|
|
|
morse_(const_cast<char *> (m_config.my_callsign ().toLatin1().constData()),
|
|
|
|
const_cast<int *> (icw), &m_ncw, m_config.my_callsign ().length());
|
|
|
|
}
|
2018-02-04 17:42:35 -05:00
|
|
|
if (m_config.my_callsign () != callsign || m_config.my_grid () != my_grid) {
|
|
|
|
statusUpdate ();
|
|
|
|
}
|
2016-10-13 12:19:24 -04:00
|
|
|
on_dxGridEntry_textChanged (m_hisGrid); // recalculate distances in case of units change
|
|
|
|
enable_DXCC_entity (m_config.DXCC ()); // sets text window proportions and (re)inits the logbook
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
|
2020-08-15 18:32:10 -04:00
|
|
|
pskSetLocal ();
|
2020-08-15 19:38:19 -04:00
|
|
|
// this will close the connection to PSKReporter if it has been
|
|
|
|
// disabled
|
|
|
|
if (psk_on && !m_config.spot_to_psk_reporter ())
|
|
|
|
{
|
|
|
|
m_psk_Reporter.sendReport (true);
|
|
|
|
}
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
|
2020-09-20 13:20:16 -04:00
|
|
|
if(m_config.restart_audio_input () && !m_config.audio_input_device ().isNull ()) {
|
2020-08-08 11:25:14 -04:00
|
|
|
Q_EMIT startAudioInputStream (m_config.audio_input_device ()
|
2020-12-07 15:34:56 -05:00
|
|
|
, m_rx_audio_buffer_frames
|
2020-08-08 11:25:14 -04:00
|
|
|
, m_detector, m_downSampleFactor
|
|
|
|
, m_config.audio_input_channel ());
|
2016-10-13 12:19:24 -04:00
|
|
|
}
|
2015-11-17 20:28:12 -05:00
|
|
|
|
2020-09-20 13:20:16 -04:00
|
|
|
if(m_config.restart_audio_output () && !m_config.audio_output_device ().isNull ()) {
|
2020-08-08 11:25:14 -04:00
|
|
|
Q_EMIT initializeAudioOutputStream (m_config.audio_output_device ()
|
|
|
|
, AudioDevice::Mono == m_config.audio_output_channel () ? 1 : 2
|
2020-12-02 20:49:21 -05:00
|
|
|
, m_tx_audio_buffer_frames);
|
2016-10-13 12:19:24 -04:00
|
|
|
}
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
|
2016-10-13 12:19:24 -04:00
|
|
|
displayDialFrequency ();
|
2016-10-24 10:56:14 -04:00
|
|
|
bool vhf {m_config.enable_VHF_features()};
|
|
|
|
m_wideGraph->setVHF(vhf);
|
2016-10-20 15:25:48 -04:00
|
|
|
if (!vhf) ui->sbSubmode->setValue (0);
|
2016-12-16 12:14:00 -05:00
|
|
|
|
2016-10-13 12:19:24 -04:00
|
|
|
setup_status_bar (vhf);
|
|
|
|
bool b = vhf && (m_mode=="JT4" or m_mode=="JT65" or m_mode=="ISCAT" or
|
2017-07-12 09:50:17 -04:00
|
|
|
m_mode=="JT9" or m_mode=="MSK144" or m_mode=="QRA64");
|
2016-10-20 15:25:48 -04:00
|
|
|
if(b) VHF_features_enabled(b);
|
2019-06-25 09:35:58 -04:00
|
|
|
set_mode (m_mode);
|
2017-07-12 09:50:17 -04:00
|
|
|
if(b) VHF_features_enabled(b);
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
|
2017-07-16 17:42:18 -04:00
|
|
|
m_config.transceiver_online ();
|
|
|
|
if(!m_bFastMode) setXIT (ui->TxFreqSpinBox->value ());
|
2020-07-23 13:51:05 -04:00
|
|
|
if ((m_config.single_decode () && !m_mode.startsWith ("FST4")) || m_mode=="JT4") {
|
2020-10-03 19:46:59 -04:00
|
|
|
ui->lh_decodes_title_label->setText(tr ("Single-Period Decodes"));
|
|
|
|
ui->rh_decodes_title_label->setText(tr ("Average Decodes"));
|
2017-07-16 17:42:18 -04:00
|
|
|
}
|
2018-08-24 13:18:49 -04:00
|
|
|
|
2017-07-16 17:42:18 -04:00
|
|
|
update_watchdog_label ();
|
|
|
|
if(!m_splitMode) ui->cbCQTx->setChecked(false);
|
|
|
|
if(!m_config.enable_VHF_features()) {
|
2017-07-26 06:56:12 -04:00
|
|
|
ui->actionInclude_averaging->setVisible(false);
|
|
|
|
ui->actionInclude_correlation->setVisible (false);
|
2017-07-16 17:42:18 -04:00
|
|
|
ui->actionInclude_averaging->setChecked(false);
|
|
|
|
ui->actionInclude_correlation->setChecked(false);
|
2017-12-02 11:04:52 -05:00
|
|
|
ui->actionEnable_AP_JT65->setVisible(false);
|
2017-07-16 17:42:18 -04:00
|
|
|
}
|
2018-10-30 17:06:01 -04:00
|
|
|
if(m_config.special_op_id()!=nContest0) ui->tx1->setEnabled(true);
|
2019-03-14 12:03:07 -04:00
|
|
|
chkFT4();
|
2020-05-03 11:23:38 -04:00
|
|
|
if(SpecOp::EU_VHF==m_config.special_op_id() and m_config.my_grid().size()<6) {
|
|
|
|
MessageBox::information_message (this,
|
|
|
|
"EU VHF Contest messages require a 6-character locator.");
|
|
|
|
}
|
2020-05-03 11:46:56 -04:00
|
|
|
if((m_config.special_op_id()==SpecOp::FOX or m_config.special_op_id()==SpecOp::HOUND) and
|
|
|
|
m_mode!="FT8") {
|
|
|
|
MessageBox::information_message (this,
|
|
|
|
"Fox-and-Hound operation is available only in FT8 mode.");
|
|
|
|
}
|
2016-12-16 12:14:00 -05:00
|
|
|
}
|
2018-08-24 13:18:49 -04:00
|
|
|
}
|
|
|
|
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
void MainWindow::on_monitorButton_clicked (bool checked)
|
2012-05-22 13:09:48 -04:00
|
|
|
{
|
2017-09-28 11:09:46 -04:00
|
|
|
if (!m_transmitting) {
|
|
|
|
auto prior = m_monitoring;
|
|
|
|
monitor (checked);
|
|
|
|
if (checked && !prior) {
|
|
|
|
if (m_config.monitor_last_used ()) {
|
2015-02-27 13:59:08 -05:00
|
|
|
// put rig back where it was when last in control
|
2017-09-28 11:09:46 -04:00
|
|
|
setRig (m_lastMonitoredFrequency);
|
|
|
|
setXIT (ui->TxFreqSpinBox->value ());
|
|
|
|
}
|
2017-01-09 17:54:40 -05:00
|
|
|
// ensure FreqCal triggers
|
2020-09-21 14:35:16 -04:00
|
|
|
if(m_mode=="FST4W") {
|
|
|
|
on_sbFST4W_RxFreq_valueChanged(ui->sbFST4W_RxFreq->value());
|
|
|
|
} else {
|
|
|
|
on_RxFreqSpinBox_valueChanged (ui->RxFreqSpinBox->value ());
|
|
|
|
}
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
}
|
2017-09-28 11:09:46 -04:00
|
|
|
//Get Configuration in/out of strict split and mode checking
|
2020-09-08 07:54:19 -04:00
|
|
|
m_config.sync_transceiver (true, checked);
|
2017-09-28 11:09:46 -04:00
|
|
|
} else {
|
|
|
|
ui->monitorButton->setChecked (false); // disallow
|
|
|
|
}
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void MainWindow::monitor (bool state)
|
|
|
|
{
|
|
|
|
ui->monitorButton->setChecked (state);
|
2015-05-27 09:08:28 -04:00
|
|
|
if (state) {
|
2017-07-28 19:25:32 -04:00
|
|
|
m_diskData = false; // no longer reading WAV files
|
2015-05-27 09:08:28 -04:00
|
|
|
if (!m_monitoring) Q_EMIT resumeAudioInputStream ();
|
|
|
|
} else {
|
|
|
|
Q_EMIT suspendAudioInputStream ();
|
|
|
|
}
|
2014-04-21 10:39:39 -04:00
|
|
|
m_monitoring = state;
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
2013-04-09 13:52:44 -04:00
|
|
|
|
2012-05-22 13:09:48 -04:00
|
|
|
void MainWindow::on_actionAbout_triggered() //Display "About"
|
|
|
|
{
|
2015-02-23 10:19:41 -05:00
|
|
|
CAboutDlg {this}.exec ();
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
|
|
|
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
void MainWindow::on_autoButton_clicked (bool checked)
|
2012-05-22 13:09:48 -04:00
|
|
|
{
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
m_auto = checked;
|
2017-07-25 12:51:42 -04:00
|
|
|
if (checked
|
|
|
|
&& ui->cbFirst->isVisible () && ui->cbFirst->isChecked()
|
|
|
|
&& CALLING == m_QSOProgress) {
|
|
|
|
m_bAutoReply = false; // ready for next
|
|
|
|
m_bCallingCQ = true; // allows tail-enders to be picked up
|
|
|
|
ui->cbFirst->setStyleSheet ("QCheckBox{color:red}");
|
2018-02-05 14:58:03 -05:00
|
|
|
} else {
|
2017-07-25 12:51:42 -04:00
|
|
|
ui->cbFirst->setStyleSheet("");
|
|
|
|
}
|
2017-07-24 15:27:23 -04:00
|
|
|
if (!checked) m_bCallingCQ = false;
|
2016-05-24 06:08:35 -04:00
|
|
|
statusUpdate ();
|
2015-06-06 14:02:39 -04:00
|
|
|
m_bEchoTxOK=false;
|
2015-06-11 11:32:55 -04:00
|
|
|
if(m_auto and (m_mode=="Echo")) {
|
|
|
|
m_nclearave=1;
|
|
|
|
echocom_.nsum=0;
|
|
|
|
}
|
2018-02-05 14:58:03 -05:00
|
|
|
m_tAutoOn=QDateTime::currentMSecsSinceEpoch()/1000;
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
}
|
|
|
|
|
2020-08-14 21:57:23 -04:00
|
|
|
void MainWindow::on_sbTxPercent_valueChanged (int n)
|
|
|
|
{
|
|
|
|
update_dynamic_property (ui->sbTxPercent, "notx", !n);
|
|
|
|
}
|
|
|
|
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
void MainWindow::auto_tx_mode (bool state)
|
|
|
|
{
|
|
|
|
ui->autoButton->setChecked (state);
|
|
|
|
on_autoButton_clicked (state);
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
|
|
|
|
2016-06-30 12:25:47 -04:00
|
|
|
void MainWindow::keyPressEvent (QKeyEvent * e)
|
|
|
|
{
|
2018-10-30 17:06:01 -04:00
|
|
|
|
|
|
|
if(SpecOp::FOX == m_config.special_op_id()) {
|
2017-11-02 16:35:22 -04:00
|
|
|
switch (e->key()) {
|
2017-11-03 14:27:46 -04:00
|
|
|
case Qt::Key_Return:
|
|
|
|
doubleClickOnCall2(Qt::KeyboardModifier(Qt::ShiftModifier + Qt::ControlModifier + Qt::AltModifier));
|
|
|
|
return;
|
|
|
|
case Qt::Key_Enter:
|
|
|
|
doubleClickOnCall2(Qt::KeyboardModifier(Qt::ShiftModifier + Qt::ControlModifier + Qt::AltModifier));
|
|
|
|
return;
|
2017-11-14 16:01:20 -05:00
|
|
|
case Qt::Key_Backspace:
|
2017-12-06 12:05:48 -05:00
|
|
|
qDebug() << "Key Backspace";
|
2017-11-14 16:01:20 -05:00
|
|
|
return;
|
2017-11-02 16:35:22 -04:00
|
|
|
}
|
|
|
|
QMainWindow::keyPressEvent (e);
|
2017-12-15 10:26:18 -05:00
|
|
|
}
|
2017-11-02 16:35:22 -04:00
|
|
|
|
2018-10-30 17:06:01 -04:00
|
|
|
if(SpecOp::HOUND == m_config.special_op_id()) {
|
2017-12-15 10:26:18 -05:00
|
|
|
switch (e->key()) {
|
|
|
|
case Qt::Key_Return:
|
|
|
|
auto_tx_mode(true);
|
|
|
|
return;
|
|
|
|
case Qt::Key_Enter:
|
|
|
|
auto_tx_mode(true);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
QMainWindow::keyPressEvent (e);
|
2017-11-02 16:35:22 -04:00
|
|
|
}
|
2017-12-15 10:26:18 -05:00
|
|
|
|
2012-11-23 11:05:50 -05:00
|
|
|
int n;
|
2019-04-15 16:26:41 -04:00
|
|
|
bool bAltF1F6=m_config.alternate_bindings();
|
2012-05-22 13:09:48 -04:00
|
|
|
switch(e->key())
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
{
|
2019-04-16 13:21:45 -04:00
|
|
|
case Qt::Key_B:
|
|
|
|
if(m_mode=="FT4" && e->modifiers() & Qt::AltModifier) {
|
|
|
|
on_pbBestSP_clicked();
|
|
|
|
}
|
|
|
|
return;
|
2019-04-15 16:26:41 -04:00
|
|
|
case Qt::Key_C:
|
|
|
|
if(m_mode=="FT4" && e->modifiers() & Qt::AltModifier) {
|
|
|
|
bool b=ui->cbFirst->isChecked();
|
|
|
|
ui->cbFirst->setChecked(!b);
|
|
|
|
}
|
|
|
|
return;
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
case Qt::Key_D:
|
2016-10-14 10:15:34 -04:00
|
|
|
if(m_mode != "WSPR" && e->modifiers() & Qt::ShiftModifier) {
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
if(!m_decoderBusy) {
|
2015-12-17 15:29:55 -05:00
|
|
|
dec_data.params.newdat=0;
|
|
|
|
dec_data.params.nagain=0;
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
decode();
|
2014-09-25 07:35:50 -04:00
|
|
|
return;
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
}
|
2013-04-11 12:51:57 -04:00
|
|
|
}
|
|
|
|
break;
|
2017-07-07 09:08:48 -04:00
|
|
|
case Qt::Key_F1:
|
2019-04-15 16:26:41 -04:00
|
|
|
if(bAltF1F6) {
|
2018-12-28 11:19:29 -05:00
|
|
|
auto_tx_mode(true);
|
|
|
|
on_txb6_clicked();
|
|
|
|
return;
|
|
|
|
} else {
|
|
|
|
on_actionOnline_User_Guide_triggered();
|
|
|
|
return;
|
|
|
|
}
|
2017-07-07 09:08:48 -04:00
|
|
|
case Qt::Key_F2:
|
2019-04-15 16:26:41 -04:00
|
|
|
if(bAltF1F6) {
|
2018-12-28 11:19:29 -05:00
|
|
|
auto_tx_mode(true);
|
|
|
|
on_txb2_clicked();
|
|
|
|
return;
|
|
|
|
} else {
|
|
|
|
on_actionSettings_triggered();
|
|
|
|
return;
|
|
|
|
}
|
2017-07-07 09:08:48 -04:00
|
|
|
case Qt::Key_F3:
|
2019-04-15 16:26:41 -04:00
|
|
|
if(bAltF1F6) {
|
2018-12-28 11:19:29 -05:00
|
|
|
auto_tx_mode(true);
|
|
|
|
on_txb3_clicked();
|
|
|
|
return;
|
|
|
|
} else {
|
|
|
|
on_actionKeyboard_shortcuts_triggered();
|
|
|
|
return;
|
|
|
|
}
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
case Qt::Key_F4:
|
2019-04-15 16:26:41 -04:00
|
|
|
if(bAltF1F6) {
|
2018-12-28 11:19:29 -05:00
|
|
|
auto_tx_mode(true);
|
|
|
|
on_txb4_clicked();
|
|
|
|
return;
|
|
|
|
} else {
|
|
|
|
clearDX ();
|
|
|
|
ui->dxCallEntry->setFocus();
|
|
|
|
return;
|
|
|
|
}
|
2017-07-07 09:08:48 -04:00
|
|
|
case Qt::Key_F5:
|
2019-04-15 16:26:41 -04:00
|
|
|
if(bAltF1F6) {
|
2018-12-28 11:19:29 -05:00
|
|
|
auto_tx_mode(true);
|
|
|
|
on_txb5_clicked();
|
|
|
|
return;
|
|
|
|
} else {
|
|
|
|
on_actionSpecial_mouse_commands_triggered();
|
|
|
|
return;
|
|
|
|
}
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
case Qt::Key_F6:
|
2019-04-15 16:26:41 -04:00
|
|
|
if(bAltF1F6) {
|
|
|
|
bool b=ui->cbFirst->isChecked();
|
|
|
|
ui->cbFirst->setChecked(!b);
|
|
|
|
} else {
|
|
|
|
if(e->modifiers() & Qt::ShiftModifier) {
|
|
|
|
on_actionDecode_remaining_files_in_directory_triggered();
|
|
|
|
} else {
|
2019-04-17 14:53:20 -04:00
|
|
|
on_actionOpen_next_in_directory_triggered();
|
2019-04-15 16:26:41 -04:00
|
|
|
}
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
}
|
2017-07-07 09:08:48 -04:00
|
|
|
return;
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
case Qt::Key_F11:
|
2018-10-16 13:08:15 -04:00
|
|
|
if((e->modifiers() & Qt::ControlModifier) and (e->modifiers() & Qt::ShiftModifier)) {
|
2018-10-16 13:01:40 -04:00
|
|
|
m_bandEdited = true;
|
|
|
|
band_changed(m_freqNominal-2000);
|
|
|
|
} else {
|
|
|
|
n=11;
|
|
|
|
if(e->modifiers() & Qt::ControlModifier) n+=100;
|
|
|
|
if(e->modifiers() & Qt::ShiftModifier) {
|
2019-03-22 10:57:09 -04:00
|
|
|
int offset=60;
|
2019-06-06 14:14:11 -04:00
|
|
|
if(m_mode=="FT4") offset=90;
|
2019-03-22 10:57:09 -04:00
|
|
|
ui->TxFreqSpinBox->setValue(ui->TxFreqSpinBox->value()-offset);
|
2018-10-16 13:01:40 -04:00
|
|
|
} else{
|
|
|
|
bumpFqso(n);
|
|
|
|
}
|
2017-07-09 09:40:54 -04:00
|
|
|
}
|
2014-09-25 07:35:50 -04:00
|
|
|
return;
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
case Qt::Key_F12:
|
2018-10-16 13:08:15 -04:00
|
|
|
if((e->modifiers() & Qt::ControlModifier) and (e->modifiers() & Qt::ShiftModifier)) {
|
2018-10-16 13:01:40 -04:00
|
|
|
m_bandEdited = true;
|
|
|
|
band_changed(m_freqNominal+2000);
|
2017-07-11 15:02:46 -04:00
|
|
|
} else {
|
2018-10-16 13:01:40 -04:00
|
|
|
n=12;
|
|
|
|
if(e->modifiers() & Qt::ControlModifier) n+=100;
|
|
|
|
if(e->modifiers() & Qt::ShiftModifier) {
|
2019-03-22 10:57:09 -04:00
|
|
|
int offset=60;
|
2019-06-06 14:14:11 -04:00
|
|
|
if(m_mode=="FT4") offset=90;
|
2019-03-22 10:57:09 -04:00
|
|
|
ui->TxFreqSpinBox->setValue(ui->TxFreqSpinBox->value()+offset);
|
2018-10-16 13:01:40 -04:00
|
|
|
} else {
|
|
|
|
bumpFqso(n);
|
|
|
|
}
|
2017-07-09 09:40:54 -04:00
|
|
|
}
|
2014-09-25 07:35:50 -04:00
|
|
|
return;
|
2018-10-19 17:45:53 -04:00
|
|
|
case Qt::Key_Escape:
|
|
|
|
m_nextCall="";
|
|
|
|
ui->labNextCall->setStyleSheet("");
|
|
|
|
ui->labNextCall->setText("");
|
|
|
|
on_stopTxButton_clicked();
|
|
|
|
abortQSO();
|
|
|
|
return;
|
2017-07-07 09:08:48 -04:00
|
|
|
case Qt::Key_E:
|
2018-10-30 17:06:01 -04:00
|
|
|
if((e->modifiers() & Qt::ShiftModifier) and SpecOp::FOX > m_config.special_op_id()) {
|
2017-07-07 09:08:48 -04:00
|
|
|
ui->txFirstCheckBox->setChecked(false);
|
|
|
|
return;
|
|
|
|
}
|
2018-10-30 17:06:01 -04:00
|
|
|
else if((e->modifiers() & Qt::ControlModifier) and SpecOp::FOX > m_config.special_op_id()) {
|
2017-07-07 09:08:48 -04:00
|
|
|
ui->txFirstCheckBox->setChecked(true);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
break;
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
case Qt::Key_F:
|
|
|
|
if(e->modifiers() & Qt::ControlModifier) {
|
|
|
|
if(ui->tabWidget->currentIndex()==0) {
|
|
|
|
ui->tx5->clearEditText();
|
|
|
|
ui->tx5->setFocus();
|
|
|
|
}
|
2014-09-25 07:35:50 -04:00
|
|
|
return;
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
}
|
2014-09-25 07:35:50 -04:00
|
|
|
break;
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
case Qt::Key_G:
|
|
|
|
if(e->modifiers() & Qt::AltModifier) {
|
2017-07-24 15:27:23 -04:00
|
|
|
genStdMsgs (m_rpt, true);
|
2014-09-25 07:35:50 -04:00
|
|
|
return;
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
}
|
2014-09-25 07:35:50 -04:00
|
|
|
break;
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
case Qt::Key_H:
|
|
|
|
if(e->modifiers() & Qt::AltModifier) {
|
|
|
|
on_stopTxButton_clicked();
|
2014-09-25 07:35:50 -04:00
|
|
|
return;
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
}
|
2014-09-25 07:35:50 -04:00
|
|
|
break;
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
case Qt::Key_L:
|
|
|
|
if(e->modifiers() & Qt::ControlModifier) {
|
2020-06-07 13:32:18 -04:00
|
|
|
lookup();
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
genStdMsgs(m_rpt);
|
2014-09-25 07:35:50 -04:00
|
|
|
return;
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
}
|
2014-09-25 07:35:50 -04:00
|
|
|
break;
|
2017-07-07 09:08:48 -04:00
|
|
|
case Qt::Key_O:
|
|
|
|
if(e->modifiers() & Qt::ControlModifier) {
|
|
|
|
on_actionOpen_triggered();
|
|
|
|
return;
|
|
|
|
}
|
2019-05-28 07:18:54 -04:00
|
|
|
else if(e->modifiers() & Qt::AltModifier) {
|
|
|
|
bool ok;
|
|
|
|
auto call = QInputDialog::getText (this, tr ("Change Operator"), tr ("New operator:"),
|
|
|
|
QLineEdit::Normal, m_config.opCall (), &ok);
|
|
|
|
if (ok) {
|
|
|
|
m_config.opCall (call);
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
2017-07-07 09:08:48 -04:00
|
|
|
break;
|
2019-12-05 11:27:17 -05:00
|
|
|
case Qt::Key_R:
|
|
|
|
if(e->modifiers() & Qt::AltModifier) {
|
|
|
|
if(!m_send_RR73) on_txrb4_doubleClicked();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if(e->modifiers() & Qt::ControlModifier) {
|
|
|
|
if(m_send_RR73) on_txrb4_doubleClicked();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
break;
|
2020-03-10 16:26:42 -04:00
|
|
|
case Qt::Key_Z: //### Recover from hung decode() ?? ###
|
|
|
|
if(e->modifiers() & Qt::AltModifier) {
|
|
|
|
decodeDone();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
break; case Qt::Key_PageUp:
|
2018-10-16 13:01:40 -04:00
|
|
|
|
|
|
|
break;
|
|
|
|
case Qt::Key_PageDown:
|
|
|
|
band_changed(m_freqNominal-2000);
|
|
|
|
break; }
|
2014-09-25 07:35:50 -04:00
|
|
|
|
|
|
|
QMainWindow::keyPressEvent (e);
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
|
|
|
|
2012-11-23 11:05:50 -05:00
|
|
|
void MainWindow::bumpFqso(int n) //bumpFqso()
|
|
|
|
{
|
2012-11-23 11:44:40 -05:00
|
|
|
int i;
|
|
|
|
bool ctrl = (n>=100);
|
|
|
|
n=n%100;
|
2018-05-18 11:35:29 -04:00
|
|
|
i=ui->RxFreqSpinBox->value();
|
|
|
|
bool bTrackTx=ui->TxFreqSpinBox->value() == i;
|
2012-11-23 11:44:40 -05:00
|
|
|
if(n==11) i--;
|
|
|
|
if(n==12) i++;
|
2017-09-27 08:39:50 -04:00
|
|
|
if (ui->RxFreqSpinBox->isEnabled ()) {
|
|
|
|
ui->RxFreqSpinBox->setValue (i);
|
|
|
|
}
|
2020-07-02 09:39:11 -04:00
|
|
|
if(ctrl and m_mode=="WSPR") {
|
2015-06-05 09:42:45 -04:00
|
|
|
ui->WSPRfreqSpinBox->setValue(i);
|
|
|
|
} else {
|
2018-05-18 11:35:29 -04:00
|
|
|
if(ctrl and bTrackTx) {
|
2014-09-24 13:25:19 -04:00
|
|
|
ui->TxFreqSpinBox->setValue (i);
|
|
|
|
}
|
2015-06-05 09:42:45 -04:00
|
|
|
}
|
2012-11-23 11:05:50 -05:00
|
|
|
}
|
|
|
|
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
void MainWindow::displayDialFrequency ()
|
|
|
|
{
|
2016-04-06 13:11:58 -04:00
|
|
|
Frequency dial_frequency {m_rigState.ptt () && m_rigState.split () ?
|
|
|
|
m_rigState.tx_frequency () : m_rigState.frequency ()};
|
|
|
|
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
// lookup band
|
2016-04-06 13:11:58 -04:00
|
|
|
auto const& band_name = m_config.bands ()->find (dial_frequency);
|
|
|
|
if (m_lastBand != band_name)
|
|
|
|
{
|
|
|
|
// only change this when necessary as we get called a lot and it
|
|
|
|
// would trash any user input to the band combo box line edit
|
2020-09-08 10:24:55 -04:00
|
|
|
ui->bandComboBox->setCurrentText (band_name.size () ? band_name : m_config.bands ()->oob ());
|
2016-04-06 13:11:58 -04:00
|
|
|
m_wideGraph->setRxBand (band_name);
|
|
|
|
m_lastBand = band_name;
|
2018-03-12 07:30:31 -04:00
|
|
|
band_changed(dial_frequency);
|
2016-04-06 13:11:58 -04:00
|
|
|
}
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
|
2015-05-28 19:22:17 -04:00
|
|
|
// search working frequencies for one we are within 10kHz of (1 Mhz
|
|
|
|
// of on VHF and up)
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
bool valid {false};
|
2015-05-28 19:22:17 -04:00
|
|
|
quint64 min_offset {99999999};
|
2015-05-31 07:51:31 -04:00
|
|
|
for (auto const& item : *m_config.frequencies ())
|
2015-05-28 19:22:17 -04:00
|
|
|
{
|
2015-04-11 11:29:37 -04:00
|
|
|
// we need to do specific checks for above and below here to
|
|
|
|
// ensure that we can use unsigned Radio::Frequency since we
|
|
|
|
// potentially use the full 64-bit unsigned range.
|
2015-05-28 19:22:17 -04:00
|
|
|
auto const& working_frequency = item.frequency_;
|
2016-04-06 13:11:58 -04:00
|
|
|
auto const& offset = dial_frequency > working_frequency ?
|
|
|
|
dial_frequency - working_frequency :
|
|
|
|
working_frequency - dial_frequency;
|
2015-05-28 19:22:17 -04:00
|
|
|
if (offset < min_offset) {
|
2016-04-06 13:11:58 -04:00
|
|
|
min_offset = offset;
|
2015-04-22 13:48:03 -04:00
|
|
|
}
|
2016-04-06 13:11:58 -04:00
|
|
|
}
|
|
|
|
if (min_offset < 10000u || (m_config.enable_VHF_features() && min_offset < 1000000u)) {
|
2015-05-28 19:22:17 -04:00
|
|
|
valid = true;
|
|
|
|
}
|
2015-04-22 13:48:03 -04:00
|
|
|
|
2015-06-11 09:36:13 -04:00
|
|
|
update_dynamic_property (ui->labDialFreq, "oob", !valid);
|
2016-04-06 13:11:58 -04:00
|
|
|
ui->labDialFreq->setText (Radio::pretty_frequency_MHz_string (dial_frequency));
|
2013-03-18 09:24:50 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void MainWindow::statusChanged()
|
|
|
|
{
|
2016-05-24 06:08:35 -04:00
|
|
|
statusUpdate ();
|
2014-12-02 19:06:54 -05:00
|
|
|
QFile f {m_config.temp_dir ().absoluteFilePath ("wsjtx_status.txt")};
|
2013-04-22 20:52:51 -04:00
|
|
|
if(f.open(QFile::WriteOnly | QIODevice::Text)) {
|
|
|
|
QTextStream out(&f);
|
2018-03-09 08:19:41 -05:00
|
|
|
QString tmpGrid = m_hisGrid;
|
|
|
|
if (!tmpGrid.size ()) tmpGrid="n/a"; // Not Available
|
2016-04-06 13:11:58 -04:00
|
|
|
out << qSetRealNumberPrecision (12) << (m_freqNominal / 1.e6)
|
|
|
|
<< ";" << m_mode << ";" << m_hisCall << ";"
|
2020-06-13 11:04:41 -04:00
|
|
|
<< ui->rptSpinBox->value() << ";" << m_modeTx << ";" << tmpGrid
|
|
|
|
#if QT_VERSION >= QT_VERSION_CHECK (5, 15, 0)
|
|
|
|
<< Qt::endl
|
|
|
|
#else
|
|
|
|
<< endl
|
|
|
|
#endif
|
|
|
|
;
|
2013-04-22 20:52:51 -04:00
|
|
|
f.close();
|
|
|
|
} else {
|
2016-08-12 12:12:52 -04:00
|
|
|
if (m_splash && m_splash->isVisible ()) m_splash->hide ();
|
2016-07-03 16:31:19 -04:00
|
|
|
MessageBox::warning_message (this, tr ("Status File Error")
|
|
|
|
, tr ("Cannot open \"%1\" for writing: %2")
|
|
|
|
.arg (f.fileName ()).arg (f.errorString ()));
|
2013-03-18 09:24:50 -04:00
|
|
|
}
|
2016-10-13 14:02:44 -04:00
|
|
|
on_dxGridEntry_textChanged(m_hisGrid);
|
2013-03-18 09:24:50 -04:00
|
|
|
}
|
|
|
|
|
2016-07-01 07:36:59 -04:00
|
|
|
bool MainWindow::eventFilter (QObject * object, QEvent * event)
|
2012-05-22 13:09:48 -04:00
|
|
|
{
|
2016-07-01 07:36:59 -04:00
|
|
|
switch (event->type())
|
|
|
|
{
|
|
|
|
case QEvent::KeyPress:
|
|
|
|
// fall through
|
|
|
|
case QEvent::MouseButtonPress:
|
2016-07-09 14:35:25 -04:00
|
|
|
// reset the Tx watchdog
|
|
|
|
tx_watchdog (false);
|
2016-07-01 07:36:59 -04:00
|
|
|
break;
|
|
|
|
|
|
|
|
case QEvent::ChildAdded:
|
|
|
|
// ensure our child widgets get added to our event filter
|
|
|
|
add_child_to_event_filter (static_cast<QChildEvent *> (event)->child ());
|
|
|
|
break;
|
|
|
|
|
|
|
|
case QEvent::ChildRemoved:
|
|
|
|
// ensure our child widgets get d=removed from our event filter
|
|
|
|
remove_child_from_event_filter (static_cast<QChildEvent *> (event)->child ());
|
|
|
|
break;
|
|
|
|
|
|
|
|
default: break;
|
|
|
|
}
|
2012-05-22 13:09:48 -04:00
|
|
|
return QObject::eventFilter(object, event);
|
|
|
|
}
|
|
|
|
|
|
|
|
void MainWindow::createStatusBar() //createStatusBar
|
|
|
|
{
|
2016-07-01 20:25:38 -04:00
|
|
|
tx_status_label.setAlignment (Qt::AlignHCenter);
|
2020-08-08 12:12:48 -04:00
|
|
|
tx_status_label.setMinimumSize (QSize {100, 18});
|
2020-08-08 08:20:52 -04:00
|
|
|
tx_status_label.setStyleSheet ("QLabel{color: #000000; background-color: #00ff00}");
|
2016-07-01 20:25:38 -04:00
|
|
|
tx_status_label.setFrameStyle (QFrame::Panel | QFrame::Sunken);
|
2020-08-11 11:09:51 -04:00
|
|
|
statusBar()->addWidget (&tx_status_label);
|
2016-07-01 20:25:38 -04:00
|
|
|
|
2016-10-28 13:15:04 -04:00
|
|
|
config_label.setAlignment (Qt::AlignHCenter);
|
|
|
|
config_label.setMinimumSize (QSize {80, 18});
|
|
|
|
config_label.setFrameStyle (QFrame::Panel | QFrame::Sunken);
|
|
|
|
statusBar()->addWidget (&config_label);
|
|
|
|
config_label.hide (); // only shown for non-default configuration
|
2016-10-28 10:33:00 -04:00
|
|
|
|
2016-07-01 20:25:38 -04:00
|
|
|
mode_label.setAlignment (Qt::AlignHCenter);
|
|
|
|
mode_label.setMinimumSize (QSize {80, 18});
|
|
|
|
mode_label.setFrameStyle (QFrame::Panel | QFrame::Sunken);
|
|
|
|
statusBar()->addWidget (&mode_label);
|
|
|
|
|
|
|
|
last_tx_label.setAlignment (Qt::AlignHCenter);
|
|
|
|
last_tx_label.setMinimumSize (QSize {150, 18});
|
|
|
|
last_tx_label.setFrameStyle (QFrame::Panel | QFrame::Sunken);
|
|
|
|
statusBar()->addWidget (&last_tx_label);
|
|
|
|
|
2020-03-12 15:07:56 -04:00
|
|
|
ndecodes_label.setAlignment (Qt::AlignHCenter);
|
|
|
|
ndecodes_label.setMinimumSize (QSize {30, 18});
|
|
|
|
ndecodes_label.setFrameStyle (QFrame::Panel | QFrame::Sunken);
|
|
|
|
statusBar()->addWidget (&ndecodes_label);
|
|
|
|
|
2016-07-01 20:25:38 -04:00
|
|
|
band_hopping_label.setAlignment (Qt::AlignHCenter);
|
|
|
|
band_hopping_label.setMinimumSize (QSize {90, 18});
|
|
|
|
band_hopping_label.setFrameStyle (QFrame::Panel | QFrame::Sunken);
|
|
|
|
|
2018-11-30 11:03:20 -05:00
|
|
|
statusBar()->addPermanentWidget(&progressBar);
|
|
|
|
progressBar.setMinimumSize (QSize {150, 18});
|
2016-07-09 14:35:25 -04:00
|
|
|
|
|
|
|
statusBar ()->addPermanentWidget (&watchdog_label);
|
|
|
|
update_watchdog_label ();
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
|
|
|
|
2016-07-01 20:25:38 -04:00
|
|
|
void MainWindow::setup_status_bar (bool vhf)
|
|
|
|
{
|
2016-12-16 14:36:21 -05:00
|
|
|
auto submode = current_submode ();
|
2017-02-28 14:13:49 -05:00
|
|
|
if (vhf && submode != QChar::Null)
|
2016-12-16 14:36:21 -05:00
|
|
|
{
|
|
|
|
mode_label.setText (m_mode + " " + submode);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
mode_label.setText (m_mode);
|
2016-10-12 12:33:18 -04:00
|
|
|
}
|
|
|
|
if ("ISCAT" == m_mode) {
|
2020-08-08 08:20:52 -04:00
|
|
|
mode_label.setStyleSheet ("QLabel{color: #000000; background-color: #ff9933}");
|
2016-10-12 12:33:18 -04:00
|
|
|
} else if ("JT9" == m_mode) {
|
2020-08-08 08:20:52 -04:00
|
|
|
mode_label.setStyleSheet ("QLabel{color: #000000; background-color: #ff6ec7}");
|
2016-10-12 12:33:18 -04:00
|
|
|
} else if ("JT4" == m_mode) {
|
2020-08-08 08:20:52 -04:00
|
|
|
mode_label.setStyleSheet ("QLabel{color: #000000; background-color: #cc99ff}");
|
2016-10-12 12:33:18 -04:00
|
|
|
} else if ("Echo" == m_mode) {
|
2020-08-08 08:20:52 -04:00
|
|
|
mode_label.setStyleSheet ("QLabel{color: #000000; background-color: #66ffff}");
|
2016-10-12 12:33:18 -04:00
|
|
|
} else if ("JT9+JT65" == m_mode) {
|
2020-08-08 08:20:52 -04:00
|
|
|
mode_label.setStyleSheet ("QLabel{color: #000000; background-color: #ffff66}");
|
2016-10-12 12:33:18 -04:00
|
|
|
} else if ("JT65" == m_mode) {
|
2020-08-08 08:20:52 -04:00
|
|
|
mode_label.setStyleSheet ("QLabel{color: #000000; background-color: #66ff66}");
|
2016-10-12 12:33:18 -04:00
|
|
|
} else if ("QRA64" == m_mode) {
|
2020-08-08 08:20:52 -04:00
|
|
|
mode_label.setStyleSheet ("QLabel{color: #000000; background-color: #99ff33}");
|
2016-10-12 12:33:18 -04:00
|
|
|
} else if ("MSK144" == m_mode) {
|
2020-08-08 08:20:52 -04:00
|
|
|
mode_label.setStyleSheet ("QLabel{color: #000000; background-color: #ff6666}");
|
2020-05-23 09:05:01 -04:00
|
|
|
} else if ("FT4" == m_mode) {
|
2020-08-08 08:20:52 -04:00
|
|
|
mode_label.setStyleSheet ("QLabel{color: #000000; background-color: #ff0099}");
|
2017-06-19 16:15:43 -04:00
|
|
|
} else if ("FT8" == m_mode) {
|
2020-08-08 08:20:52 -04:00
|
|
|
mode_label.setStyleSheet ("QLabel{color: #000000; background-color: #ff6699}");
|
2020-07-23 13:51:05 -04:00
|
|
|
} else if ("FST4" == m_mode) {
|
2020-08-08 08:20:52 -04:00
|
|
|
mode_label.setStyleSheet ("QLabel{color: #000000; background-color: #99ff66}");
|
2020-07-23 13:51:05 -04:00
|
|
|
} else if ("FST4W" == m_mode) {
|
2020-08-08 08:20:52 -04:00
|
|
|
mode_label.setStyleSheet ("QLabel{color: #000000; background-color: #6699ff}");
|
2017-01-03 16:37:38 -05:00
|
|
|
} else if ("FreqCal" == m_mode) {
|
2020-08-08 08:20:52 -04:00
|
|
|
mode_label.setStyleSheet ("QLabel{color: #000000; background-color: #ff9933}");
|
2020-05-23 09:05:01 -04:00
|
|
|
}
|
2016-07-01 20:25:38 -04:00
|
|
|
last_tx_label.setText (QString {});
|
2016-10-12 12:33:18 -04:00
|
|
|
if (m_mode.contains (QRegularExpression {R"(^(Echo|ISCAT))"})) {
|
|
|
|
if (band_hopping_label.isVisible ()) statusBar ()->removeWidget (&band_hopping_label);
|
2020-07-02 09:39:11 -04:00
|
|
|
} else if (m_mode=="WSPR") {
|
2020-08-08 08:20:52 -04:00
|
|
|
mode_label.setStyleSheet ("QLabel{color: #000000; background-color: #ff66ff}");
|
2016-10-12 12:33:18 -04:00
|
|
|
if (!band_hopping_label.isVisible ()) {
|
|
|
|
statusBar ()->addWidget (&band_hopping_label);
|
|
|
|
band_hopping_label.show ();
|
2016-07-01 20:25:38 -04:00
|
|
|
}
|
2016-10-12 12:33:18 -04:00
|
|
|
} else {
|
|
|
|
if (band_hopping_label.isVisible ()) statusBar ()->removeWidget (&band_hopping_label);
|
|
|
|
}
|
2016-07-01 20:25:38 -04:00
|
|
|
}
|
|
|
|
|
2020-06-26 16:35:29 -04:00
|
|
|
bool MainWindow::subProcessFailed (QProcess * process, int exit_code, QProcess::ExitStatus status)
|
2016-05-07 15:32:52 -04:00
|
|
|
{
|
|
|
|
if (m_valid && (exit_code || QProcess::NormalExit != status))
|
|
|
|
{
|
|
|
|
QStringList arguments;
|
|
|
|
for (auto argument: process->arguments ())
|
|
|
|
{
|
|
|
|
if (argument.contains (' ')) argument = '"' + argument + '"';
|
|
|
|
arguments << argument;
|
|
|
|
}
|
2016-08-12 12:12:52 -04:00
|
|
|
if (m_splash && m_splash->isVisible ()) m_splash->hide ();
|
2016-07-03 16:31:19 -04:00
|
|
|
MessageBox::critical_message (this, tr ("Subprocess Error")
|
|
|
|
, tr ("Subprocess failed with exit code %1")
|
|
|
|
.arg (exit_code)
|
|
|
|
, tr ("Running: %1\n%2")
|
|
|
|
.arg (process->program () + ' ' + arguments.join (' '))
|
|
|
|
.arg (QString {process->readAllStandardError()}));
|
2020-06-26 16:35:29 -04:00
|
|
|
return true;
|
2016-05-07 15:32:52 -04:00
|
|
|
}
|
2020-06-26 16:35:29 -04:00
|
|
|
return false;
|
2016-05-07 15:32:52 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void MainWindow::subProcessError (QProcess * process, QProcess::ProcessError)
|
|
|
|
{
|
|
|
|
if (m_valid)
|
|
|
|
{
|
|
|
|
QStringList arguments;
|
|
|
|
for (auto argument: process->arguments ())
|
|
|
|
{
|
|
|
|
if (argument.contains (' ')) argument = '"' + argument + '"';
|
|
|
|
arguments << argument;
|
|
|
|
}
|
2016-08-12 12:12:52 -04:00
|
|
|
if (m_splash && m_splash->isVisible ()) m_splash->hide ();
|
2016-07-03 16:31:19 -04:00
|
|
|
MessageBox::critical_message (this, tr ("Subprocess error")
|
|
|
|
, tr ("Running: %1\n%2")
|
|
|
|
.arg (process->program () + ' ' + arguments.join (' '))
|
|
|
|
.arg (process->errorString ()));
|
2016-05-07 15:32:52 -04:00
|
|
|
m_valid = false; // ensures exit if still constructing
|
2020-06-26 16:35:29 -04:00
|
|
|
QTimer::singleShot (0, this, SLOT (close ()));
|
2016-05-07 15:32:52 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-08-10 11:29:55 -04:00
|
|
|
void MainWindow::closeEvent(QCloseEvent * e)
|
2012-05-22 13:09:48 -04:00
|
|
|
{
|
2016-05-26 19:40:16 -04:00
|
|
|
m_valid = false; // suppresses subprocess errors
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
m_config.transceiver_offline ();
|
2013-08-10 11:29:55 -04:00
|
|
|
writeSettings ();
|
2017-09-16 06:12:38 -04:00
|
|
|
m_astroWidget.reset ();
|
2013-08-07 19:09:13 -04:00
|
|
|
m_guiTimer.stop ();
|
2014-05-15 07:41:18 -04:00
|
|
|
m_prefixes.reset ();
|
|
|
|
m_shortcuts.reset ();
|
|
|
|
m_mouseCmnds.reset ();
|
2018-10-16 19:26:04 -04:00
|
|
|
m_colorHighlighting.reset ();
|
2017-07-14 15:29:31 -04:00
|
|
|
if(m_mode!="MSK144" and m_mode!="FT8") killFile();
|
2018-01-17 12:56:01 -05:00
|
|
|
float sw=0.0;
|
|
|
|
int nw=400;
|
|
|
|
int nh=100;
|
|
|
|
int irow=-99;
|
|
|
|
plotsave_(&sw,&nw,&nh,&irow);
|
2020-03-14 17:06:54 -04:00
|
|
|
to_jt9(m_ihsym,999,-1); //Tell jt9 to terminate
|
|
|
|
if (!proc_jt9.waitForFinished(1000)) proc_jt9.close();
|
2013-04-13 08:28:03 -04:00
|
|
|
mem_jt9->detach();
|
2013-08-07 19:09:13 -04:00
|
|
|
Q_EMIT finished ();
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
QMainWindow::closeEvent (e);
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void MainWindow::on_stopButton_clicked() //stopButton
|
|
|
|
{
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
monitor (false);
|
2016-04-07 16:02:32 -04:00
|
|
|
m_loopall=false;
|
2016-04-08 11:23:32 -04:00
|
|
|
if(m_bRefSpec) {
|
2016-11-02 13:57:25 -04:00
|
|
|
MessageBox::information_message (this, tr ("Reference spectrum saved"));
|
2016-04-08 11:23:32 -04:00
|
|
|
m_bRefSpec=false;
|
2016-04-07 16:02:32 -04:00
|
|
|
}
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
|
|
|
|
2016-08-06 09:52:14 -04:00
|
|
|
void MainWindow::on_actionRelease_Notes_triggered ()
|
|
|
|
{
|
2018-02-12 08:46:03 -05:00
|
|
|
QDesktopServices::openUrl (QUrl {"http://physics.princeton.edu/pulsar/k1jt/Release_Notes.txt"});
|
2016-08-06 09:52:14 -04:00
|
|
|
}
|
|
|
|
|
2018-02-12 11:29:16 -05:00
|
|
|
void MainWindow::on_actionFT8_DXpedition_Mode_User_Guide_triggered()
|
|
|
|
{
|
|
|
|
QDesktopServices::openUrl (QUrl {"http://physics.princeton.edu/pulsar/k1jt/FT8_DXpedition_Mode.pdf"});
|
|
|
|
}
|
2018-10-14 20:54:14 -04:00
|
|
|
|
2020-09-06 13:31:19 -04:00
|
|
|
void MainWindow::on_actionQuick_Start_Guide_triggered()
|
2018-10-14 20:54:14 -04:00
|
|
|
{
|
2020-09-06 13:31:19 -04:00
|
|
|
QDesktopServices::openUrl (QUrl {"https://physics.princeton.edu/pulsar/k1jt/FST4_Quick_Start.pdf"});
|
2018-10-14 20:54:14 -04:00
|
|
|
}
|
|
|
|
|
2014-09-24 19:46:32 -04:00
|
|
|
void MainWindow::on_actionOnline_User_Guide_triggered() //Display manual
|
2012-05-22 13:09:48 -04:00
|
|
|
{
|
2014-09-25 15:17:19 -04:00
|
|
|
#if defined (CMAKE_BUILD)
|
2016-01-02 17:30:12 -05:00
|
|
|
m_manual.display_html_url (QUrl {PROJECT_MANUAL_DIRECTORY_URL}, PROJECT_MANUAL);
|
2014-09-25 15:17:19 -04:00
|
|
|
#endif
|
2014-09-24 19:46:32 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
//Display local copy of manual
|
|
|
|
void MainWindow::on_actionLocal_User_Guide_triggered()
|
|
|
|
{
|
2014-09-25 15:17:19 -04:00
|
|
|
#if defined (CMAKE_BUILD)
|
2016-01-02 17:30:12 -05:00
|
|
|
m_manual.display_html_file (m_config.doc_dir (), PROJECT_MANUAL);
|
2014-09-25 15:17:19 -04:00
|
|
|
#endif
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void MainWindow::on_actionWide_Waterfall_triggered() //Display Waterfalls
|
|
|
|
{
|
2020-05-25 09:35:31 -04:00
|
|
|
m_wideGraph->showNormal();
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
|
|
|
|
2015-06-04 12:42:38 -04:00
|
|
|
void MainWindow::on_actionEcho_Graph_triggered()
|
|
|
|
{
|
2020-05-25 09:35:31 -04:00
|
|
|
m_echoGraph->showNormal();
|
2015-06-04 12:42:38 -04:00
|
|
|
}
|
|
|
|
|
2015-11-17 20:28:12 -05:00
|
|
|
void MainWindow::on_actionFast_Graph_triggered()
|
|
|
|
{
|
2020-05-25 09:35:31 -04:00
|
|
|
m_fastGraph->showNormal();
|
2015-11-17 20:28:12 -05:00
|
|
|
}
|
|
|
|
|
2017-09-27 08:39:50 -04:00
|
|
|
void MainWindow::on_actionSolve_FreqCal_triggered()
|
|
|
|
{
|
2017-09-27 21:35:09 -04:00
|
|
|
QString dpath{QDir::toNativeSeparators(m_config.writeable_data_dir().absolutePath()+"/")};
|
2017-09-27 08:39:50 -04:00
|
|
|
char data_dir[512];
|
2017-09-27 21:35:09 -04:00
|
|
|
int len=dpath.length();
|
|
|
|
int iz,irc;
|
|
|
|
double a,b,rms,sigmaa,sigmab;
|
|
|
|
strncpy(data_dir,dpath.toLatin1(),len);
|
|
|
|
calibrate_(data_dir,&iz,&a,&b,&rms,&sigmaa,&sigmab,&irc,len);
|
2017-10-01 17:44:15 -04:00
|
|
|
QString t2;
|
2017-09-27 21:35:09 -04:00
|
|
|
if(irc==-1) t2="Cannot open " + dpath + "fmt.all";
|
|
|
|
if(irc==-2) t2="Cannot open " + dpath + "fcal2.out";
|
|
|
|
if(irc==-3) t2="Insufficient data in fmt.all";
|
2017-10-01 17:44:15 -04:00
|
|
|
if(irc==-4) t2 = tr ("Invalid data in fmt.all at line %1").arg (iz);
|
2017-09-27 21:35:09 -04:00
|
|
|
if(irc>0 or rms>1.0) t2="Check fmt.all for possible bad data.";
|
2017-10-01 17:44:15 -04:00
|
|
|
if (irc < 0 || irc > 0 || rms > 1.) {
|
|
|
|
MessageBox::warning_message (this, "Calibration Error", t2);
|
|
|
|
}
|
|
|
|
else if (MessageBox::Apply == MessageBox::query_message (this
|
|
|
|
, tr ("Good Calibration Solution")
|
|
|
|
, tr ("<pre>"
|
|
|
|
"%1%L2 ±%L3 ppm\n"
|
|
|
|
"%4%L5 ±%L6 Hz\n\n"
|
|
|
|
"%7%L8\n"
|
|
|
|
"%9%L10 Hz"
|
|
|
|
"</pre>")
|
|
|
|
.arg ("Slope: ", 12).arg (b, 0, 'f', 3).arg (sigmab, 0, 'f', 3)
|
|
|
|
.arg ("Intercept: ", 12).arg (a, 0, 'f', 2).arg (sigmaa, 0, 'f', 2)
|
|
|
|
.arg ("N: ", 12).arg (iz)
|
|
|
|
.arg ("StdDev: ", 12).arg (rms, 0, 'f', 2)
|
|
|
|
, QString {}
|
|
|
|
, MessageBox::Cancel | MessageBox::Apply)) {
|
Improved frequency calibration
Measure check box added to FreqCal mode, check to record to fmt.all
with current calibration correction disabled, uncheck to see the
impact of the current calibration parameters.
The fmt.all file is now optionally renamed to fmt.bak when a
calibration solution is accepted. This allows users to preserve an
fmt.all file that they might have edited for best fit.
A calibration procedure might proceed thus:-
1) select FreqCal mode,
2) step through suggested calibration test frequencies deleting those
that have no usable signal,
3) enable "Menu->Tools->Execute frequency calibration cycle" and check
that suitable signals are present,
4) select a suitable FTol and T/R period,
5) check "Measure" and let the cycle complete a few times to gather
data,
6) uncheck "Measure" to complete the data capture, optionally tidy the
fmt.all file with your favourite editor,
7) push "Menu->Tools->Solve for calibration parameters" and accept if
you like what you see,
8) sit back and admire your accurately frequency calibrated station.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@8167 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2017-10-13 18:34:21 -04:00
|
|
|
m_config.set_calibration (Configuration::CalibrationParams {a, b});
|
|
|
|
if (MessageBox::Yes == MessageBox::query_message (this
|
|
|
|
, tr ("Delete Calibration Measurements")
|
|
|
|
, tr ("The \"fmt.all\" file will be renamed as \"fmt.bak\""))) {
|
|
|
|
// rename fmt.all as we have consumed the resulting calibration
|
|
|
|
// solution
|
|
|
|
auto const& backup_file_name = m_config.writeable_data_dir ().absoluteFilePath ("fmt.bak");
|
|
|
|
QFile::remove (backup_file_name);
|
|
|
|
QFile::rename (m_config.writeable_data_dir ().absoluteFilePath ("fmt.all"), backup_file_name);
|
|
|
|
}
|
2017-10-01 17:44:15 -04:00
|
|
|
}
|
2017-09-27 08:39:50 -04:00
|
|
|
}
|
|
|
|
|
2017-10-02 14:27:08 -04:00
|
|
|
void MainWindow::on_actionCopyright_Notice_triggered()
|
|
|
|
{
|
|
|
|
auto const& message = tr("If you make fair use of any part of WSJT-X under terms of the GNU "
|
|
|
|
"General Public License, you must display the following copyright "
|
|
|
|
"notice prominently in your derivative work:\n\n"
|
2017-10-02 21:23:24 -04:00
|
|
|
"\"The algorithms, source code, look-and-feel of WSJT-X and related "
|
2017-10-02 14:27:08 -04:00
|
|
|
"programs, and protocol specifications for the modes FSK441, FT8, JT4, "
|
|
|
|
"JT6M, JT9, JT65, JTMS, QRA64, ISCAT, MSK144 are Copyright (C) "
|
2021-01-04 16:55:15 -05:00
|
|
|
"2001-2021 by one or more of the following authors: Joseph Taylor, "
|
2017-10-02 14:27:08 -04:00
|
|
|
"K1JT; Bill Somerville, G4WJS; Steven Franke, K9AN; Nico Palermo, "
|
2017-10-02 21:23:24 -04:00
|
|
|
"IV3NWV; Greg Beam, KI7MT; Michael Black, W9MDB; Edson Pereira, PY2SDR; "
|
2017-10-03 11:59:47 -04:00
|
|
|
"Philip Karn, KA9Q; and other members of the WSJT Development Group.\"");
|
2017-10-02 14:27:08 -04:00
|
|
|
MessageBox::warning_message(this, message);
|
|
|
|
}
|
|
|
|
|
2020-11-26 20:14:12 -05:00
|
|
|
// Implement the MultiGeometryWidget::change_layout() operation.
|
|
|
|
void MainWindow::change_layout (std::size_t n)
|
2020-10-03 19:46:59 -04:00
|
|
|
{
|
2020-11-26 20:14:12 -05:00
|
|
|
switch (n)
|
2020-10-03 19:46:59 -04:00
|
|
|
{
|
2020-11-26 20:14:12 -05:00
|
|
|
case 1: // SWL view
|
|
|
|
ui->menuBar->show ();
|
|
|
|
ui->lower_panel_widget->hide ();
|
|
|
|
trim_view (false); // ensure we can switch back
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 2: // hide menus view
|
|
|
|
ui->menuBar->hide ();
|
|
|
|
ui->lower_panel_widget->show ();
|
|
|
|
trim_view (true);
|
|
|
|
break;
|
|
|
|
|
|
|
|
default: // normal view
|
|
|
|
ui->menuBar->setVisible (ui->cbMenus->isChecked ());
|
|
|
|
ui->lower_panel_widget->show ();
|
|
|
|
trim_view (!ui->cbMenus->isChecked ());
|
|
|
|
break;
|
2020-10-03 19:46:59 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-26 20:14:12 -05:00
|
|
|
void MainWindow::on_actionSWL_Mode_triggered (bool checked)
|
|
|
|
{
|
|
|
|
select_geometry (checked ? 1 : ui->cbMenus->isChecked () ? 0 : 2);
|
|
|
|
}
|
|
|
|
|
2016-12-30 10:45:31 -05:00
|
|
|
// This allows the window to shrink by removing certain things
|
|
|
|
// and reducing space used by controls
|
2020-11-26 20:14:12 -05:00
|
|
|
void MainWindow::trim_view (bool checked)
|
2016-12-30 10:45:31 -05:00
|
|
|
{
|
2017-03-15 14:25:21 -04:00
|
|
|
int spacing = checked ? 1 : 6;
|
|
|
|
if (checked) {
|
2016-12-30 10:45:31 -05:00
|
|
|
statusBar ()->removeWidget (&auto_tx_label);
|
2017-07-01 15:05:52 -04:00
|
|
|
} else {
|
2016-12-30 10:45:31 -05:00
|
|
|
statusBar ()->addWidget(&auto_tx_label);
|
|
|
|
}
|
2020-11-26 20:14:12 -05:00
|
|
|
if (m_mode != "FreqCal" && m_mode != "WSPR" && m_mode != "FST4W") {
|
2020-10-03 19:46:59 -04:00
|
|
|
ui->lh_decodes_title_label->setVisible(!checked);
|
2020-11-16 12:36:50 -05:00
|
|
|
ui->rh_decodes_title_label->setVisible(!checked);
|
2017-01-04 14:07:35 -05:00
|
|
|
}
|
2020-10-03 19:46:59 -04:00
|
|
|
ui->lh_decodes_headings_label->setVisible(!checked);
|
2020-11-16 12:36:50 -05:00
|
|
|
ui->rh_decodes_headings_label->setVisible(!checked);
|
2016-12-30 10:45:31 -05:00
|
|
|
ui->gridLayout_5->layout()->setSpacing(spacing);
|
|
|
|
ui->horizontalLayout_2->layout()->setSpacing(spacing);
|
|
|
|
ui->horizontalLayout_5->layout()->setSpacing(spacing);
|
|
|
|
ui->horizontalLayout_6->layout()->setSpacing(spacing);
|
|
|
|
ui->horizontalLayout_7->layout()->setSpacing(spacing);
|
|
|
|
ui->horizontalLayout_8->layout()->setSpacing(spacing);
|
|
|
|
ui->horizontalLayout_9->layout()->setSpacing(spacing);
|
|
|
|
ui->horizontalLayout_10->layout()->setSpacing(spacing);
|
|
|
|
ui->horizontalLayout_11->layout()->setSpacing(spacing);
|
|
|
|
ui->horizontalLayout_12->layout()->setSpacing(spacing);
|
|
|
|
ui->horizontalLayout_13->layout()->setSpacing(spacing);
|
|
|
|
ui->horizontalLayout_14->layout()->setSpacing(spacing);
|
2020-10-03 19:46:59 -04:00
|
|
|
ui->rh_decodes_widget->layout()->setSpacing(spacing);
|
2016-12-30 10:45:31 -05:00
|
|
|
ui->verticalLayout_2->layout()->setSpacing(spacing);
|
|
|
|
ui->verticalLayout_3->layout()->setSpacing(spacing);
|
|
|
|
ui->verticalLayout_5->layout()->setSpacing(spacing);
|
|
|
|
ui->verticalLayout_7->layout()->setSpacing(spacing);
|
|
|
|
ui->verticalLayout_8->layout()->setSpacing(spacing);
|
|
|
|
ui->tab->layout()->setSpacing(spacing);
|
|
|
|
}
|
|
|
|
|
2016-04-06 13:11:58 -04:00
|
|
|
void MainWindow::on_actionAstronomical_data_toggled (bool checked)
|
2014-03-05 13:20:40 -05:00
|
|
|
{
|
2016-04-06 13:11:58 -04:00
|
|
|
if (checked)
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
{
|
2015-06-11 09:36:13 -04:00
|
|
|
m_astroWidget.reset (new Astro {m_settings, &m_config});
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
|
|
|
|
// hook up termination signal
|
|
|
|
connect (this, &MainWindow::finished, m_astroWidget.data (), &Astro::close);
|
2016-04-06 13:11:58 -04:00
|
|
|
connect (m_astroWidget.data (), &Astro::tracking_update, [this] {
|
|
|
|
m_astroCorrection = {};
|
|
|
|
setRig ();
|
|
|
|
setXIT (ui->TxFreqSpinBox->value ());
|
|
|
|
displayDialFrequency ();
|
|
|
|
});
|
|
|
|
m_astroWidget->showNormal();
|
|
|
|
m_astroWidget->raise ();
|
|
|
|
m_astroWidget->activateWindow ();
|
|
|
|
m_astroWidget->nominal_frequency (m_freqNominal, m_freqTxNominal);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
m_astroWidget.reset ();
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
}
|
2014-03-05 13:20:40 -05:00
|
|
|
}
|
|
|
|
|
2018-11-11 23:44:03 -05:00
|
|
|
void MainWindow::on_fox_log_action_triggered()
|
2017-12-19 12:01:38 -05:00
|
|
|
{
|
2018-11-07 12:49:45 -05:00
|
|
|
if (!m_foxLogWindow)
|
|
|
|
{
|
2019-05-29 18:35:18 -04:00
|
|
|
m_foxLogWindow.reset (new FoxLogWindow {m_settings, &m_config, m_logBook.fox_log ()});
|
2018-11-07 12:49:45 -05:00
|
|
|
|
|
|
|
// Connect signals from fox log window
|
|
|
|
connect (this, &MainWindow::finished, m_foxLogWindow.data (), &FoxLogWindow::close);
|
2018-11-25 17:19:41 -05:00
|
|
|
connect (m_foxLogWindow.data (), &FoxLogWindow::reset_log_model, [this] () {
|
2019-05-29 18:35:18 -04:00
|
|
|
m_logBook.fox_log ()->reset ();
|
2018-11-25 17:19:41 -05:00
|
|
|
});
|
2018-11-07 12:49:45 -05:00
|
|
|
}
|
|
|
|
m_foxLogWindow->showNormal ();
|
|
|
|
m_foxLogWindow->raise ();
|
|
|
|
m_foxLogWindow->activateWindow ();
|
2017-12-19 12:01:38 -05:00
|
|
|
}
|
|
|
|
|
2018-11-11 23:44:03 -05:00
|
|
|
void MainWindow::on_contest_log_action_triggered()
|
|
|
|
{
|
|
|
|
if (!m_contestLogWindow)
|
|
|
|
{
|
2019-05-29 18:35:18 -04:00
|
|
|
m_contestLogWindow.reset (new CabrilloLogWindow {m_settings, &m_config, m_logBook.contest_log ()->model ()});
|
2018-11-11 23:44:03 -05:00
|
|
|
|
|
|
|
// Connect signals from contest log window
|
|
|
|
connect (this, &MainWindow::finished, m_contestLogWindow.data (), &CabrilloLogWindow::close);
|
|
|
|
}
|
|
|
|
m_contestLogWindow->showNormal ();
|
|
|
|
m_contestLogWindow->raise ();
|
|
|
|
m_contestLogWindow->activateWindow ();
|
|
|
|
}
|
|
|
|
|
2018-08-25 11:19:43 -04:00
|
|
|
void MainWindow::on_actionColors_triggered()
|
|
|
|
{
|
2018-10-16 19:26:04 -04:00
|
|
|
if (!m_colorHighlighting)
|
|
|
|
{
|
|
|
|
m_colorHighlighting.reset (new ColorHighlighting {m_settings, m_config.decode_highlighting ()});
|
|
|
|
connect (&m_config, &Configuration::decode_highlighting_changed, m_colorHighlighting.data (), &ColorHighlighting::set_items);
|
|
|
|
}
|
|
|
|
m_colorHighlighting->showNormal ();
|
2018-08-25 11:19:43 -04:00
|
|
|
m_colorHighlighting->raise ();
|
|
|
|
m_colorHighlighting->activateWindow ();
|
|
|
|
}
|
|
|
|
|
2015-04-22 13:48:03 -04:00
|
|
|
void MainWindow::on_actionMessage_averaging_triggered()
|
|
|
|
{
|
2020-04-08 10:56:11 -04:00
|
|
|
if(m_msgAvgWidget == NULL) {
|
2018-10-02 11:48:12 -04:00
|
|
|
m_msgAvgWidget.reset (new MessageAveraging {m_settings, m_config.decoded_text_font ()});
|
2015-04-22 13:48:03 -04:00
|
|
|
|
2018-10-02 11:48:12 -04:00
|
|
|
// Connect signals from Message Averaging window
|
|
|
|
connect (this, &MainWindow::finished, m_msgAvgWidget.data (), &MessageAveraging::close);
|
|
|
|
}
|
2015-04-22 13:48:03 -04:00
|
|
|
m_msgAvgWidget->showNormal();
|
2020-04-08 10:56:11 -04:00
|
|
|
m_msgAvgWidget->raise();
|
|
|
|
m_msgAvgWidget->activateWindow();
|
2015-04-22 13:48:03 -04:00
|
|
|
}
|
|
|
|
|
2012-05-22 13:09:48 -04:00
|
|
|
void MainWindow::on_actionOpen_triggered() //Open File
|
|
|
|
{
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
monitor (false);
|
|
|
|
|
2012-05-22 13:09:48 -04:00
|
|
|
QString fname;
|
2012-07-02 11:33:33 -04:00
|
|
|
fname=QFileDialog::getOpenFileName(this, "Open File", m_path,
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
"WSJT Files (*.wav)");
|
2016-01-11 10:00:43 -05:00
|
|
|
if(!fname.isEmpty ()) {
|
2012-05-22 13:09:48 -04:00
|
|
|
m_path=fname;
|
2015-04-22 13:48:03 -04:00
|
|
|
int i1=fname.lastIndexOf("/");
|
|
|
|
QString baseName=fname.mid(i1+1);
|
2020-08-08 08:20:52 -04:00
|
|
|
tx_status_label.setStyleSheet("QLabel{color: #000000; background-color: #99ffff}");
|
2016-07-01 20:25:38 -04:00
|
|
|
tx_status_label.setText(" " + baseName + " ");
|
2012-05-22 13:09:48 -04:00
|
|
|
on_stopButton_clicked();
|
|
|
|
m_diskData=true;
|
2016-01-11 10:00:43 -05:00
|
|
|
read_wav_file (fname);
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-01-11 10:00:43 -05:00
|
|
|
void MainWindow::read_wav_file (QString const& fname)
|
|
|
|
{
|
2016-06-10 11:54:16 -04:00
|
|
|
// call diskDat() when done
|
2016-09-17 09:34:40 -04:00
|
|
|
int i0=fname.lastIndexOf("_");
|
|
|
|
int i1=fname.indexOf(".wav");
|
|
|
|
m_nutc0=m_UTCdisk;
|
|
|
|
m_UTCdisk=fname.mid(i0+1,i1-i0-1).toInt();
|
2016-06-10 11:54:16 -04:00
|
|
|
m_wav_future_watcher.setFuture (QtConcurrent::run ([this, fname] {
|
2016-06-16 21:27:00 -04:00
|
|
|
auto basename = fname.mid (fname.lastIndexOf ('/') + 1);
|
|
|
|
auto pos = fname.indexOf (".wav", 0, Qt::CaseInsensitive);
|
|
|
|
// global variables and threads do not mix well, this needs changing
|
|
|
|
dec_data.params.nutc = 0;
|
2019-01-03 12:15:48 -05:00
|
|
|
if (pos > 0) {
|
|
|
|
if (pos == fname.indexOf ('_', -11) + 7) {
|
|
|
|
dec_data.params.nutc = fname.mid (pos - 6, 6).toInt ();
|
|
|
|
m_fileDateTime=fname.mid(pos-13,13);
|
|
|
|
} else {
|
|
|
|
dec_data.params.nutc = 100 * fname.mid (pos - 4, 4).toInt ();
|
|
|
|
m_fileDateTime=fname.mid(pos-11,11);
|
2016-06-16 21:27:00 -04:00
|
|
|
}
|
2019-01-03 12:15:48 -05:00
|
|
|
}
|
|
|
|
|
2016-06-16 21:27:00 -04:00
|
|
|
BWFFile file {QAudioFormat {}, fname};
|
2016-12-22 15:51:27 -05:00
|
|
|
bool ok=file.open (BWFFile::ReadOnly);
|
|
|
|
if(ok) {
|
|
|
|
auto bytes_per_frame = file.format ().bytesPerFrame ();
|
2019-05-22 12:44:28 -04:00
|
|
|
int nsamples=m_TRperiod * RX_SAMPLE_RATE;
|
|
|
|
qint64 max_bytes = std::min (std::size_t (nsamples),
|
2016-12-22 15:51:27 -05:00
|
|
|
sizeof (dec_data.d2) / sizeof (dec_data.d2[0]))* bytes_per_frame;
|
|
|
|
auto n = file.read (reinterpret_cast<char *> (dec_data.d2),
|
2016-06-16 21:27:00 -04:00
|
|
|
std::min (max_bytes, file.size ()));
|
2016-12-22 15:51:27 -05:00
|
|
|
int frames_read = n / bytes_per_frame;
|
2016-06-16 21:27:00 -04:00
|
|
|
// zero unfilled remaining sample space
|
2017-04-28 12:49:09 -04:00
|
|
|
std::memset(&dec_data.d2[frames_read],0,max_bytes - n);
|
2016-12-22 15:51:27 -05:00
|
|
|
if (11025 == file.format ().sampleRate ()) {
|
2016-06-16 21:27:00 -04:00
|
|
|
short sample_size = file.format ().sampleSize ();
|
|
|
|
wav12_ (dec_data.d2, dec_data.d2, &frames_read, &sample_size);
|
|
|
|
}
|
2016-12-22 15:51:27 -05:00
|
|
|
dec_data.params.kin = frames_read;
|
|
|
|
dec_data.params.newdat = 1;
|
|
|
|
} else {
|
|
|
|
dec_data.params.kin = 0;
|
|
|
|
dec_data.params.newdat = 0;
|
|
|
|
}
|
2017-12-06 12:05:48 -05:00
|
|
|
|
2018-01-01 12:03:55 -05:00
|
|
|
if(basename.mid(0,10)=="000000_000" && m_mode == "FT8") {
|
2020-04-22 11:34:06 -04:00
|
|
|
int isec=15*basename.mid(10,3).toInt();
|
|
|
|
int ih=isec/3600;
|
|
|
|
int im=(isec-3600*ih)/60;
|
|
|
|
isec=isec%60;
|
|
|
|
dec_data.params.nutc=3600*ih+60*im+isec;
|
2017-12-06 12:05:48 -05:00
|
|
|
}
|
|
|
|
|
2016-06-10 11:54:16 -04:00
|
|
|
}));
|
2016-01-11 10:00:43 -05:00
|
|
|
}
|
|
|
|
|
2012-05-22 13:09:48 -04:00
|
|
|
void MainWindow::on_actionOpen_next_in_directory_triggered() //Open Next
|
|
|
|
{
|
2020-05-07 14:35:46 -04:00
|
|
|
if(m_decoderBusy) return;
|
2014-09-24 13:26:03 -04:00
|
|
|
monitor (false);
|
2012-05-22 13:09:48 -04:00
|
|
|
int i,len;
|
|
|
|
QFileInfo fi(m_path);
|
|
|
|
QStringList list;
|
2014-03-05 13:20:40 -05:00
|
|
|
list= fi.dir().entryList().filter(".wav",Qt::CaseInsensitive);
|
2016-10-19 09:45:59 -04:00
|
|
|
for (i = 0; i < list.size()-1; ++i) {
|
2012-07-12 17:22:55 -04:00
|
|
|
len=list.at(i).length();
|
2012-05-22 13:09:48 -04:00
|
|
|
if(list.at(i)==m_path.right(len)) {
|
|
|
|
int n=m_path.length();
|
|
|
|
QString fname=m_path.replace(n-len,len,list.at(i+1));
|
|
|
|
m_path=fname;
|
2015-04-22 13:48:03 -04:00
|
|
|
int i1=fname.lastIndexOf("/");
|
|
|
|
QString baseName=fname.mid(i1+1);
|
2020-08-08 08:20:52 -04:00
|
|
|
tx_status_label.setStyleSheet("QLabel{color: #000000; background-color: #99ffff}");
|
2016-07-01 20:25:38 -04:00
|
|
|
tx_status_label.setText(" " + baseName + " ");
|
2012-05-22 13:09:48 -04:00
|
|
|
m_diskData=true;
|
2016-01-11 10:00:43 -05:00
|
|
|
read_wav_file (fname);
|
2016-10-19 14:09:27 -04:00
|
|
|
if(m_loopall and (i==list.size()-2)) {
|
2016-10-19 09:45:59 -04:00
|
|
|
m_loopall=false;
|
2016-10-31 10:24:02 -04:00
|
|
|
m_bNoMoreFiles=true;
|
2016-10-19 09:45:59 -04:00
|
|
|
}
|
2016-01-12 09:47:29 -05:00
|
|
|
return;
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
//Open all remaining files
|
2012-05-22 13:09:48 -04:00
|
|
|
void MainWindow::on_actionDecode_remaining_files_in_directory_triggered()
|
|
|
|
{
|
2020-05-07 14:35:46 -04:00
|
|
|
if(m_decoderBusy) return;
|
2012-05-22 13:09:48 -04:00
|
|
|
m_loopall=true;
|
|
|
|
on_actionOpen_next_in_directory_triggered();
|
|
|
|
}
|
|
|
|
|
|
|
|
void MainWindow::diskDat() //diskDat()
|
|
|
|
{
|
2016-12-22 15:51:27 -05:00
|
|
|
if(dec_data.params.kin>0) {
|
|
|
|
int k;
|
|
|
|
int kstep=m_FFTSize;
|
|
|
|
m_diskData=true;
|
|
|
|
float db=m_config.degrade();
|
|
|
|
float bw=m_config.RxBandwidth();
|
|
|
|
if(db > 0.0) degrade_snr_(dec_data.d2,&dec_data.params.kin,&db,&bw);
|
|
|
|
for(int n=1; n<=m_hsymStop; n++) { // Do the waterfall spectra
|
2019-04-03 09:25:32 -04:00
|
|
|
// k=(n+1)*kstep; //### Why was this (n+1) ??? ###
|
|
|
|
k=n*kstep;
|
2016-12-22 15:51:27 -05:00
|
|
|
if(k > dec_data.params.kin) break;
|
|
|
|
dec_data.params.npts8=k/8;
|
|
|
|
dataSink(k);
|
|
|
|
qApp->processEvents(); //Update the waterfall
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
MessageBox::information_message(this, tr("No data read from disk. Wrong file format?"));
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-10-15 15:18:45 -04:00
|
|
|
//Delete ../save/*.wav
|
2012-07-02 12:13:21 -04:00
|
|
|
void MainWindow::on_actionDelete_all_wav_files_in_SaveDir_triggered()
|
2012-05-22 13:09:48 -04:00
|
|
|
{
|
2016-07-03 16:31:19 -04:00
|
|
|
auto button = MessageBox::query_message (this, tr ("Confirm Delete"),
|
|
|
|
tr ("Are you sure you want to delete all *.wav and *.c2 files in \"%1\"?")
|
|
|
|
.arg (QDir::toNativeSeparators (m_config.save_directory ().absolutePath ())));
|
|
|
|
if (MessageBox::Yes == button) {
|
2015-07-03 13:33:05 -04:00
|
|
|
Q_FOREACH (auto const& file
|
|
|
|
, m_config.save_directory ().entryList ({"*.wav", "*.c2"}, QDir::Files | QDir::Writable)) {
|
|
|
|
m_config.save_directory ().remove (file);
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void MainWindow::on_actionNone_triggered() //Save None
|
|
|
|
{
|
2012-10-30 12:49:24 -04:00
|
|
|
m_saveDecoded=false;
|
|
|
|
m_saveAll=false;
|
|
|
|
ui->actionNone->setChecked(true);
|
|
|
|
}
|
|
|
|
|
|
|
|
void MainWindow::on_actionSave_decoded_triggered()
|
|
|
|
{
|
|
|
|
m_saveDecoded=true;
|
2012-05-22 13:09:48 -04:00
|
|
|
m_saveAll=false;
|
2012-10-30 12:49:24 -04:00
|
|
|
ui->actionSave_decoded->setChecked(true);
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void MainWindow::on_actionSave_all_triggered() //Save All
|
|
|
|
{
|
2012-10-30 12:49:24 -04:00
|
|
|
m_saveDecoded=false;
|
2012-05-22 13:09:48 -04:00
|
|
|
m_saveAll=true;
|
2012-10-30 12:49:24 -04:00
|
|
|
ui->actionSave_all->setChecked(true);
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
2012-07-18 09:35:54 -04:00
|
|
|
|
2012-05-22 13:09:48 -04:00
|
|
|
void MainWindow::on_actionKeyboard_shortcuts_triggered()
|
|
|
|
{
|
2014-05-15 07:41:18 -04:00
|
|
|
if (!m_shortcuts)
|
|
|
|
{
|
2015-06-08 12:05:01 -04:00
|
|
|
QFont font;
|
|
|
|
font.setPointSize (10);
|
2020-07-29 13:44:34 -04:00
|
|
|
m_shortcuts.reset (new HelpTextWindow {tr ("Keyboard Shortcuts"),
|
|
|
|
//: Keyboard shortcuts help window contents
|
|
|
|
tr (R"(<table cellspacing=1>
|
|
|
|
<tr><td><b>Esc </b></td><td>Stop Tx, abort QSO, clear next-call queue</td></tr>
|
|
|
|
<tr><td><b>F1 </b></td><td>Online User's Guide (Alt: transmit Tx6)</td></tr>
|
|
|
|
<tr><td><b>Shift+F1 </b></td><td>Copyright Notice</td></tr>
|
|
|
|
<tr><td><b>Ctrl+F1 </b></td><td>About WSJT-X</td></tr>
|
|
|
|
<tr><td><b>F2 </b></td><td>Open settings window (Alt: transmit Tx2)</td></tr>
|
|
|
|
<tr><td><b>F3 </b></td><td>Display keyboard shortcuts (Alt: transmit Tx3)</td></tr>
|
|
|
|
<tr><td><b>F4 </b></td><td>Clear DX Call, DX Grid, Tx messages 1-4 (Alt: transmit Tx4)</td></tr>
|
|
|
|
<tr><td><b>Alt+F4 </b></td><td>Exit program</td></tr>
|
|
|
|
<tr><td><b>F5 </b></td><td>Display special mouse commands (Alt: transmit Tx5)</td></tr>
|
|
|
|
<tr><td><b>F6 </b></td><td>Open next file in directory (Alt: toggle "Call 1st")</td></tr>
|
2020-09-15 10:53:14 -04:00
|
|
|
<tr><td><b>Shift+F6 </b></td><td>Decode all remaining files in directory</td></tr>
|
2020-07-29 13:44:34 -04:00
|
|
|
<tr><td><b>F7 </b></td><td>Display Message Averaging window</td></tr>
|
|
|
|
<tr><td><b>F11 </b></td><td>Move Rx frequency down 1 Hz</td></tr>
|
|
|
|
<tr><td><b>Ctrl+F11 </b></td><td>Move identical Rx and Tx frequencies down 1 Hz</td></tr>
|
|
|
|
<tr><td><b>Shift+F11 </b></td><td>Move Tx frequency down 60 Hz (FT8) or 90 Hz (FT4)</td></tr>
|
|
|
|
<tr><td><b>Ctrl+Shift+F11 </b></td><td>Move dial frequency down 2000 Hz</td></tr>
|
|
|
|
<tr><td><b>F12 </b></td><td>Move Rx frequency up 1 Hz</td></tr>
|
|
|
|
<tr><td><b>Ctrl+F12 </b></td><td>Move identical Rx and Tx frequencies up 1 Hz</td></tr>
|
|
|
|
<tr><td><b>Shift+F12 </b></td><td>Move Tx frequency up 60 Hz (FT8) or 90 Hz (FT4)</td></tr>
|
|
|
|
<tr><td><b>Ctrl+Shift+F12 </b></td><td>Move dial frequency up 2000 Hz</td></tr>
|
|
|
|
<tr><td><b>Alt+1-6 </b></td><td>Set now transmission to this number on Tab 1</td></tr>
|
|
|
|
<tr><td><b>Ctl+1-6 </b></td><td>Set next transmission to this number on Tab 1</td></tr>
|
|
|
|
<tr><td><b>Alt+B </b></td><td>Toggle "Best S+P" status</td></tr>
|
|
|
|
<tr><td><b>Alt+C </b></td><td>Toggle "Call 1st" checkbox</td></tr>
|
|
|
|
<tr><td><b>Alt+D </b></td><td>Decode again at QSO frequency</td></tr>
|
|
|
|
<tr><td><b>Shift+D </b></td><td>Full decode (both windows)</td></tr>
|
|
|
|
<tr><td><b>Ctrl+E </b></td><td>Turn on TX even/1st</td></tr>
|
|
|
|
<tr><td><b>Shift+E </b></td><td>Turn off TX even/1st</td></tr>
|
|
|
|
<tr><td><b>Alt+E </b></td><td>Erase</td></tr>
|
|
|
|
<tr><td><b>Ctrl+F </b></td><td>Edit the free text message box</td></tr>
|
|
|
|
<tr><td><b>Alt+G </b></td><td>Generate standard messages</td></tr>
|
|
|
|
<tr><td><b>Alt+H </b></td><td>Halt Tx</td></tr>
|
|
|
|
<tr><td><b>Ctrl+L </b></td><td>Lookup callsign in database, generate standard messages</td></tr>
|
|
|
|
<tr><td><b>Alt+M </b></td><td>Monitor</td></tr>
|
|
|
|
<tr><td><b>Alt+N </b></td><td>Enable Tx</td></tr>
|
|
|
|
<tr><td><b>Ctrl+O </b></td><td>Open a .wav file</td></tr>
|
|
|
|
<tr><td><b>Alt+O </b></td><td>Change operator</td></tr>
|
|
|
|
<tr><td><b>Alt+Q </b></td><td>Log QSO</td></tr>
|
|
|
|
<tr><td><b>Ctrl+R </b></td><td>Set Tx4 message to RRR (not in FT4)</td></tr>
|
|
|
|
<tr><td><b>Alt+R </b></td><td>Set Tx4 message to RR73</td></tr>
|
|
|
|
<tr><td><b>Alt+S </b></td><td>Stop monitoring</td></tr>
|
|
|
|
<tr><td><b>Alt+T </b></td><td>Toggle Tune status</td></tr>
|
|
|
|
<tr><td><b>Alt+Z </b></td><td>Clear hung decoder status</td></tr>
|
|
|
|
</table>)"), font});
|
2014-05-15 07:41:18 -04:00
|
|
|
}
|
2015-06-08 12:05:01 -04:00
|
|
|
m_shortcuts->showNormal ();
|
2015-06-11 13:01:12 -04:00
|
|
|
m_shortcuts->raise ();
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
2012-07-18 09:35:54 -04:00
|
|
|
|
2012-05-22 13:09:48 -04:00
|
|
|
void MainWindow::on_actionSpecial_mouse_commands_triggered()
|
|
|
|
{
|
2014-05-15 07:41:18 -04:00
|
|
|
if (!m_mouseCmnds)
|
|
|
|
{
|
2015-06-08 12:05:01 -04:00
|
|
|
QFont font;
|
|
|
|
font.setPointSize (10);
|
2020-07-29 13:44:34 -04:00
|
|
|
m_mouseCmnds.reset (new HelpTextWindow {tr ("Special Mouse Commands"),
|
|
|
|
//: Mouse commands help window contents
|
|
|
|
tr (R"(<table cellpadding=5>
|
|
|
|
<tr>
|
|
|
|
<th align="right">Click on</th>
|
|
|
|
<th align="left">Action</th>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td align="right">Waterfall:</td>
|
|
|
|
<td><b>Click</b> to set Rx frequency.<br/>
|
|
|
|
<b>Shift-click</b> to set Tx frequency.<br/>
|
|
|
|
<b>Ctrl-click</b> or <b>Right-click</b> to set Rx and Tx frequencies.<br/>
|
2020-08-13 05:30:49 -04:00
|
|
|
<b>Double-click</b> to also decode at Rx frequency.<br/>
|
2020-07-29 13:44:34 -04:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td align="right">Decoded text:</td>
|
|
|
|
<td><b>Double-click</b> to copy second callsign to Dx Call,<br/>
|
|
|
|
locator to Dx Grid, change Rx and Tx frequency to<br/>
|
|
|
|
decoded signal's frequency, and generate standard<br/>
|
2020-08-13 05:30:49 -04:00
|
|
|
messages.<br/>
|
|
|
|
If <b>Hold Tx Freq</b> is checked or first callsign in message<br/>
|
|
|
|
is your own call, Tx frequency is not changed unless <br/>
|
|
|
|
<b>Ctrl</b> is held down.<br/>
|
2020-07-29 13:44:34 -04:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td align="right">Erase button:</td>
|
|
|
|
<td><b>Click</b> to erase QSO window.<br/>
|
|
|
|
<b>Double-click</b> to erase QSO and Band Activity windows.
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>)"), font});
|
2014-05-15 07:41:18 -04:00
|
|
|
}
|
2015-06-08 12:05:01 -04:00
|
|
|
m_mouseCmnds->showNormal ();
|
2015-06-11 13:01:12 -04:00
|
|
|
m_mouseCmnds->raise ();
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
|
|
|
|
2017-07-28 19:25:32 -04:00
|
|
|
void MainWindow::on_DecodeButton_clicked (bool /* checked */) //Decode request
|
2012-05-22 13:09:48 -04:00
|
|
|
{
|
2016-10-17 10:35:59 -04:00
|
|
|
if(m_mode=="MSK144") {
|
|
|
|
ui->DecodeButton->setChecked(false);
|
|
|
|
} else {
|
2020-07-02 09:39:11 -04:00
|
|
|
if(m_mode!="WSPR" && !m_decoderBusy) {
|
2016-10-17 10:35:59 -04:00
|
|
|
dec_data.params.newdat=0;
|
|
|
|
dec_data.params.nagain=1;
|
|
|
|
decode();
|
|
|
|
}
|
2012-10-26 12:52:04 -04:00
|
|
|
}
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void MainWindow::freezeDecode(int n) //freezeDecode()
|
|
|
|
{
|
2020-09-14 10:56:54 -04:00
|
|
|
if((n%100)==2) {
|
2020-09-17 12:58:59 -04:00
|
|
|
if(m_mode=="FST4" and m_config.single_decode() and ui->sbFtol->value()>10) ui->sbFtol->setValue(10);
|
2020-09-14 10:56:54 -04:00
|
|
|
on_DecodeButton_clicked (true);
|
|
|
|
}
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
|
|
|
|
2015-04-22 13:48:03 -04:00
|
|
|
void MainWindow::on_ClrAvgButton_clicked()
|
|
|
|
{
|
|
|
|
m_nclearave=1;
|
2015-06-13 08:08:32 -04:00
|
|
|
if(m_msgAvgWidget != NULL) {
|
|
|
|
if(m_msgAvgWidget->isVisible()) m_msgAvgWidget->displayAvg("");
|
|
|
|
}
|
2015-04-22 13:48:03 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void MainWindow::msgAvgDecode2()
|
|
|
|
{
|
|
|
|
on_DecodeButton_clicked (true);
|
|
|
|
}
|
|
|
|
|
2012-11-20 15:39:41 -05:00
|
|
|
void MainWindow::decode() //decode()
|
|
|
|
{
|
2020-03-10 16:26:42 -04:00
|
|
|
if(m_decoderBusy) return; //Don't start decoder if it's already busy.
|
2018-12-01 13:16:57 -05:00
|
|
|
QDateTime now = QDateTime::currentDateTimeUtc ();
|
2017-12-03 16:59:59 -05:00
|
|
|
if( m_dateTimeLastTX.isValid () ) {
|
|
|
|
qint64 isecs_since_tx = m_dateTimeLastTX.secsTo(now);
|
2019-04-27 17:38:19 -04:00
|
|
|
dec_data.params.lapcqonly= (isecs_since_tx > 300);
|
2017-12-03 19:46:19 -05:00
|
|
|
} else {
|
|
|
|
m_dateTimeLastTX = now.addSecs(-900);
|
|
|
|
dec_data.params.lapcqonly=true;
|
|
|
|
}
|
|
|
|
if( m_diskData ) {
|
|
|
|
dec_data.params.lapcqonly=false;
|
2017-12-03 16:59:59 -05:00
|
|
|
}
|
2019-05-22 12:44:28 -04:00
|
|
|
if(!m_dataAvailable or m_TRperiod==0.0) return;
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
ui->DecodeButton->setChecked (true);
|
2020-09-29 07:32:47 -04:00
|
|
|
if(!dec_data.params.nagain && m_diskData && m_TRperiod >= 60.) {
|
2016-03-10 13:35:41 -05:00
|
|
|
dec_data.params.nutc=dec_data.params.nutc/100;
|
|
|
|
}
|
|
|
|
if(dec_data.params.nagain==0 && dec_data.params.newdat==1 && (!m_diskData)) {
|
2020-11-17 21:06:30 -05:00
|
|
|
m_dateTimeSeqStart = qt_truncate_date_time_to (QDateTime::currentDateTimeUtc (), m_TRperiod * 1.e3);
|
|
|
|
auto t = m_dateTimeSeqStart.time ();
|
2020-09-29 07:32:47 -04:00
|
|
|
dec_data.params.nutc = t.hour () * 100 + t.minute ();
|
|
|
|
if (m_TRperiod < 60.)
|
|
|
|
{
|
|
|
|
dec_data.params.nutc = dec_data.params.nutc * 100 + t.second ();
|
|
|
|
}
|
2012-11-20 15:39:41 -05:00
|
|
|
}
|
2016-09-17 09:34:40 -04:00
|
|
|
|
|
|
|
if(m_nPick==1 and !m_diskData) {
|
|
|
|
QDateTime t=QDateTime::currentDateTimeUtc();
|
|
|
|
int ihr=t.toString("hh").toInt();
|
|
|
|
int imin=t.toString("mm").toInt();
|
|
|
|
int isec=t.toString("ss").toInt();
|
2019-05-22 12:44:28 -04:00
|
|
|
isec=isec - fmod(double(isec),m_TRperiod);
|
2016-09-17 09:34:40 -04:00
|
|
|
dec_data.params.nutc=10000*ihr + 100*imin + isec;
|
|
|
|
}
|
|
|
|
if(m_nPick==2) dec_data.params.nutc=m_nutc0;
|
2017-07-26 17:19:21 -04:00
|
|
|
dec_data.params.nQSOProgress = m_QSOProgress;
|
2015-12-17 15:29:55 -05:00
|
|
|
dec_data.params.nfqso=m_wideGraph->rxFreq();
|
2017-07-26 17:19:21 -04:00
|
|
|
dec_data.params.nftx = ui->TxFreqSpinBox->value ();
|
2016-05-17 15:35:38 -04:00
|
|
|
qint32 depth {m_ndepth};
|
2017-07-26 06:56:12 -04:00
|
|
|
if (!ui->actionInclude_averaging->isVisible ()) depth &= ~16;
|
|
|
|
if (!ui->actionInclude_correlation->isVisible ()) depth &= ~32;
|
|
|
|
if (!ui->actionEnable_AP_DXcall->isVisible ()) depth &= ~64;
|
2016-05-17 15:35:38 -04:00
|
|
|
dec_data.params.ndepth=depth;
|
2015-12-17 15:29:55 -05:00
|
|
|
dec_data.params.n2pass=1;
|
|
|
|
if(m_config.twoPass()) dec_data.params.n2pass=2;
|
|
|
|
dec_data.params.nranera=m_config.ntrials();
|
|
|
|
dec_data.params.naggressive=m_config.aggressive();
|
|
|
|
dec_data.params.nrobust=0;
|
|
|
|
dec_data.params.ndiskdat=0;
|
|
|
|
if(m_diskData) dec_data.params.ndiskdat=1;
|
|
|
|
dec_data.params.nfa=m_wideGraph->nStartFreq();
|
|
|
|
dec_data.params.nfSplit=m_wideGraph->Fmin();
|
|
|
|
dec_data.params.nfb=m_wideGraph->Fmax();
|
2018-10-30 17:06:01 -04:00
|
|
|
if(m_mode=="FT8" and SpecOp::HOUND == m_config.special_op_id() and !ui->cbRxAll->isChecked()) dec_data.params.nfb=1000;
|
|
|
|
if(m_mode=="FT8" and SpecOp::FOX == m_config.special_op_id() ) dec_data.params.nfqso=200;
|
2017-05-27 16:04:44 -04:00
|
|
|
dec_data.params.ntol=ui->sbFtol->value ();
|
2016-10-24 16:48:24 -04:00
|
|
|
if(m_mode=="JT9+JT65" or !m_config.enable_VHF_features()) {
|
2016-01-01 10:33:48 -05:00
|
|
|
dec_data.params.ntol=20;
|
|
|
|
dec_data.params.naggressive=0;
|
|
|
|
}
|
2020-09-16 17:23:59 -04:00
|
|
|
if(m_mode=="FST4") {
|
|
|
|
dec_data.params.ntol=ui->sbFtol->value();
|
2020-09-16 20:16:32 -04:00
|
|
|
if(m_config.single_decode()) {
|
|
|
|
dec_data.params.nfa=m_wideGraph->rxFreq() - ui->sbFtol->value();
|
|
|
|
dec_data.params.nfb=m_wideGraph->rxFreq() + ui->sbFtol->value();
|
|
|
|
} else {
|
|
|
|
dec_data.params.nfa=ui->sbF_Low->value();
|
|
|
|
dec_data.params.nfb=ui->sbF_High->value();
|
|
|
|
}
|
2020-09-16 17:23:59 -04:00
|
|
|
}
|
2020-09-12 09:54:13 -04:00
|
|
|
if(m_mode=="FST4W") dec_data.params.ntol=ui->sbFST4W_FTol->value();
|
2019-01-03 12:15:48 -05:00
|
|
|
if(dec_data.params.nutc < m_nutc0) m_RxLog = 1; //Date and Time to file "ALL.TXT".
|
2016-09-17 09:34:40 -04:00
|
|
|
if(dec_data.params.newdat==1 and !m_diskData) m_nutc0=dec_data.params.nutc;
|
2015-12-17 15:29:55 -05:00
|
|
|
dec_data.params.ntxmode=9;
|
|
|
|
if(m_modeTx=="JT65") dec_data.params.ntxmode=65;
|
|
|
|
dec_data.params.nmode=9;
|
2016-06-24 10:36:03 -04:00
|
|
|
if(m_mode=="JT65") dec_data.params.nmode=65;
|
2019-04-01 14:23:10 -04:00
|
|
|
if(m_mode=="JT65") dec_data.params.ljt65apon = ui->actionEnable_AP_JT65->isVisible () &&
|
|
|
|
ui->actionEnable_AP_JT65->isChecked ();
|
2016-07-06 10:18:23 -04:00
|
|
|
if(m_mode=="QRA64") dec_data.params.nmode=164;
|
|
|
|
if(m_mode=="QRA64") dec_data.params.ntxmode=164;
|
2015-12-17 15:29:55 -05:00
|
|
|
if(m_mode=="JT9+JT65") dec_data.params.nmode=9+65; // = 74
|
2015-04-22 13:48:03 -04:00
|
|
|
if(m_mode=="JT4") {
|
2015-12-17 15:29:55 -05:00
|
|
|
dec_data.params.nmode=4;
|
|
|
|
dec_data.params.ntxmode=4;
|
2015-04-22 13:48:03 -04:00
|
|
|
}
|
2017-06-17 11:55:30 -04:00
|
|
|
if(m_mode=="FT8") dec_data.params.nmode=8;
|
2019-04-01 14:23:10 -04:00
|
|
|
if(m_mode=="FT8") dec_data.params.lft8apon = ui->actionEnable_AP_FT8->isVisible () &&
|
|
|
|
ui->actionEnable_AP_FT8->isChecked ();
|
2017-07-21 23:01:09 -04:00
|
|
|
if(m_mode=="FT8") dec_data.params.napwid=50;
|
2019-04-08 12:36:05 -04:00
|
|
|
if(m_mode=="FT4") {
|
|
|
|
dec_data.params.nmode=5;
|
|
|
|
m_BestCQpriority="";
|
|
|
|
}
|
2020-07-23 13:51:05 -04:00
|
|
|
if(m_mode=="FST4") dec_data.params.nmode=240;
|
|
|
|
if(m_mode=="FST4W") dec_data.params.nmode=241;
|
2015-12-17 15:29:55 -05:00
|
|
|
dec_data.params.ntrperiod=m_TRperiod;
|
|
|
|
dec_data.params.nsubmode=m_nSubMode;
|
2016-07-28 11:18:06 -04:00
|
|
|
if(m_mode=="QRA64") dec_data.params.nsubmode=100 + m_nSubMode;
|
2015-12-17 15:29:55 -05:00
|
|
|
dec_data.params.minw=0;
|
|
|
|
dec_data.params.nclearave=m_nclearave;
|
2015-05-27 09:08:28 -04:00
|
|
|
if(m_nclearave!=0) {
|
|
|
|
QFile f(m_config.temp_dir ().absoluteFilePath ("avemsg.txt"));
|
|
|
|
f.remove();
|
|
|
|
}
|
2015-12-17 15:29:55 -05:00
|
|
|
dec_data.params.dttol=m_DTtol;
|
|
|
|
dec_data.params.emedelay=0.0;
|
2016-09-06 11:36:17 -04:00
|
|
|
if(m_config.decode_at_52s()) dec_data.params.emedelay=2.5;
|
2016-05-05 14:52:47 -04:00
|
|
|
dec_data.params.minSync=ui->syncSpinBox->isVisible () ? m_minSync : 0;
|
2018-10-31 16:53:10 -04:00
|
|
|
dec_data.params.nexp_decode = static_cast<int> (m_config.special_op_id());
|
2016-10-24 11:25:25 -04:00
|
|
|
if(m_config.single_decode()) dec_data.params.nexp_decode += 32;
|
|
|
|
if(m_config.enable_VHF_features()) dec_data.params.nexp_decode += 64;
|
2020-09-30 13:32:03 -04:00
|
|
|
if(m_mode.startsWith("FST4")) dec_data.params.nexp_decode += 256*(ui->sbNB->value()+3);
|
2016-03-10 10:13:06 -05:00
|
|
|
|
2019-07-02 20:51:40 -04:00
|
|
|
::memcpy(dec_data.params.datetime, m_dateTime.toLatin1()+" ", sizeof dec_data.params.datetime);
|
|
|
|
::memcpy(dec_data.params.mycall, (m_config.my_callsign()+" ").toLatin1(), sizeof dec_data.params.mycall);
|
|
|
|
::memcpy(dec_data.params.mygrid, (m_config.my_grid()+" ").toLatin1(), sizeof dec_data.params.mygrid);
|
2016-07-10 18:20:30 -04:00
|
|
|
QString hisCall {ui->dxCallEntry->text ()};
|
|
|
|
QString hisGrid {ui->dxGridEntry->text ()};
|
2019-07-02 20:51:40 -04:00
|
|
|
memcpy(dec_data.params.hiscall,(hisCall + " ").toLatin1 ().constData (), sizeof dec_data.params.hiscall);
|
|
|
|
memcpy(dec_data.params.hisgrid,(hisGrid + " ").toLatin1 ().constData (), sizeof dec_data.params.hisgrid);
|
2012-11-20 15:39:41 -05:00
|
|
|
|
|
|
|
//newdat=1 ==> this is new data, must do the big FFT
|
|
|
|
//nagain=1 ==> decode only at fQSO +/- Tol
|
|
|
|
|
2020-08-11 15:07:00 -04:00
|
|
|
if (auto * to = reinterpret_cast<char *> (mem_jt9->data()))
|
|
|
|
{
|
|
|
|
char *from = (char*) dec_data.ipc;
|
|
|
|
int size=sizeof(struct dec_data);
|
|
|
|
if(dec_data.params.newdat==0) {
|
|
|
|
int noffset {offsetof (struct dec_data, params.nutc)};
|
|
|
|
to += noffset;
|
|
|
|
from += noffset;
|
|
|
|
size -= noffset;
|
|
|
|
}
|
|
|
|
if(m_mode=="ISCAT" or m_mode=="MSK144" or m_bFast9) {
|
|
|
|
float t0=m_t0;
|
|
|
|
float t1=m_t1;
|
|
|
|
qApp->processEvents(); //Update the waterfall
|
|
|
|
if(m_nPick > 0) {
|
|
|
|
t0=m_t0Pick;
|
|
|
|
t1=m_t1Pick;
|
|
|
|
}
|
|
|
|
static short int d2b[360000];
|
|
|
|
narg[0]=dec_data.params.nutc;
|
|
|
|
if(m_kdone>int(12000.0*m_TRperiod)) {
|
|
|
|
m_kdone=int(12000.0*m_TRperiod);
|
|
|
|
}
|
|
|
|
narg[1]=m_kdone;
|
|
|
|
narg[2]=m_nSubMode;
|
|
|
|
narg[3]=dec_data.params.newdat;
|
|
|
|
narg[4]=dec_data.params.minSync;
|
|
|
|
narg[5]=m_nPick;
|
|
|
|
narg[6]=1000.0*t0;
|
|
|
|
narg[7]=1000.0*t1;
|
|
|
|
narg[8]=2; //Max decode lines per decode attempt
|
|
|
|
if(dec_data.params.minSync<0) narg[8]=50;
|
|
|
|
if(m_mode=="ISCAT") narg[9]=101; //ISCAT
|
|
|
|
if(m_mode=="JT9") narg[9]=102; //Fast JT9
|
|
|
|
if(m_mode=="MSK144") narg[9]=104; //MSK144
|
|
|
|
narg[10]=ui->RxFreqSpinBox->value();
|
|
|
|
narg[11]=ui->sbFtol->value ();
|
|
|
|
narg[12]=0;
|
|
|
|
narg[13]=-1;
|
|
|
|
narg[14]=m_config.aggressive();
|
|
|
|
memcpy(d2b,dec_data.d2,2*360000);
|
|
|
|
watcher3.setFuture (QtConcurrent::run (std::bind (fast_decode_,&d2b[0],
|
|
|
|
&narg[0],&m_TRperiod,&m_msg[0][0],
|
|
|
|
dec_data.params.mycall,dec_data.params.hiscall,8000,12,12)));
|
|
|
|
} else {
|
|
|
|
mem_jt9->lock ();
|
|
|
|
memcpy(to, from, qMin(mem_jt9->size(), size));
|
|
|
|
mem_jt9->unlock ();
|
|
|
|
to_jt9(m_ihsym,1,-1); //Send m_ihsym to jt9[.exe] and start decoding
|
|
|
|
decodeBusy(true);
|
|
|
|
}
|
2015-11-17 20:28:12 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void::MainWindow::fast_decode_done()
|
|
|
|
{
|
|
|
|
float t,tmax=-99.0;
|
2016-08-01 15:46:19 -04:00
|
|
|
dec_data.params.nagain=false;
|
|
|
|
dec_data.params.ndiskdat=false;
|
2016-10-17 09:28:30 -04:00
|
|
|
// if(m_msg[0][0]==0) m_bDecoded=false;
|
2017-09-01 01:11:57 -04:00
|
|
|
for(int i=0; m_msg[i][0] && i<100; i++) {
|
2015-11-17 20:28:12 -05:00
|
|
|
QString message=QString::fromLatin1(m_msg[i]);
|
2016-10-01 14:13:39 -04:00
|
|
|
m_msg[i][0]=0;
|
2017-09-01 01:11:57 -04:00
|
|
|
if(message.length()>80) message=message.left (80);
|
2016-02-04 11:10:55 -05:00
|
|
|
if(narg[13]/8==narg[12]) message=message.trimmed().replace("<...>",m_calls);
|
2015-11-17 20:28:12 -05:00
|
|
|
|
|
|
|
//Left (Band activity) window
|
2018-07-11 13:25:01 -04:00
|
|
|
DecodedText decodedtext {message.replace (QChar::LineFeed, "")};
|
2016-09-28 15:08:19 -04:00
|
|
|
if(!m_bFastDone) {
|
2018-10-24 19:00:19 -04:00
|
|
|
ui->decodedTextBrowser->displayDecodedText (decodedtext,m_baseCall,m_mode,m_config.DXCC(),
|
2018-08-24 13:18:49 -04:00
|
|
|
m_logBook,m_currentBand,m_config.ppfx());
|
2016-09-28 15:08:19 -04:00
|
|
|
}
|
2015-11-17 20:28:12 -05:00
|
|
|
|
|
|
|
t=message.mid(10,5).toFloat();
|
|
|
|
if(t>tmax) {
|
|
|
|
tmax=t;
|
|
|
|
m_bDecoded=true;
|
|
|
|
}
|
2016-12-16 14:36:21 -05:00
|
|
|
postDecode (true, decodedtext.string ());
|
2019-01-03 12:15:48 -05:00
|
|
|
write_all("Rx",message);
|
2015-11-17 20:28:12 -05:00
|
|
|
|
2016-09-13 13:52:45 -04:00
|
|
|
if(m_mode=="JT9" or m_mode=="MSK144") {
|
2016-06-03 11:45:54 -04:00
|
|
|
// find and extract any report for myCall
|
2015-11-17 20:28:12 -05:00
|
|
|
bool stdMsg = decodedtext.report(m_baseCall,
|
2017-12-21 15:55:38 -05:00
|
|
|
Radio::base_callsign(ui->dxCallEntry->text()), m_rptRcvd);
|
2015-11-17 20:28:12 -05:00
|
|
|
|
2016-06-03 11:45:54 -04:00
|
|
|
// extract details and send to PSKreporter
|
2017-08-29 22:27:57 -04:00
|
|
|
if (stdMsg) pskPost (decodedtext);
|
2015-11-17 20:28:12 -05:00
|
|
|
}
|
2017-09-01 01:11:57 -04:00
|
|
|
if (tmax >= 0.0) auto_sequence (decodedtext, ui->sbFtol->value (), ui->sbFtol->value ());
|
2015-11-17 20:28:12 -05:00
|
|
|
}
|
|
|
|
m_startAnother=m_loopall;
|
|
|
|
m_nPick=0;
|
|
|
|
ui->DecodeButton->setChecked (false);
|
2016-09-28 15:08:19 -04:00
|
|
|
m_bFastDone=false;
|
|
|
|
}
|
|
|
|
|
2020-03-14 17:06:54 -04:00
|
|
|
void MainWindow::to_jt9(qint32 n, qint32 istart, qint32 idone)
|
2020-03-10 16:26:42 -04:00
|
|
|
{
|
2020-08-11 15:07:00 -04:00
|
|
|
if (auto * dd = reinterpret_cast<dec_data_t *> (mem_jt9->data()))
|
|
|
|
{
|
|
|
|
mem_jt9->lock ();
|
|
|
|
dd->ipc[0]=n;
|
|
|
|
if(istart>=0) dd->ipc[1]=istart;
|
|
|
|
if(idone>=0) dd->ipc[2]=idone;
|
|
|
|
mem_jt9->unlock ();
|
|
|
|
}
|
2020-03-10 16:26:42 -04:00
|
|
|
}
|
|
|
|
|
2016-05-07 15:32:52 -04:00
|
|
|
void MainWindow::decodeDone ()
|
2012-11-20 15:39:41 -05:00
|
|
|
{
|
2020-04-17 19:22:07 -04:00
|
|
|
if(m_mode!="FT8" or dec_data.params.nzhsym==50) m_nDecodes=0;
|
|
|
|
if(m_mode=="QRA64") m_wideGraph->drawRed(0,0);
|
2020-07-25 21:58:04 -04:00
|
|
|
if ("FST4W" == m_mode)
|
|
|
|
{
|
2020-10-04 17:41:52 -04:00
|
|
|
if (m_uploadWSPRSpots
|
|
|
|
&& m_config.is_transceiver_online ()) { // need working rig control
|
|
|
|
#if QT_VERSION >= QT_VERSION_CHECK (5, 15, 0)
|
|
|
|
uploadTimer.start(QRandomGenerator::global ()->bounded (0, 20000)); // Upload delay
|
|
|
|
#else
|
|
|
|
uploadTimer.start(20000 * qrand()/((double)RAND_MAX + 1.0)); // Upload delay
|
|
|
|
#endif
|
|
|
|
}
|
2020-07-25 21:58:04 -04:00
|
|
|
}
|
2020-04-17 19:22:07 -04:00
|
|
|
auto tnow = QDateTime::currentDateTimeUtc ();
|
|
|
|
double tdone = fmod(double(tnow.time().second()),m_TRperiod);
|
|
|
|
int mswait;
|
|
|
|
if( tdone < 0.5*m_TRperiod ) {
|
|
|
|
mswait = 1000.0 * ( 0.75 * m_TRperiod - tdone );
|
|
|
|
} else {
|
|
|
|
mswait = 1000.0 * ( 1.75 * m_TRperiod - tdone );
|
|
|
|
}
|
|
|
|
if(!m_diskData) killFileTimer.start(mswait); //Kill at 3/4 period
|
|
|
|
|
2016-05-07 15:32:52 -04:00
|
|
|
dec_data.params.nagain=0;
|
|
|
|
dec_data.params.ndiskdat=0;
|
|
|
|
m_nclearave=0;
|
2020-03-14 17:06:54 -04:00
|
|
|
// pause_jt9 ();
|
2016-05-07 15:32:52 -04:00
|
|
|
ui->DecodeButton->setChecked (false);
|
|
|
|
decodeBusy(false);
|
|
|
|
m_RxLog=0;
|
2018-10-30 17:06:01 -04:00
|
|
|
if(SpecOp::FOX == m_config.special_op_id()) houndCallers();
|
2020-03-14 17:06:54 -04:00
|
|
|
to_jt9(m_ihsym,-1,1); //Tell jt9 we know it has finished
|
2020-04-17 19:22:07 -04:00
|
|
|
|
|
|
|
m_startAnother=m_loopall;
|
|
|
|
if(m_bNoMoreFiles) {
|
|
|
|
MessageBox::information_message(this, tr("No more files to open."));
|
|
|
|
m_bNoMoreFiles=false;
|
|
|
|
}
|
2012-11-20 15:39:41 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
void MainWindow::readFromStdout() //readFromStdout
|
|
|
|
{
|
2015-04-22 13:48:03 -04:00
|
|
|
while(proc_jt9.canReadLine()) {
|
2018-12-06 09:04:14 -05:00
|
|
|
auto line_read = proc_jt9.readLine ();
|
2020-04-07 18:26:30 -04:00
|
|
|
if (auto p = std::strpbrk (line_read.constData (), "\n\r")) {
|
|
|
|
// truncate before line ending chars
|
|
|
|
line_read = line_read.left (p - line_read.constData ());
|
|
|
|
}
|
2020-07-20 13:27:29 -04:00
|
|
|
bool haveFSpread {false};
|
|
|
|
float fSpread {0.};
|
2020-07-23 13:51:05 -04:00
|
|
|
if (m_mode.startsWith ("FST4"))
|
2020-07-20 13:27:29 -04:00
|
|
|
{
|
|
|
|
auto text = line_read.mid (64, 6).trimmed ();
|
|
|
|
if (text.size ())
|
|
|
|
{
|
|
|
|
fSpread = text.toFloat (&haveFSpread);
|
|
|
|
line_read = line_read.left (64);
|
|
|
|
}
|
2020-10-10 08:18:04 -04:00
|
|
|
auto const& cs = m_config.my_callsign ().toLocal8Bit ();
|
|
|
|
if ("FST4W" == m_mode && ui->cbNoOwnCall->isChecked ()
|
|
|
|
&& (line_read.contains (" " + cs + " ")
|
|
|
|
|| line_read.contains ("<" + cs + ">"))) {
|
|
|
|
continue;
|
|
|
|
}
|
2020-07-20 13:27:29 -04:00
|
|
|
}
|
2020-08-15 21:34:18 -04:00
|
|
|
if (m_mode!="FT8" and m_mode!="FT4"
|
|
|
|
&& !m_mode.startsWith ("FST4")) {
|
2018-12-06 09:04:14 -05:00
|
|
|
//Pad 22-char msg to at least 37 chars
|
2020-04-07 18:26:30 -04:00
|
|
|
line_read = line_read.left(44) + " " + line_read.mid(44);
|
2018-11-12 10:29:26 -05:00
|
|
|
}
|
2016-03-20 15:32:08 -04:00
|
|
|
bool bAvgMsg=false;
|
|
|
|
int navg=0;
|
2020-04-07 18:26:30 -04:00
|
|
|
|
2018-12-06 09:04:14 -05:00
|
|
|
if(line_read.indexOf("<DecodeFinished>") >= 0) {
|
2020-03-12 15:07:56 -04:00
|
|
|
m_bDecoded = line_read.mid(20).trimmed().toInt() > 0;
|
2020-06-01 11:48:35 -04:00
|
|
|
if(m_nDecodes==0) ndecodes_label.setText("0");
|
2016-05-07 15:32:52 -04:00
|
|
|
decodeDone ();
|
2015-04-22 13:48:03 -04:00
|
|
|
return;
|
|
|
|
} else {
|
2020-03-12 15:11:20 -04:00
|
|
|
m_nDecodes+=1;
|
|
|
|
ndecodes_label.setText(QString::number(m_nDecodes));
|
2019-05-24 11:04:30 -04:00
|
|
|
if(m_mode=="JT4" or m_mode=="JT65" or m_mode=="QRA64") {
|
2020-04-09 13:56:35 -04:00
|
|
|
int nf=line_read.indexOf("f");
|
|
|
|
if(nf>0) {
|
|
|
|
navg=line_read.mid(nf+1,1).toInt();
|
|
|
|
if(line_read.indexOf("f*")>0) navg=10;
|
|
|
|
}
|
|
|
|
int nd=-1;
|
|
|
|
if(nf<0) nd=line_read.indexOf("d");
|
|
|
|
if(nd>0) {
|
|
|
|
navg=line_read.mid(nd+2,1).toInt();
|
|
|
|
if(line_read.mid(nd+2,1)=="*") navg=10;
|
2016-10-24 13:01:47 -04:00
|
|
|
}
|
2020-04-17 12:14:43 -04:00
|
|
|
if(m_mode=="JT65" or m_mode=="JT4") {
|
2020-04-09 13:56:35 -04:00
|
|
|
int na=-1;
|
|
|
|
if(nf<0 and nd<0) na=line_read.indexOf("a");
|
|
|
|
if(na>0) {
|
|
|
|
navg=line_read.mid(na+2,1).toInt();
|
|
|
|
if(line_read.mid(na+2,1)=="*") navg=10;
|
2020-04-08 16:56:28 -04:00
|
|
|
}
|
|
|
|
}
|
2020-04-09 13:56:35 -04:00
|
|
|
if(navg>=2) bAvgMsg=true;
|
2016-10-24 13:01:47 -04:00
|
|
|
}
|
2019-01-03 12:15:48 -05:00
|
|
|
write_all("Rx",line_read.trimmed());
|
2020-05-11 11:30:02 -04:00
|
|
|
int ntime=6;
|
|
|
|
if(m_TRperiod>=60) ntime=4;
|
2020-05-11 20:39:46 -04:00
|
|
|
if (line_read.left(ntime) != m_tBlankLine) {
|
|
|
|
ui->decodedTextBrowser->new_period ();
|
|
|
|
if (m_config.insert_blank ()
|
|
|
|
&& SpecOp::FOX != m_config.special_op_id()) {
|
|
|
|
QString band;
|
|
|
|
if((QDateTime::currentMSecsSinceEpoch() / 1000 - m_secBandChanged) > 4*int(m_TRperiod)/4) {
|
|
|
|
band = ' ' + m_config.bands ()->find (m_freqNominal);
|
|
|
|
}
|
|
|
|
ui->decodedTextBrowser->insertLineSpacer (band.rightJustified (40, '-'));
|
|
|
|
}
|
2020-05-11 11:30:02 -04:00
|
|
|
m_tBlankLine = line_read.left(ntime);
|
2017-11-02 14:45:19 -04:00
|
|
|
}
|
2020-07-25 21:58:04 -04:00
|
|
|
if ("FST4W" == m_mode)
|
|
|
|
{
|
|
|
|
uploadWSPRSpots (true, line_read);
|
|
|
|
}
|
2018-12-06 10:34:46 -05:00
|
|
|
DecodedText decodedtext0 {QString::fromUtf8(line_read.constData())};
|
|
|
|
DecodedText decodedtext {QString::fromUtf8(line_read.constData()).remove("TU; ")};
|
2018-10-08 12:52:28 -04:00
|
|
|
|
2018-10-30 17:06:01 -04:00
|
|
|
if(m_mode=="FT8" and SpecOp::FOX == m_config.special_op_id() and
|
2017-12-06 12:05:48 -05:00
|
|
|
(decodedtext.string().contains("R+") or decodedtext.string().contains("R-"))) {
|
2017-12-22 12:25:16 -05:00
|
|
|
auto for_us = decodedtext.string().contains(" " + m_config.my_callsign() + " ") or
|
|
|
|
decodedtext.string().contains(" "+m_baseCall) or
|
2018-10-08 18:00:09 -04:00
|
|
|
decodedtext.string().contains(m_baseCall+" ") or
|
|
|
|
decodedtext.string().contains(" <" + m_config.my_callsign() + "> ");
|
2018-05-10 11:09:57 -04:00
|
|
|
if(decodedtext.string().contains(" DE ")) for_us=true; //Hound with compound callsign
|
2017-12-22 12:25:16 -05:00
|
|
|
if(for_us) {
|
|
|
|
QString houndCall,houndGrid;
|
|
|
|
decodedtext.deCallAndGrid(/*out*/houndCall,houndGrid);
|
|
|
|
foxRxSequencer(decodedtext.string(),houndCall,houndGrid);
|
|
|
|
}
|
2017-11-16 13:43:59 -05:00
|
|
|
}
|
2018-10-08 12:52:28 -04:00
|
|
|
|
|
|
|
//Left (Band activity) window
|
2016-03-20 15:32:08 -04:00
|
|
|
if(!bAvgMsg) {
|
2018-10-30 17:06:01 -04:00
|
|
|
if(m_mode=="FT8" and SpecOp::FOX == m_config.special_op_id()) {
|
2017-11-02 14:45:19 -04:00
|
|
|
if(!m_bDisplayedOnce) {
|
|
|
|
// This hack sets the font. Surely there's a better way!
|
2018-07-11 13:25:01 -04:00
|
|
|
DecodedText dt{"."};
|
2018-10-24 19:00:19 -04:00
|
|
|
ui->decodedTextBrowser->displayDecodedText(dt,m_baseCall,m_mode,m_config.DXCC(),
|
2018-08-24 13:18:49 -04:00
|
|
|
m_logBook,m_currentBand,m_config.ppfx());
|
2017-11-02 14:45:19 -04:00
|
|
|
m_bDisplayedOnce=true;
|
|
|
|
}
|
|
|
|
} else {
|
2020-07-19 13:20:41 -04:00
|
|
|
DecodedText decodedtext1=decodedtext0;
|
|
|
|
ui->decodedTextBrowser->displayDecodedText(decodedtext1,m_baseCall,m_mode,m_config.DXCC(),
|
2020-07-20 13:27:29 -04:00
|
|
|
m_logBook,m_currentBand,m_config.ppfx(),
|
|
|
|
ui->cbCQonly->isVisible() && ui->cbCQonly->isChecked(),
|
|
|
|
haveFSpread, fSpread);
|
2019-08-08 09:55:08 -04:00
|
|
|
|
2020-11-27 07:36:24 -05:00
|
|
|
if(m_bBestSPArmed && m_mode=="FT4" && CALLING == m_QSOProgress) {
|
2019-04-08 12:36:05 -04:00
|
|
|
QString messagePriority=ui->decodedTextBrowser->CQPriority();
|
|
|
|
if(messagePriority!="") {
|
|
|
|
if(messagePriority=="New Call on Band"
|
|
|
|
and m_BestCQpriority!="New Call on Band"
|
|
|
|
and m_BestCQpriority!="New Multiplier") {
|
|
|
|
m_BestCQpriority="New Call on Band";
|
2020-11-27 07:36:24 -05:00
|
|
|
m_bDoubleClicked = true;
|
2019-04-08 12:36:05 -04:00
|
|
|
processMessage(decodedtext0);
|
|
|
|
}
|
2019-04-08 12:52:23 -04:00
|
|
|
if(messagePriority=="New DXCC"
|
|
|
|
and m_BestCQpriority!="New DXCC"
|
|
|
|
and m_BestCQpriority!="New Multiplier") {
|
|
|
|
m_BestCQpriority="New DXCC";
|
2020-11-27 07:36:24 -05:00
|
|
|
m_bDoubleClicked = true;
|
2019-04-08 12:52:23 -04:00
|
|
|
processMessage(decodedtext0);
|
|
|
|
}
|
2019-04-08 12:36:05 -04:00
|
|
|
}
|
|
|
|
}
|
2019-08-08 09:55:08 -04:00
|
|
|
|
2017-11-02 14:45:19 -04:00
|
|
|
}
|
2015-04-22 13:48:03 -04:00
|
|
|
}
|
2013-08-15 08:24:12 -04:00
|
|
|
|
2018-10-08 12:52:28 -04:00
|
|
|
//Right (Rx Frequency) window
|
2016-03-20 15:32:08 -04:00
|
|
|
bool bDisplayRight=bAvgMsg;
|
2017-07-10 11:17:03 -04:00
|
|
|
int audioFreq=decodedtext.frequencyOffset();
|
2020-07-23 13:51:05 -04:00
|
|
|
if(m_mode=="FT8" or m_mode=="FT4" or m_mode=="FST4") {
|
2018-07-31 10:45:32 -04:00
|
|
|
auto const& parts = decodedtext.string().remove("<").remove(">")
|
2020-06-13 11:04:41 -04:00
|
|
|
.split (' ', SkipEmptyParts);
|
2019-04-03 11:13:47 -04:00
|
|
|
if (parts.size() > 6) {
|
2017-07-24 15:27:23 -04:00
|
|
|
auto for_us = parts[5].contains (m_baseCall)
|
|
|
|
|| ("DE" == parts[5] && qAbs (ui->RxFreqSpinBox->value () - audioFreq) <= 10);
|
2017-10-05 14:27:34 -04:00
|
|
|
if(m_baseCall==m_config.my_callsign() and m_baseCall!=parts[5]) for_us=false;
|
2017-12-23 17:01:05 -05:00
|
|
|
if(m_bCallingCQ && !m_bAutoReply && for_us && ui->cbFirst->isChecked() and
|
2018-10-30 17:06:01 -04:00
|
|
|
SpecOp::FOX > m_config.special_op_id()) {
|
2017-07-24 15:27:23 -04:00
|
|
|
m_bDoubleClicked=true;
|
|
|
|
m_bAutoReply = true;
|
2018-10-30 17:06:01 -04:00
|
|
|
if(SpecOp::FOX != m_config.special_op_id()) processMessage (decodedtext);
|
2017-07-24 15:27:23 -04:00
|
|
|
ui->cbFirst->setStyleSheet("");
|
|
|
|
}
|
2018-10-30 17:06:01 -04:00
|
|
|
if(SpecOp::FOX==m_config.special_op_id() and decodedtext.string().contains(" DE ")) for_us=true; //Hound with compound callsign
|
|
|
|
if(SpecOp::FOX==m_config.special_op_id() and for_us and (audioFreq<1000)) bDisplayRight=true;
|
|
|
|
if(SpecOp::FOX!=m_config.special_op_id() and (for_us or (abs(audioFreq - m_wideGraph->rxFreq()) <= 10))) bDisplayRight=true;
|
2017-07-09 15:25:28 -04:00
|
|
|
}
|
2017-07-10 11:17:03 -04:00
|
|
|
} else {
|
2020-04-08 16:56:28 -04:00
|
|
|
if((abs(audioFreq - m_wideGraph->rxFreq()) <= 10) and
|
|
|
|
!m_config.enable_VHF_features()) bDisplayRight=true;
|
2017-07-09 15:25:28 -04:00
|
|
|
}
|
2017-12-08 14:53:27 -05:00
|
|
|
|
2016-03-20 15:32:08 -04:00
|
|
|
if (bDisplayRight) {
|
2017-07-10 09:20:33 -04:00
|
|
|
// This msg is within 10 hertz of our tuned frequency, or a JT4 or JT65 avg,
|
|
|
|
// or contains MyCall
|
2019-04-08 12:36:05 -04:00
|
|
|
if(!m_bBestSPArmed or m_mode!="FT4") {
|
|
|
|
ui->decodedTextBrowser2->displayDecodedText(decodedtext0,m_baseCall,m_mode,m_config.DXCC(),
|
|
|
|
m_logBook,m_currentBand,m_config.ppfx());
|
|
|
|
}
|
2015-06-08 10:20:30 -04:00
|
|
|
if(m_mode!="JT4") {
|
|
|
|
bool b65=decodedtext.isJT65();
|
|
|
|
if(b65 and m_modeTx!="JT65") on_pbTxMode_clicked();
|
|
|
|
if(!b65 and m_modeTx=="JT65") on_pbTxMode_clicked();
|
|
|
|
}
|
2017-09-01 01:11:57 -04:00
|
|
|
m_QSOText = decodedtext.string ().trimmed ();
|
2015-04-22 13:48:03 -04:00
|
|
|
}
|
2017-12-08 14:53:27 -05:00
|
|
|
|
2018-11-12 14:10:12 -05:00
|
|
|
postDecode (true, decodedtext.string ());
|
|
|
|
|
2018-10-30 17:06:01 -04:00
|
|
|
if(m_mode=="FT8" and SpecOp::HOUND==m_config.special_op_id()) {
|
2017-12-13 13:36:08 -05:00
|
|
|
if(decodedtext.string().contains(";")) {
|
2020-06-13 11:04:41 -04:00
|
|
|
QStringList w=decodedtext.string().mid(24).split(" ",SkipEmptyParts);
|
2017-12-13 13:36:08 -05:00
|
|
|
QString foxCall=w.at(3);
|
|
|
|
foxCall=foxCall.remove("<").remove(">");
|
2018-05-10 11:09:57 -04:00
|
|
|
if(w.at(0)==m_config.my_callsign() or w.at(0)==Radio::base_callsign(m_config.my_callsign())) {
|
2017-12-13 13:36:08 -05:00
|
|
|
//### Check for ui->dxCallEntry->text()==foxCall before logging! ###
|
2018-05-15 09:13:10 -04:00
|
|
|
ui->stopTxButton->click ();
|
2018-12-06 00:41:16 -05:00
|
|
|
logQSOTimer.start(0);
|
2017-12-13 13:36:08 -05:00
|
|
|
}
|
2018-05-10 15:07:31 -04:00
|
|
|
if((w.at(2)==m_config.my_callsign() or w.at(2)==Radio::base_callsign(m_config.my_callsign()))
|
|
|
|
and ui->tx3->text().length()>0) {
|
2017-12-13 13:36:08 -05:00
|
|
|
m_rptRcvd=w.at(4);
|
|
|
|
m_rptSent=decodedtext.string().mid(7,3);
|
2018-04-18 10:04:52 -04:00
|
|
|
m_nFoxFreq=decodedtext.string().mid(16,4).toInt();
|
2018-04-22 08:32:32 -04:00
|
|
|
hound_reply ();
|
2017-12-13 13:36:08 -05:00
|
|
|
}
|
|
|
|
} else {
|
2020-06-13 11:04:41 -04:00
|
|
|
QStringList w=decodedtext.string().mid(24).split(" ",SkipEmptyParts);
|
2017-12-27 16:06:57 -05:00
|
|
|
if(decodedtext.string().contains("/")) w.append(" +00"); //Add a dummy report
|
2017-12-29 13:26:10 -05:00
|
|
|
if(w.size()>=3) {
|
2017-12-18 14:07:10 -05:00
|
|
|
QString foxCall=w.at(1);
|
2018-05-10 11:09:57 -04:00
|
|
|
if((w.at(0)==m_config.my_callsign() or w.at(0)==Radio::base_callsign(m_config.my_callsign())) and
|
|
|
|
ui->tx3->text().length()>0) {
|
2017-12-18 14:07:10 -05:00
|
|
|
if(w.at(2)=="RR73") {
|
2018-05-15 09:13:10 -04:00
|
|
|
ui->stopTxButton->click ();
|
2018-12-06 00:41:16 -05:00
|
|
|
logQSOTimer.start(0);
|
2017-12-18 14:07:10 -05:00
|
|
|
} else {
|
2018-03-09 09:32:14 -05:00
|
|
|
if(w.at(1)==Radio::base_callsign(ui->dxCallEntry->text()) and
|
|
|
|
(w.at(2).mid(0,1)=="+" or w.at(2).mid(0,1)=="-")) {
|
|
|
|
m_rptRcvd=w.at(2);
|
|
|
|
m_rptSent=decodedtext.string().mid(7,3);
|
2018-04-18 10:04:52 -04:00
|
|
|
m_nFoxFreq=decodedtext.string().mid(16,4).toInt();
|
2018-04-22 08:32:32 -04:00
|
|
|
hound_reply ();
|
2018-03-09 09:32:14 -05:00
|
|
|
}
|
2017-12-18 14:07:10 -05:00
|
|
|
}
|
2017-12-13 13:36:08 -05:00
|
|
|
}
|
|
|
|
}
|
2017-12-08 14:53:27 -05:00
|
|
|
}
|
|
|
|
}
|
2017-12-13 13:36:08 -05:00
|
|
|
|
2018-07-05 16:51:52 -04:00
|
|
|
//### I think this is where we are preventing Hounds from spotting Fox ###
|
2018-10-30 17:06:01 -04:00
|
|
|
if(m_mode!="FT8" or (SpecOp::HOUND != m_config.special_op_id())) {
|
2020-06-20 13:47:32 -04:00
|
|
|
if(m_mode=="FT8" or m_mode=="FT4" or m_mode=="QRA64" or m_mode=="JT4"
|
2020-07-23 13:51:05 -04:00
|
|
|
or m_mode=="JT65" or m_mode=="JT9" or m_mode=="FST4") {
|
2018-10-08 12:52:28 -04:00
|
|
|
auto_sequence (decodedtext, 25, 50);
|
|
|
|
}
|
2018-03-09 08:56:37 -05:00
|
|
|
|
2018-03-28 11:46:48 -04:00
|
|
|
// find and extract any report for myCall, but save in m_rptRcvd only if it's from DXcall
|
|
|
|
QString rpt;
|
2018-03-09 08:56:37 -05:00
|
|
|
bool stdMsg = decodedtext.report(m_baseCall,
|
2018-03-28 11:46:48 -04:00
|
|
|
Radio::base_callsign(ui->dxCallEntry->text()), rpt);
|
|
|
|
QString deCall;
|
|
|
|
QString grid;
|
|
|
|
decodedtext.deCallAndGrid(/*out*/deCall,grid);
|
2018-03-30 15:28:30 -04:00
|
|
|
{
|
2018-12-23 18:51:48 -05:00
|
|
|
auto t = Radio::base_callsign (ui->dxCallEntry->text ());
|
2020-12-30 16:45:57 -05:00
|
|
|
auto const& dx_call = decodedtext.call ();
|
|
|
|
if (rpt.size () // report in message
|
|
|
|
&& (m_baseCall == Radio::base_callsign (dx_call) // for us
|
|
|
|
|| "DE" == dx_call) // probably for us
|
|
|
|
&& (t == deCall // DX station base call is QSO partner
|
|
|
|
|| ui->dxCallEntry->text () == deCall // DX station full call is QSO partner
|
|
|
|
|| !t.size ())) // not in QSO
|
|
|
|
{
|
|
|
|
m_rptRcvd = rpt;
|
|
|
|
}
|
2018-03-30 15:28:30 -04:00
|
|
|
}
|
2018-03-28 11:46:48 -04:00
|
|
|
// extract details and send to PSKreporter
|
2018-03-09 08:56:37 -05:00
|
|
|
int nsec=QDateTime::currentMSecsSinceEpoch()/1000-m_secBandChanged;
|
2019-05-22 12:44:28 -04:00
|
|
|
bool okToPost=(nsec > int(4*m_TRperiod)/5);
|
2020-07-23 13:51:05 -04:00
|
|
|
if(m_mode=="FST4W" and okToPost) {
|
2020-07-01 15:46:17 -04:00
|
|
|
line_read=line_read.left(22) + " CQ " + line_read.trimmed().mid(22);
|
2020-08-15 18:29:53 -04:00
|
|
|
auto p = line_read.lastIndexOf (' ');
|
|
|
|
DecodedText FST4W_post {QString::fromUtf8 (line_read.left (p).constData ())};
|
2020-07-23 13:51:05 -04:00
|
|
|
pskPost(FST4W_post);
|
2020-07-01 15:46:17 -04:00
|
|
|
} else {
|
|
|
|
if (stdMsg && okToPost) pskPost(decodedtext);
|
|
|
|
}
|
2018-03-09 08:56:37 -05:00
|
|
|
if((m_mode=="JT4" or m_mode=="JT65" or m_mode=="QRA64") and m_msgAvgWidget!=NULL) {
|
|
|
|
if(m_msgAvgWidget->isVisible()) {
|
|
|
|
QFile f(m_config.temp_dir ().absoluteFilePath ("avemsg.txt"));
|
|
|
|
if(f.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
|
|
|
QTextStream s(&f);
|
|
|
|
QString t=s.readAll();
|
|
|
|
m_msgAvgWidget->displayAvg(t);
|
|
|
|
}
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
}
|
2015-04-22 13:48:03 -04:00
|
|
|
}
|
2013-04-16 16:15:25 -04:00
|
|
|
}
|
2012-11-20 15:39:41 -05:00
|
|
|
}
|
2015-04-22 13:48:03 -04:00
|
|
|
}
|
2012-11-20 15:39:41 -05:00
|
|
|
}
|
|
|
|
|
2017-07-28 19:25:32 -04:00
|
|
|
//
|
|
|
|
// start_tolerance - only respond to "DE ..." and free text 73
|
|
|
|
// messages within +/- this value
|
|
|
|
//
|
|
|
|
// stop_tolerance - kill Tx if running station is seen to reply to
|
|
|
|
// another caller and we are going to transmit within
|
|
|
|
// +/- this value of the reply to another caller
|
|
|
|
//
|
2017-09-01 01:11:57 -04:00
|
|
|
void MainWindow::auto_sequence (DecodedText const& message, unsigned start_tolerance, unsigned stop_tolerance)
|
|
|
|
{
|
|
|
|
auto const& message_words = message.messageWords ();
|
2018-08-29 09:31:12 -04:00
|
|
|
auto is_73 = message_words.filter (QRegularExpression {"^(73|RR73)$"}).size();
|
2017-09-22 13:38:51 -04:00
|
|
|
bool is_OK=false;
|
2021-03-03 06:51:22 -05:00
|
|
|
if(m_mode=="MSK144" and message.clean_string ().indexOf(ui->dxCallEntry->text()+" R ")>0) is_OK=true;
|
2018-08-29 09:31:12 -04:00
|
|
|
if (message_words.size () > 2 && (message.isStandardMessage() || (is_73 or is_OK))) {
|
2017-09-01 01:11:57 -04:00
|
|
|
auto df = message.frequencyOffset ();
|
2018-07-11 13:25:01 -04:00
|
|
|
auto within_tolerance = (qAbs (ui->RxFreqSpinBox->value () - df) <= int (start_tolerance)
|
2017-09-01 01:11:57 -04:00
|
|
|
|| qAbs (ui->TxFreqSpinBox->value () - df) <= int (start_tolerance));
|
|
|
|
bool acceptable_73 = is_73
|
|
|
|
&& m_QSOProgress >= ROGER_REPORT
|
|
|
|
&& ((message.isStandardMessage ()
|
|
|
|
&& (message_words.contains (m_baseCall)
|
|
|
|
|| message_words.contains (m_config.my_callsign ())
|
|
|
|
|| message_words.contains (ui->dxCallEntry->text ())
|
|
|
|
|| message_words.contains (Radio::base_callsign (ui->dxCallEntry->text ()))
|
|
|
|
|| message_words.contains ("DE")))
|
2017-12-08 14:53:27 -05:00
|
|
|
|| !message.isStandardMessage ()); // free text 73/RR73
|
2020-04-21 15:50:27 -04:00
|
|
|
|
2021-03-03 06:51:22 -05:00
|
|
|
QStringList w=message.clean_string ().mid(22).remove("<").remove(">").split(" ",SkipEmptyParts);
|
2020-04-22 13:32:00 -04:00
|
|
|
QString w2;
|
2018-07-27 16:50:58 -04:00
|
|
|
int nrpt=0;
|
2020-04-22 13:32:00 -04:00
|
|
|
if (w.size () > 2)
|
|
|
|
{
|
|
|
|
w2=w.at(2);
|
|
|
|
if(w.size()>3) {
|
|
|
|
nrpt=w2.toInt();
|
|
|
|
if(w2=="R") nrpt=w.at(3).toInt();
|
|
|
|
}
|
|
|
|
}
|
2020-04-21 15:50:27 -04:00
|
|
|
bool bEU_VHF=(nrpt>=520001 and nrpt<=594000);
|
2021-03-03 06:51:22 -05:00
|
|
|
if(bEU_VHF and message.clean_string ().contains("<"+m_config.my_callsign() + "> ")) {
|
|
|
|
m_xRcvd=message.clean_string ().trimmed().right(13);
|
2019-11-18 14:00:42 -05:00
|
|
|
}
|
2017-07-25 21:39:30 -04:00
|
|
|
if (m_auto
|
2018-07-27 15:21:40 -04:00
|
|
|
&& (m_QSOProgress==REPLYING or (!ui->tx1->isEnabled () and m_QSOProgress==REPORT))
|
2017-07-28 19:25:32 -04:00
|
|
|
&& qAbs (ui->TxFreqSpinBox->value () - df) <= int (stop_tolerance)
|
2017-09-01 19:28:44 -04:00
|
|
|
&& message_words.at (1) != "DE"
|
2017-09-01 01:11:57 -04:00
|
|
|
&& !message_words.at (1).contains (QRegularExpression {"(^(CQ|QRZ))|" + m_baseCall})
|
|
|
|
&& message_words.at (2).contains (Radio::base_callsign (ui->dxCallEntry->text ()))) {
|
2017-07-25 21:39:30 -04:00
|
|
|
// auto stop to avoid accidental QRM
|
2017-09-02 19:46:38 -04:00
|
|
|
ui->stopTxButton->click (); // halt any transmission
|
2018-07-27 15:21:40 -04:00
|
|
|
} else if (m_auto // transmit allowed
|
2017-07-24 15:27:23 -04:00
|
|
|
&& ui->cbAutoSeq->isVisible () && ui->cbAutoSeq->isChecked() // auto-sequencing allowed
|
|
|
|
&& ((!m_bCallingCQ // not calling CQ/QRZ
|
2018-07-27 15:21:40 -04:00
|
|
|
&& !m_sentFirst73 // not finished QSO
|
|
|
|
&& ((message_words.at (1).contains (m_baseCall)
|
2017-07-24 15:27:23 -04:00
|
|
|
// being called and not already in a QSO
|
2020-04-21 15:50:27 -04:00
|
|
|
&& (message_words.at(2).contains(Radio::base_callsign(ui->dxCallEntry->text())) or bEU_VHF))
|
2017-07-24 15:27:23 -04:00
|
|
|
// type 2 compound replies
|
2018-07-27 15:21:40 -04:00
|
|
|
|| (within_tolerance &&
|
|
|
|
(acceptable_73 ||
|
|
|
|
("DE" == message_words.at (1) &&
|
|
|
|
w2.contains(Radio::base_callsign (m_hisCall)))))))
|
2017-07-24 15:27:23 -04:00
|
|
|
|| (m_bCallingCQ && m_bAutoReply
|
2017-09-01 01:11:57 -04:00
|
|
|
// look for type 2 compound call replies on our Tx and Rx offsets
|
|
|
|
&& ((within_tolerance && "DE" == message_words.at (1))
|
2018-07-11 13:25:01 -04:00
|
|
|
|| message_words.at (1).contains (m_baseCall))))) {
|
2018-10-30 17:06:01 -04:00
|
|
|
if(SpecOp::FOX != m_config.special_op_id()) processMessage (message);
|
2017-09-22 13:38:51 -04:00
|
|
|
}
|
2017-06-26 11:24:56 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-08-29 22:27:57 -04:00
|
|
|
void MainWindow::pskPost (DecodedText const& decodedtext)
|
2016-10-02 19:16:47 -04:00
|
|
|
{
|
2020-07-15 09:45:08 -04:00
|
|
|
if (m_diskData || !m_config.spot_to_psk_reporter() || decodedtext.isLowConfidence ()) return;
|
2017-07-26 17:18:59 -04:00
|
|
|
|
2016-10-02 19:16:47 -04:00
|
|
|
QString msgmode=m_mode;
|
|
|
|
if(m_mode=="JT9+JT65") {
|
|
|
|
msgmode="JT9";
|
|
|
|
if (decodedtext.isJT65()) msgmode="JT65";
|
|
|
|
}
|
|
|
|
QString deCall;
|
|
|
|
QString grid;
|
2016-10-03 13:08:02 -04:00
|
|
|
decodedtext.deCallAndGrid(/*out*/deCall,grid);
|
2016-10-02 19:16:47 -04:00
|
|
|
int audioFrequency = decodedtext.frequencyOffset();
|
2019-04-30 16:02:26 -04:00
|
|
|
if(m_mode=="FT8" or m_mode=="MSK144" or m_mode=="FT4") {
|
2017-07-08 12:10:23 -04:00
|
|
|
audioFrequency=decodedtext.string().mid(16,4).toInt();
|
|
|
|
}
|
2016-10-02 19:16:47 -04:00
|
|
|
int snr = decodedtext.snr();
|
|
|
|
Frequency frequency = m_freqNominal + audioFrequency;
|
2017-07-24 15:27:23 -04:00
|
|
|
if(grid.contains (grid_regexp)) {
|
2017-07-01 09:37:29 -04:00
|
|
|
// qDebug() << "To PSKreporter:" << deCall << grid << frequency << msgmode << snr;
|
2020-06-20 20:36:30 -04:00
|
|
|
if (!m_psk_Reporter.addRemoteStation (deCall, grid, frequency, msgmode, snr))
|
|
|
|
{
|
|
|
|
showStatusMessage (tr ("Spotting to PSK Reporter unavailable"));
|
|
|
|
}
|
2016-10-02 19:16:47 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-07-03 13:33:05 -04:00
|
|
|
void MainWindow::killFile ()
|
2013-04-12 13:57:20 -04:00
|
|
|
{
|
2020-03-19 15:41:18 -04:00
|
|
|
if (m_fnameWE.size () && !(m_saveAll || (m_saveDecoded && m_bDecoded))) {
|
2016-06-24 13:01:51 -04:00
|
|
|
QFile f1 {m_fnameWE + ".wav"};
|
2016-06-03 14:20:53 -04:00
|
|
|
if(f1.exists()) f1.remove();
|
2020-07-23 13:51:05 -04:00
|
|
|
if(m_mode=="WSPR" or m_mode=="FST4W") {
|
2016-06-24 13:01:51 -04:00
|
|
|
QFile f2 {m_fnameWE + ".c2"};
|
2016-06-03 14:20:53 -04:00
|
|
|
if(f2.exists()) f2.remove();
|
2015-11-17 20:28:12 -05:00
|
|
|
}
|
2013-04-12 13:57:20 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-09-16 16:27:33 -04:00
|
|
|
void MainWindow::on_EraseButton_clicked ()
|
2012-05-22 13:09:48 -04:00
|
|
|
{
|
2013-04-11 12:51:57 -04:00
|
|
|
qint64 ms=QDateTime::currentMSecsSinceEpoch();
|
2017-09-16 16:27:33 -04:00
|
|
|
ui->decodedTextBrowser2->erase ();
|
2020-07-23 13:51:05 -04:00
|
|
|
if(m_mode=="WSPR" or m_mode=="Echo" or m_mode=="ISCAT" or m_mode=="FST4W") {
|
2017-09-16 16:27:33 -04:00
|
|
|
ui->decodedTextBrowser->erase ();
|
2015-05-27 09:08:28 -04:00
|
|
|
} else {
|
|
|
|
if((ms-m_msErase)<500) {
|
2017-09-16 16:27:33 -04:00
|
|
|
ui->decodedTextBrowser->erase ();
|
2015-05-27 09:08:28 -04:00
|
|
|
}
|
2013-04-22 11:43:02 -04:00
|
|
|
}
|
2013-04-11 12:51:57 -04:00
|
|
|
m_msErase=ms;
|
2017-09-16 16:27:33 -04:00
|
|
|
}
|
|
|
|
|
2017-09-16 18:20:51 -04:00
|
|
|
void MainWindow::band_activity_cleared ()
|
2017-09-16 16:27:33 -04:00
|
|
|
{
|
2019-02-02 19:49:35 -05:00
|
|
|
m_messageClient->decodes_cleared ();
|
2017-09-16 16:27:33 -04:00
|
|
|
QFile f(m_config.temp_dir ().absoluteFilePath ("decoded.txt"));
|
|
|
|
if(f.exists()) f.remove();
|
2017-09-16 18:20:51 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void MainWindow::rx_frequency_activity_cleared ()
|
|
|
|
{
|
|
|
|
m_QSOText.clear();
|
2017-09-16 16:27:33 -04:00
|
|
|
set_dateTimeQSO(-1); // G4WJS: why do we do this?
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void MainWindow::decodeBusy(bool b) //decodeBusy()
|
|
|
|
{
|
2019-01-08 13:03:43 -05:00
|
|
|
if (!b) {
|
|
|
|
m_optimizingProgress.reset ();
|
|
|
|
}
|
2012-05-22 13:09:48 -04:00
|
|
|
m_decoderBusy=b;
|
|
|
|
ui->DecodeButton->setEnabled(!b);
|
|
|
|
ui->actionOpen->setEnabled(!b);
|
|
|
|
ui->actionOpen_next_in_directory->setEnabled(!b);
|
|
|
|
ui->actionDecode_remaining_files_in_directory->setEnabled(!b);
|
2015-11-13 10:44:11 -05:00
|
|
|
|
2016-05-24 06:08:35 -04:00
|
|
|
statusUpdate ();
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
//------------------------------------------------------------- //guiUpdate()
|
|
|
|
void MainWindow::guiUpdate()
|
|
|
|
{
|
2018-07-06 12:52:39 -04:00
|
|
|
static char message[38];
|
|
|
|
static char msgsent[38];
|
2015-11-17 20:28:12 -05:00
|
|
|
double txDuration;
|
2013-04-30 14:54:11 -04:00
|
|
|
QString rt;
|
2012-05-22 13:09:48 -04:00
|
|
|
|
2019-05-22 12:44:28 -04:00
|
|
|
if(m_TRperiod==0) m_TRperiod=60.0;
|
2015-11-17 20:28:12 -05:00
|
|
|
txDuration=0.0;
|
2019-05-22 18:02:15 -04:00
|
|
|
if(m_modeTx=="FT4") txDuration=1.0 + 105*576/12000.0; // FT4
|
2017-07-06 12:27:22 -04:00
|
|
|
if(m_modeTx=="FT8") txDuration=1.0 + 79*1920/12000.0; // FT8
|
2015-11-17 20:28:12 -05:00
|
|
|
if(m_modeTx=="JT4") txDuration=1.0 + 207.0*2520/11025.0; // JT4
|
|
|
|
if(m_modeTx=="JT9") txDuration=1.0 + 85.0*m_nsps/12000.0; // JT9
|
2016-06-30 08:46:14 -04:00
|
|
|
if(m_modeTx=="JT65") txDuration=1.0 + 126*4096/11025.0; // JT65
|
2020-06-16 16:59:40 -04:00
|
|
|
if(m_modeTx=="QRA64") txDuration=1.0 + 84*6912/12000.0; // QRA64
|
|
|
|
if(m_modeTx=="WSPR") txDuration=2.0 + 162*8192/12000.0; // WSPR
|
2020-07-23 13:51:05 -04:00
|
|
|
if(m_modeTx=="FST4" or m_mode=="FST4W") { //FST4, FST4W
|
2020-06-29 17:33:46 -04:00
|
|
|
if(m_TRperiod==15) txDuration=1.0 + 160*720/12000.0;
|
2020-06-27 13:07:11 -04:00
|
|
|
if(m_TRperiod==30) txDuration=1.0 + 160*1680/12000.0;
|
|
|
|
if(m_TRperiod==60) txDuration=1.0 + 160*3888/12000.0;
|
|
|
|
if(m_TRperiod==120) txDuration=1.0 + 160*8200/12000.0;
|
2020-06-27 16:24:11 -04:00
|
|
|
if(m_TRperiod==300) txDuration=1.0 + 160*21504/12000.0;
|
2020-07-17 18:44:14 -04:00
|
|
|
if(m_TRperiod==900) txDuration=1.0 + 160*66560/12000.0;
|
|
|
|
if(m_TRperiod==1800) txDuration=1.0 + 160*134400/12000.0;
|
2020-06-16 16:59:40 -04:00
|
|
|
}
|
2017-07-08 14:44:42 -04:00
|
|
|
if(m_modeTx=="ISCAT" or m_mode=="MSK144" or m_bFast9) {
|
2016-09-13 13:52:45 -04:00
|
|
|
txDuration=m_TRperiod-0.25; // ISCAT, JT9-fast, MSK144
|
2016-06-03 11:45:54 -04:00
|
|
|
}
|
2012-05-22 13:09:48 -04:00
|
|
|
|
2015-05-27 09:08:28 -04:00
|
|
|
double tx1=0.0;
|
2016-10-13 12:19:24 -04:00
|
|
|
double tx2=txDuration;
|
2019-01-28 10:19:46 -05:00
|
|
|
if(m_mode=="FT8" or m_mode=="FT4") icw[0]=0; //No CW ID in FT4 or FT8 mode
|
2016-10-13 17:32:30 -04:00
|
|
|
if((icw[0]>0) and (!m_bFast9)) tx2 += icw[0]*2560.0/48000.0; //Full length including CW ID
|
2016-11-19 13:28:14 -05:00
|
|
|
if(tx2>m_TRperiod) tx2=m_TRperiod;
|
|
|
|
|
2020-07-23 13:51:05 -04:00
|
|
|
if(!m_txFirst and m_mode!="WSPR" and m_mode!="FST4W") {
|
2012-09-24 15:11:31 -04:00
|
|
|
tx1 += m_TRperiod;
|
|
|
|
tx2 += m_TRperiod;
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
2015-06-05 20:02:02 -04:00
|
|
|
|
2012-05-22 13:09:48 -04:00
|
|
|
qint64 ms = QDateTime::currentMSecsSinceEpoch() % 86400000;
|
|
|
|
int nsec=ms/1000;
|
|
|
|
double tsec=0.001*ms;
|
2012-09-24 15:11:31 -04:00
|
|
|
double t2p=fmod(tsec,2*m_TRperiod);
|
2015-06-05 20:02:02 -04:00
|
|
|
m_s6=fmod(tsec,6.0);
|
2019-05-22 12:44:28 -04:00
|
|
|
m_nseq = fmod(double(nsec),m_TRperiod);
|
|
|
|
m_tRemaining=m_TRperiod - fmod(tsec,m_TRperiod);
|
2015-05-27 09:08:28 -04:00
|
|
|
|
2015-06-06 14:02:39 -04:00
|
|
|
if(m_mode=="Echo") {
|
2017-12-22 20:04:12 -05:00
|
|
|
txDuration=2.4;
|
2015-06-06 14:02:39 -04:00
|
|
|
tx1=0.0;
|
|
|
|
tx2=txDuration;
|
|
|
|
if(m_auto and m_s6>4.0) m_bEchoTxOK=true;
|
2015-06-11 11:32:55 -04:00
|
|
|
if(m_transmitting) m_bEchoTxed=true;
|
2015-06-06 14:02:39 -04:00
|
|
|
}
|
|
|
|
|
2020-07-23 13:51:05 -04:00
|
|
|
if(m_mode=="WSPR" or m_mode=="FST4W") {
|
2015-05-28 18:58:24 -04:00
|
|
|
if(m_nseq==0 and m_ntr==0) { //Decide whether to Tx or Rx
|
|
|
|
m_tuneup=false; //This is not an ATU tuneup
|
2017-05-17 10:43:16 -04:00
|
|
|
bool btx = m_auto && m_WSPR_tx_next; // To Tx, we need m_auto and
|
|
|
|
// scheduled transmit
|
2020-08-15 10:57:29 -04:00
|
|
|
m_WSPR_tx_next = false;
|
2015-05-28 18:58:24 -04:00
|
|
|
if(btx) {
|
2017-05-17 10:43:16 -04:00
|
|
|
m_ntr=-1; //This says we will have transmitted
|
2020-08-14 21:57:23 -04:00
|
|
|
ui->pbTxNext->setChecked (false);
|
2020-07-23 13:51:05 -04:00
|
|
|
m_bTxTime=true; //Start a WSPR or FST4W Tx sequence
|
2015-05-27 09:08:28 -04:00
|
|
|
} else {
|
2020-08-15 10:57:29 -04:00
|
|
|
// This will be a WSPR or FST4W Rx sequence.
|
2017-05-17 10:43:16 -04:00
|
|
|
m_ntr=1; //This says we will have received
|
2020-07-23 13:51:05 -04:00
|
|
|
m_bTxTime=false; //Start a WSPR or FST4W Rx sequence
|
2015-05-27 09:08:28 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
2020-10-03 19:46:59 -04:00
|
|
|
// For all modes other than WSPR and FST4W
|
2015-06-05 20:02:02 -04:00
|
|
|
m_bTxTime = (t2p >= tx1) and (t2p < tx2);
|
2015-06-06 14:02:39 -04:00
|
|
|
if(m_mode=="Echo") m_bTxTime = m_bTxTime and m_bEchoTxOK;
|
2020-04-07 09:39:48 -04:00
|
|
|
if(m_mode=="FT8" and ui->tx5->currentText().contains("/B ")) {
|
|
|
|
//FT8 beacon transmissiion from Tx5 only at top of a UTC minute
|
|
|
|
double t4p=fmod(tsec,4*m_TRperiod);
|
|
|
|
if(t4p >= 30.0) m_bTxTime=false;
|
|
|
|
}
|
2015-05-27 09:08:28 -04:00
|
|
|
}
|
|
|
|
if(m_tune) m_bTxTime=true; //"Tune" takes precedence
|
2012-05-22 13:09:48 -04:00
|
|
|
|
2015-04-22 13:48:03 -04:00
|
|
|
if(m_transmitting or m_auto or m_tune) {
|
2018-12-01 13:16:57 -05:00
|
|
|
m_dateTimeLastTX = QDateTime::currentDateTimeUtc ();
|
2017-12-03 16:59:59 -05:00
|
|
|
|
2019-05-23 13:24:35 -04:00
|
|
|
// Check for "txboth" (FT4 testing purposes only)
|
2015-06-02 10:06:26 -04:00
|
|
|
QFile f(m_appDir + "/txboth");
|
2019-05-23 13:24:35 -04:00
|
|
|
if(f.exists() and fmod(tsec,m_TRperiod) < (0.5 + 105.0*576.0/12000.0)) m_bTxTime=true;
|
2012-10-26 12:01:57 -04:00
|
|
|
|
2015-05-27 09:08:28 -04:00
|
|
|
// Don't transmit another mode in the 30 m WSPR sub-band
|
2016-04-06 13:11:58 -04:00
|
|
|
Frequency onAirFreq = m_freqNominal + ui->TxFreqSpinBox->value();
|
2020-07-02 09:39:11 -04:00
|
|
|
if ((onAirFreq > 10139900 and onAirFreq < 10140320) and m_mode!="WSPR") {
|
2015-05-27 09:08:28 -04:00
|
|
|
m_bTxTime=false;
|
2015-04-22 13:48:03 -04:00
|
|
|
if (m_auto) auto_tx_mode (false);
|
2016-04-30 20:40:51 -04:00
|
|
|
if(onAirFreq!=m_onAirFreq0) {
|
|
|
|
m_onAirFreq0=onAirFreq;
|
2016-07-03 16:31:19 -04:00
|
|
|
auto const& message = tr ("Please choose another Tx frequency."
|
|
|
|
" WSJT-X will not knowingly transmit another"
|
|
|
|
" mode in the WSPR sub-band on 30m.");
|
|
|
|
QTimer::singleShot (0, [=] { // don't block guiUpdate
|
|
|
|
MessageBox::warning_message (this, tr ("WSPR Guard Band"), message);
|
|
|
|
});
|
2013-07-11 15:37:01 -04:00
|
|
|
}
|
2015-04-22 13:48:03 -04:00
|
|
|
}
|
2013-07-11 15:37:01 -04:00
|
|
|
|
2018-10-30 17:06:01 -04:00
|
|
|
if(m_mode=="FT8" and SpecOp::FOX==m_config.special_op_id()) {
|
2018-05-01 14:27:59 -04:00
|
|
|
// Don't allow Fox mode in any of the default FT8 sub-bands.
|
|
|
|
qint32 ft8Freq[]={1840,3573,7074,10136,14074,18100,21074,24915,28074,50313,70100};
|
|
|
|
for(int i=0; i<11; i++) {
|
|
|
|
int kHzdiff=m_freqNominal/1000 - ft8Freq[i];
|
|
|
|
if(qAbs(kHzdiff) < 4) {
|
|
|
|
m_bTxTime=false;
|
|
|
|
if (m_auto) auto_tx_mode (false);
|
|
|
|
auto const& message = tr ("Please choose another dial frequency."
|
|
|
|
" WSJT-X will not operate in Fox mode"
|
|
|
|
" in the standard FT8 sub-bands.");
|
|
|
|
QTimer::singleShot (0, [=] { // don't block guiUpdate
|
|
|
|
MessageBox::warning_message (this, tr ("Fox Mode warning"), message);
|
|
|
|
});
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-07-23 13:51:05 -04:00
|
|
|
if (m_config.watchdog() && m_mode!="WSPR" && m_mode!="FST4W"
|
2016-07-08 16:45:45 -04:00
|
|
|
&& m_idleMinutes >= m_config.watchdog ()) {
|
2016-07-09 14:35:25 -04:00
|
|
|
tx_watchdog (true); // disable transmit
|
2016-07-01 07:36:59 -04:00
|
|
|
}
|
|
|
|
|
2019-05-22 12:44:28 -04:00
|
|
|
float fTR=float((ms%int(1000.0*m_TRperiod)))/int(1000.0*m_TRperiod);
|
2018-03-12 14:01:25 -04:00
|
|
|
|
|
|
|
QString txMsg;
|
|
|
|
if(m_ntx == 1) txMsg=ui->tx1->text();
|
|
|
|
if(m_ntx == 2) txMsg=ui->tx2->text();
|
|
|
|
if(m_ntx == 3) txMsg=ui->tx3->text();
|
|
|
|
if(m_ntx == 4) txMsg=ui->tx4->text();
|
|
|
|
if(m_ntx == 5) txMsg=ui->tx5->currentText();
|
|
|
|
if(m_ntx == 6) txMsg=ui->tx6->text();
|
|
|
|
int msgLength=txMsg.trimmed().length();
|
2018-03-28 10:53:07 -04:00
|
|
|
if(msgLength==0 and !m_tune) on_stopTxButton_clicked();
|
2018-03-12 14:01:25 -04:00
|
|
|
|
2018-03-28 10:53:07 -04:00
|
|
|
if(g_iptt==0 and ((m_bTxTime and fTR<0.75 and msgLength>0) or m_tune)) {
|
|
|
|
//### Allow late starts
|
2013-03-24 21:24:47 -04:00
|
|
|
icw[0]=m_ncw;
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
g_iptt = 1;
|
2016-04-06 13:11:58 -04:00
|
|
|
setRig ();
|
2018-04-21 15:10:30 -04:00
|
|
|
if(m_mode=="FT8") {
|
2018-10-30 17:06:01 -04:00
|
|
|
if (SpecOp::FOX == m_config.special_op_id()) {
|
2018-04-22 08:32:32 -04:00
|
|
|
if (ui->TxFreqSpinBox->value() > 900) {
|
|
|
|
ui->TxFreqSpinBox->setValue(300);
|
|
|
|
}
|
2018-04-21 15:10:30 -04:00
|
|
|
}
|
2018-10-30 17:06:01 -04:00
|
|
|
else if (SpecOp::HOUND == m_config.special_op_id()) {
|
2018-04-21 15:10:30 -04:00
|
|
|
if(m_auto && !m_tune) {
|
|
|
|
if (ui->TxFreqSpinBox->value() < 999 && m_ntx != 3) {
|
2020-06-13 11:04:41 -04:00
|
|
|
// Hound randomized range: 1000-3000 Hz
|
|
|
|
#if QT_VERSION >= QT_VERSION_CHECK (5, 15, 0)
|
|
|
|
ui->TxFreqSpinBox->setValue (QRandomGenerator::global ()->bounded (1000, 2999));
|
|
|
|
#else
|
|
|
|
ui->TxFreqSpinBox->setValue ((qrand () % 2000) + 1000);
|
|
|
|
#endif
|
2018-04-21 15:10:30 -04:00
|
|
|
}
|
|
|
|
}
|
2018-04-24 10:42:36 -04:00
|
|
|
if (m_nSentFoxRrpt==2 and m_ntx==3) {
|
|
|
|
// move off the original Fox frequency on subsequent tries of Tx3
|
|
|
|
int nfreq=m_nFoxFreq + 300;
|
|
|
|
if(m_nFoxFreq>600) nfreq=m_nFoxFreq - 300; //keep nfreq below 900 Hz
|
|
|
|
ui->TxFreqSpinBox->setValue(nfreq);
|
2018-04-21 15:10:30 -04:00
|
|
|
}
|
|
|
|
if (m_nSentFoxRrpt == 1) {
|
|
|
|
++m_nSentFoxRrpt;
|
|
|
|
}
|
|
|
|
}
|
2017-12-14 11:24:06 -05:00
|
|
|
}
|
2018-04-21 15:10:30 -04:00
|
|
|
|
2018-02-02 11:02:00 -05:00
|
|
|
|
|
|
|
// If HoldTxFreq is not checked, randomize Fox's Tx Freq
|
|
|
|
// NB: Maybe this should be done no more than once every 5 minutes or so ?
|
2018-10-30 17:06:01 -04:00
|
|
|
if(m_mode=="FT8" and SpecOp::FOX==m_config.special_op_id() and !ui->cbHoldTxFreq->isChecked()) {
|
2020-06-13 11:04:41 -04:00
|
|
|
#if QT_VERSION >= QT_VERSION_CHECK (5, 15, 0)
|
|
|
|
ui->TxFreqSpinBox->setValue (QRandomGenerator::global ()->bounded (300, 599));
|
|
|
|
#else
|
|
|
|
ui->TxFreqSpinBox->setValue(300.0 + 300.0*double(qrand())/RAND_MAX);
|
|
|
|
#endif
|
2018-02-02 11:02:00 -05:00
|
|
|
}
|
2015-11-17 20:28:12 -05:00
|
|
|
|
2018-02-21 11:34:02 -05:00
|
|
|
setXIT (ui->TxFreqSpinBox->value ());
|
2020-09-08 07:54:19 -04:00
|
|
|
m_config.transceiver_ptt (true); //Assert the PTT
|
2017-06-30 20:19:58 -04:00
|
|
|
m_tx_when_ready = true;
|
2015-05-27 09:08:28 -04:00
|
|
|
}
|
2019-04-01 14:23:10 -04:00
|
|
|
// if(!m_bTxTime and !m_tune and m_mode!="FT4") m_btxok=false; //Time to stop transmitting
|
|
|
|
if(!m_bTxTime and !m_tune) m_btxok=false; //Time to stop transmitting
|
2015-05-27 09:08:28 -04:00
|
|
|
}
|
|
|
|
|
2020-07-23 13:51:05 -04:00
|
|
|
if((m_mode=="WSPR" or m_mode=="FST4W") and
|
2015-05-27 09:08:28 -04:00
|
|
|
((m_ntr==1 and m_rxDone) or (m_ntr==-1 and m_nseq>tx2))) {
|
|
|
|
if(m_monitoring) {
|
|
|
|
m_rxDone=false;
|
|
|
|
}
|
|
|
|
if(m_transmitting) {
|
2016-04-06 13:11:58 -04:00
|
|
|
WSPR_history(m_freqNominal,-1);
|
2020-07-23 13:51:05 -04:00
|
|
|
m_bTxTime=false; //Time to stop a WSPR or FST4W transmission
|
2015-05-27 09:08:28 -04:00
|
|
|
m_btxok=false;
|
|
|
|
}
|
2015-07-11 18:50:05 -04:00
|
|
|
else if (m_ntr != -1) {
|
2015-06-06 09:40:10 -04:00
|
|
|
WSPR_scheduling ();
|
2020-07-23 13:51:05 -04:00
|
|
|
m_ntr=0; //This WSPR or FST4W Rx sequence is complete
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-11-30 13:45:51 -05:00
|
|
|
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
// Calculate Tx tones when needed
|
2016-04-30 20:40:51 -04:00
|
|
|
if((g_iptt==1 && m_iptt0==0) || m_restart) {
|
2015-06-05 20:02:02 -04:00
|
|
|
//----------------------------------------------------------------------
|
2012-05-22 13:09:48 -04:00
|
|
|
QByteArray ba;
|
2017-09-25 13:02:52 -04:00
|
|
|
QByteArray ba0;
|
2015-05-27 09:08:28 -04:00
|
|
|
|
2020-07-02 09:39:11 -04:00
|
|
|
if(m_mode=="WSPR") {
|
2020-07-01 12:01:47 -04:00
|
|
|
ba=WSPR_message().toLatin1();
|
2015-05-27 09:08:28 -04:00
|
|
|
} else {
|
2018-10-30 17:06:01 -04:00
|
|
|
if(SpecOp::HOUND == m_config.special_op_id() and m_ntx!=3) { //Hound transmits only Tx1 or Tx3
|
2017-12-27 16:06:57 -05:00
|
|
|
m_ntx=1;
|
|
|
|
ui->txrb1->setChecked(true);
|
|
|
|
}
|
2019-04-08 12:36:05 -04:00
|
|
|
|
|
|
|
if(m_mode=="FT4" and m_bBestSPArmed) {
|
|
|
|
m_BestCQpriority="";
|
|
|
|
m_bBestSPArmed=false;
|
|
|
|
ui->pbBestSP->setStyleSheet ("");
|
|
|
|
}
|
|
|
|
|
2015-05-27 09:08:28 -04:00
|
|
|
if(m_ntx == 1) ba=ui->tx1->text().toLocal8Bit();
|
|
|
|
if(m_ntx == 2) ba=ui->tx2->text().toLocal8Bit();
|
|
|
|
if(m_ntx == 3) ba=ui->tx3->text().toLocal8Bit();
|
|
|
|
if(m_ntx == 4) ba=ui->tx4->text().toLocal8Bit();
|
|
|
|
if(m_ntx == 5) ba=ui->tx5->currentText().toLocal8Bit();
|
|
|
|
if(m_ntx == 6) ba=ui->tx6->text().toLocal8Bit();
|
|
|
|
}
|
2012-05-22 13:09:48 -04:00
|
|
|
|
|
|
|
ba2msg(ba,message);
|
2015-03-17 10:59:19 -04:00
|
|
|
int ichk=0;
|
|
|
|
if (m_lastMessageSent != m_currentMessage
|
|
|
|
|| m_lastMessageType != m_currentMessageType)
|
|
|
|
{
|
|
|
|
m_lastMessageSent = m_currentMessage;
|
|
|
|
m_lastMessageType = m_currentMessageType;
|
|
|
|
}
|
|
|
|
m_currentMessageType = 0;
|
2015-06-10 10:58:55 -04:00
|
|
|
if(m_tune or m_mode=="Echo") {
|
2015-04-22 13:48:03 -04:00
|
|
|
itone[0]=0;
|
|
|
|
} else {
|
2015-11-17 20:28:12 -05:00
|
|
|
if(m_mode=="ISCAT") {
|
2017-07-30 21:28:25 -04:00
|
|
|
geniscat_(message, msgsent, const_cast<int *> (itone), 28, 28);
|
2015-11-17 20:28:12 -05:00
|
|
|
msgsent[28]=0;
|
|
|
|
} else {
|
|
|
|
if(m_modeTx=="JT4") gen4_(message, &ichk , msgsent, const_cast<int *> (itone),
|
2017-07-30 21:28:25 -04:00
|
|
|
&m_currentMessageType, 22, 22);
|
2015-11-17 20:28:12 -05:00
|
|
|
if(m_modeTx=="JT9") gen9_(message, &ichk, msgsent, const_cast<int *> (itone),
|
2017-07-30 21:28:25 -04:00
|
|
|
&m_currentMessageType, 22, 22);
|
2015-11-17 20:28:12 -05:00
|
|
|
if(m_modeTx=="JT65") gen65_(message, &ichk, msgsent, const_cast<int *> (itone),
|
2017-07-30 21:28:25 -04:00
|
|
|
&m_currentMessageType, 22, 22);
|
2017-07-08 14:44:42 -04:00
|
|
|
if(m_modeTx=="QRA64") genqra64_(message, &ichk, msgsent, const_cast<int *> (itone),
|
2017-07-30 21:28:25 -04:00
|
|
|
&m_currentMessageType, 22, 22);
|
2017-07-08 14:44:42 -04:00
|
|
|
if(m_modeTx=="WSPR") genwspr_(message, msgsent, const_cast<int *> (itone),
|
2017-07-30 21:28:25 -04:00
|
|
|
22, 22);
|
2020-06-19 15:02:05 -04:00
|
|
|
if(m_modeTx=="MSK144" or m_modeTx=="FT8" or m_modeTx=="FT4"
|
2020-07-23 13:51:05 -04:00
|
|
|
or m_modeTx=="FST4" or m_modeTx=="FST4W") {
|
2017-11-27 16:23:24 -05:00
|
|
|
char MyCall[6];
|
2016-09-30 11:55:53 -04:00
|
|
|
char MyGrid[6];
|
2019-07-02 20:51:40 -04:00
|
|
|
::memcpy(MyCall, (m_config.my_callsign()+" ").toLatin1(), sizeof MyCall);
|
|
|
|
::memcpy(MyGrid, (m_config.my_grid()+" ").toLatin1(), sizeof MyGrid);
|
2017-07-28 11:50:13 -04:00
|
|
|
if(m_modeTx=="MSK144") {
|
2018-07-11 14:42:48 -04:00
|
|
|
genmsk_128_90_(message, &ichk, msgsent, const_cast<int *> (itone),
|
|
|
|
&m_currentMessageType, 37, 37);
|
2017-07-28 11:50:13 -04:00
|
|
|
if(m_restart) {
|
|
|
|
int nsym=144;
|
|
|
|
if(itone[40]==-40) nsym=40;
|
|
|
|
m_modulator->set_nsym(nsym);
|
|
|
|
}
|
|
|
|
}
|
2020-07-25 16:02:42 -04:00
|
|
|
|
2020-07-27 09:55:49 -04:00
|
|
|
if(m_modeTx=="FT8") {
|
2020-09-05 15:11:32 -04:00
|
|
|
if(SpecOp::FOX==m_config.special_op_id() and ui->tabWidget->currentIndex()==1) {
|
2017-12-06 12:05:48 -05:00
|
|
|
foxTxSequencer();
|
2017-11-16 16:32:07 -05:00
|
|
|
} else {
|
2018-11-05 11:59:48 -05:00
|
|
|
int i3=0;
|
|
|
|
int n3=0;
|
2018-07-12 08:58:04 -04:00
|
|
|
char ft8msgbits[77];
|
2018-11-05 11:59:48 -05:00
|
|
|
genft8_(message, &i3, &n3, msgsent, const_cast<char *> (ft8msgbits),
|
|
|
|
const_cast<int *> (itone), 37, 37);
|
2019-03-29 16:30:50 -04:00
|
|
|
int nsym=79;
|
|
|
|
int nsps=4*1920;
|
|
|
|
float fsample=48000.0;
|
2019-04-12 18:11:26 -04:00
|
|
|
float bt=2.0;
|
2019-03-29 16:30:50 -04:00
|
|
|
float f0=ui->TxFreqSpinBox->value() - m_XIT;
|
|
|
|
int icmplx=0;
|
|
|
|
int nwave=nsym*nsps;
|
2019-04-12 18:11:26 -04:00
|
|
|
gen_ft8wave_(const_cast<int *>(itone),&nsym,&nsps,&bt,&fsample,&f0,foxcom_.wave,
|
2019-03-29 16:30:50 -04:00
|
|
|
foxcom_.wave,&icmplx,&nwave);
|
2018-10-30 17:06:01 -04:00
|
|
|
if(SpecOp::FOX == m_config.special_op_id()) {
|
2018-07-06 12:52:39 -04:00
|
|
|
//Fox must generate the full Tx waveform, not just an itone[] array.
|
2018-05-11 09:01:50 -04:00
|
|
|
QString fm = QString::fromStdString(message).trimmed();
|
|
|
|
foxGenWaveform(0,fm);
|
|
|
|
foxcom_.nslots=1;
|
|
|
|
foxcom_.nfreq=ui->TxFreqSpinBox->value();
|
|
|
|
if(m_config.split_mode()) foxcom_.nfreq = foxcom_.nfreq - m_XIT; //Fox Tx freq
|
|
|
|
QString foxCall=m_config.my_callsign() + " ";
|
2019-07-02 20:51:40 -04:00
|
|
|
::memcpy(foxcom_.mycall, foxCall.toLatin1(), sizeof foxcom_.mycall); //Copy Fox callsign into foxcom_
|
2018-05-11 09:01:50 -04:00
|
|
|
foxgen_();
|
|
|
|
}
|
2017-11-16 16:32:07 -05:00
|
|
|
}
|
2016-07-13 15:17:47 -04:00
|
|
|
}
|
2019-04-01 14:23:10 -04:00
|
|
|
if(m_modeTx=="FT4") {
|
|
|
|
int ichk=0;
|
2019-04-18 15:16:39 -04:00
|
|
|
char ft4msgbits[77];
|
|
|
|
genft4_(message, &ichk, msgsent, const_cast<char *> (ft4msgbits),
|
|
|
|
const_cast<int *>(itone), 37, 37);
|
2019-04-01 14:23:10 -04:00
|
|
|
int nsym=103;
|
2019-05-22 18:02:15 -04:00
|
|
|
int nsps=4*576;
|
2019-04-01 14:23:10 -04:00
|
|
|
float fsample=48000.0;
|
|
|
|
float f0=ui->TxFreqSpinBox->value() - m_XIT;
|
|
|
|
int nwave=(nsym+2)*nsps;
|
2019-04-18 15:15:24 -04:00
|
|
|
int icmplx=0;
|
|
|
|
gen_ft4wave_(const_cast<int *>(itone),&nsym,&nsps,&fsample,&f0,foxcom_.wave,
|
|
|
|
foxcom_.wave,&icmplx,&nwave);
|
2019-04-01 14:23:10 -04:00
|
|
|
}
|
2020-07-23 13:51:05 -04:00
|
|
|
if(m_modeTx=="FST4" or m_modeTx=="FST4W") {
|
2020-06-19 15:02:05 -04:00
|
|
|
int ichk=0;
|
|
|
|
int iwspr=0;
|
2020-07-23 13:51:05 -04:00
|
|
|
char fst4msgbits[101];
|
2020-07-02 14:57:46 -04:00
|
|
|
QString wmsg;
|
2020-07-23 13:51:05 -04:00
|
|
|
if(m_mode=="FST4W") {
|
2020-07-17 14:09:21 -04:00
|
|
|
iwspr = 1;
|
2020-07-02 14:57:46 -04:00
|
|
|
wmsg=WSPR_message();
|
|
|
|
ba=wmsg.toLatin1();
|
2020-07-01 12:01:47 -04:00
|
|
|
ba2msg(ba,message);
|
|
|
|
}
|
2020-07-23 13:51:05 -04:00
|
|
|
genfst4_(message,&ichk,msgsent,const_cast<char *> (fst4msgbits),
|
2020-06-19 15:02:05 -04:00
|
|
|
const_cast<int *>(itone), &iwspr, 37, 37);
|
2020-09-30 10:01:57 -04:00
|
|
|
int hmod=1;
|
|
|
|
if(m_config.x2ToneSpacing()) hmod=2;
|
|
|
|
if(m_config.x4ToneSpacing()) hmod=4;
|
2020-06-29 17:33:46 -04:00
|
|
|
int nsps=720;
|
2020-06-19 15:02:05 -04:00
|
|
|
if(m_TRperiod==30) nsps=1680;
|
2020-06-25 17:18:48 -04:00
|
|
|
if(m_TRperiod==60) nsps=3888;
|
|
|
|
if(m_TRperiod==120) nsps=8200;
|
2020-06-27 16:24:11 -04:00
|
|
|
if(m_TRperiod==300) nsps=21504;
|
2020-07-17 18:44:14 -04:00
|
|
|
if(m_TRperiod==900) nsps=66560;
|
|
|
|
if(m_TRperiod==1800) nsps=134400;
|
2020-06-19 15:02:05 -04:00
|
|
|
nsps=4*nsps; //48000 Hz sampling
|
2020-06-27 14:13:59 -04:00
|
|
|
int nsym=160;
|
2020-06-19 15:02:05 -04:00
|
|
|
float fsample=48000.0;
|
|
|
|
float dfreq=hmod*fsample/nsps;
|
|
|
|
float f0=ui->TxFreqSpinBox->value() - m_XIT + 1.5*dfreq;
|
2020-09-30 09:37:15 -04:00
|
|
|
if(m_mode=="FST4W") f0=ui->WSPRfreqSpinBox->value() - m_XIT + 1.5*dfreq;
|
2020-06-27 16:24:11 -04:00
|
|
|
int nwave=(nsym+2)*nsps;
|
2020-06-19 15:02:05 -04:00
|
|
|
int icmplx=0;
|
2020-07-23 13:51:05 -04:00
|
|
|
gen_fst4wave_(const_cast<int *>(itone),&nsym,&nsps,&nwave,
|
2020-06-19 15:02:05 -04:00
|
|
|
&fsample,&hmod,&f0,&icmplx,foxcom_.wave,foxcom_.wave);
|
2020-07-27 09:55:49 -04:00
|
|
|
|
|
|
|
QString t = QString::fromStdString(message).trimmed();
|
2020-06-16 16:59:40 -04:00
|
|
|
}
|
2019-04-01 14:23:10 -04:00
|
|
|
|
2018-10-30 17:06:01 -04:00
|
|
|
if(SpecOp::EU_VHF==m_config.special_op_id()) {
|
2018-07-31 15:42:51 -04:00
|
|
|
if(m_ntx==2) m_xSent=ui->tx2->text().right(13);
|
|
|
|
if(m_ntx==3) m_xSent=ui->tx3->text().right(13);
|
|
|
|
}
|
2018-08-01 11:25:24 -04:00
|
|
|
|
2018-10-30 17:06:01 -04:00
|
|
|
if(SpecOp::FIELD_DAY==m_config.special_op_id() or SpecOp::RTTY==m_config.special_op_id()) {
|
2018-08-01 11:25:24 -04:00
|
|
|
if(m_ntx==2 or m_ntx==3) {
|
2020-06-13 11:04:41 -04:00
|
|
|
QStringList t=ui->tx2->text().split(' ', SkipEmptyParts);
|
2018-08-01 11:25:24 -04:00
|
|
|
int n=t.size();
|
|
|
|
m_xSent=t.at(n-2) + " " + t.at(n-1);
|
|
|
|
}
|
|
|
|
}
|
2016-07-13 15:17:47 -04:00
|
|
|
}
|
2018-11-05 11:59:48 -05:00
|
|
|
msgsent[37]=0;
|
2015-11-17 20:28:12 -05:00
|
|
|
}
|
2015-04-22 13:48:03 -04:00
|
|
|
}
|
2015-05-27 09:08:28 -04:00
|
|
|
|
2020-12-20 20:31:57 -05:00
|
|
|
{
|
|
|
|
auto temp = m_currentMessage;
|
|
|
|
m_currentMessage = QString::fromLatin1(msgsent);
|
|
|
|
if (m_currentMessage != temp) // check if tx message changed
|
|
|
|
{
|
|
|
|
statusUpdate ();
|
|
|
|
}
|
|
|
|
}
|
2021-03-02 14:23:17 -05:00
|
|
|
m_bCallingCQ = 6 == m_ntx
|
2017-07-25 12:51:42 -04:00
|
|
|
|| m_currentMessage.contains (QRegularExpression {"^(CQ|QRZ) "});
|
2019-01-28 10:19:46 -05:00
|
|
|
if(m_mode=="FT8" or m_mode=="FT4") {
|
2017-07-25 21:39:11 -04:00
|
|
|
if(m_bCallingCQ && ui->cbFirst->isVisible () && ui->cbFirst->isChecked ()) {
|
2017-07-20 11:15:00 -04:00
|
|
|
ui->cbFirst->setStyleSheet("QCheckBox{color:red}");
|
|
|
|
} else {
|
|
|
|
ui->cbFirst->setStyleSheet("");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-07-13 15:17:47 -04:00
|
|
|
if (m_tune) {
|
|
|
|
m_currentMessage = "TUNE";
|
|
|
|
m_currentMessageType = -1;
|
|
|
|
}
|
2012-05-22 13:09:48 -04:00
|
|
|
if(m_restart) {
|
2019-01-03 12:15:48 -05:00
|
|
|
write_all("Tx",m_currentMessage);
|
2017-12-07 12:09:03 -05:00
|
|
|
if (m_config.TX_messages ()) {
|
|
|
|
ui->decodedTextBrowser2->displayTransmittedText(m_currentMessage,m_modeTx,
|
2020-06-20 13:47:32 -04:00
|
|
|
ui->TxFreqSpinBox->value(),m_bFastMode,m_TRperiod);
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
}
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
2013-04-12 13:57:20 -04:00
|
|
|
|
2015-03-14 15:13:18 -04:00
|
|
|
auto t2 = QDateTime::currentDateTimeUtc ().toString ("hhmm");
|
|
|
|
icw[0] = 0;
|
2020-06-13 11:04:41 -04:00
|
|
|
auto msg_parts = m_currentMessage.split (' ', SkipEmptyParts);
|
2017-07-09 16:45:45 -04:00
|
|
|
if (msg_parts.size () > 2) {
|
|
|
|
// clean up short code forms
|
|
|
|
msg_parts[0].remove (QChar {'<'});
|
2018-09-18 14:52:21 -04:00
|
|
|
msg_parts[0].remove (QChar {'>'});
|
|
|
|
msg_parts[1].remove (QChar {'<'});
|
2017-07-09 16:45:45 -04:00
|
|
|
msg_parts[1].remove (QChar {'>'});
|
|
|
|
}
|
2021-03-01 17:20:30 -05:00
|
|
|
auto is_73 = message_is_73 (m_currentMessageType, msg_parts);
|
2015-03-17 10:59:19 -04:00
|
|
|
m_sentFirst73 = is_73
|
2020-06-13 11:04:41 -04:00
|
|
|
&& !message_is_73 (m_lastMessageType, m_lastMessageSent.split (' ', SkipEmptyParts));
|
2021-03-01 17:20:30 -05:00
|
|
|
if (m_sentFirst73 || (is_73 && CALLING == m_QSOProgress)) {
|
2015-11-17 20:28:12 -05:00
|
|
|
m_qsoStop=t2;
|
2016-10-13 12:19:24 -04:00
|
|
|
if(m_config.id_after_73 ()) {
|
2015-11-17 20:28:12 -05:00
|
|
|
icw[0] = m_ncw;
|
2015-03-17 10:59:19 -04:00
|
|
|
}
|
2021-03-01 17:20:30 -05:00
|
|
|
if((m_config.prompt_to_log() or m_config.autoLog()) && !m_tune && CALLING != m_QSOProgress) logQSOTimer.start(0);
|
2015-11-17 20:28:12 -05:00
|
|
|
}
|
2018-02-20 16:30:31 -05:00
|
|
|
|
2019-04-01 14:23:10 -04:00
|
|
|
bool b=(m_mode=="FT8" or m_mode=="FT4") and ui->cbAutoSeq->isChecked();
|
2017-07-10 09:20:33 -04:00
|
|
|
if(is_73 and (m_config.disable_TX_on_73() or b)) {
|
2018-11-05 14:33:26 -05:00
|
|
|
m_nextCall=""; //### Temporary: disable use of "TU;" messages;
|
2018-10-04 14:50:02 -04:00
|
|
|
if(m_nextCall!="") {
|
2018-10-08 09:08:52 -04:00
|
|
|
useNextCall();
|
2018-10-04 14:50:02 -04:00
|
|
|
} else {
|
|
|
|
auto_tx_mode (false);
|
|
|
|
if(b) {
|
|
|
|
m_ntx=6;
|
|
|
|
ui->txrb6->setChecked(true);
|
|
|
|
m_QSOProgress = CALLING;
|
|
|
|
}
|
2017-07-10 09:20:33 -04:00
|
|
|
}
|
2015-11-17 20:28:12 -05:00
|
|
|
}
|
2013-03-24 21:24:47 -04:00
|
|
|
|
2016-10-13 12:19:24 -04:00
|
|
|
if(m_config.id_interval () >0) {
|
2013-03-24 21:24:47 -04:00
|
|
|
int nmin=(m_sec0-m_secID)/60;
|
2016-11-02 08:38:18 -04:00
|
|
|
if(m_sec0<m_secID) nmin=m_config.id_interval();
|
|
|
|
if(nmin >= m_config.id_interval()) {
|
2013-03-24 21:24:47 -04:00
|
|
|
icw[0]=m_ncw;
|
|
|
|
m_secID=m_sec0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-07-09 16:45:45 -04:00
|
|
|
if ((m_currentMessageType < 6 || 7 == m_currentMessageType)
|
|
|
|
&& msg_parts.length() >= 3
|
2015-06-05 20:02:02 -04:00
|
|
|
&& (msg_parts[1] == m_config.my_callsign () ||
|
|
|
|
msg_parts[1] == m_baseCall))
|
|
|
|
{
|
|
|
|
int i1;
|
|
|
|
bool ok;
|
|
|
|
i1 = msg_parts[2].toInt(&ok);
|
|
|
|
if(ok and i1>=-50 and i1<50)
|
2015-03-14 15:13:18 -04:00
|
|
|
{
|
2015-06-05 20:02:02 -04:00
|
|
|
m_rptSent = msg_parts[2];
|
|
|
|
m_qsoStart = t2;
|
|
|
|
} else {
|
|
|
|
if (msg_parts[2].mid (0, 1) == "R")
|
|
|
|
{
|
|
|
|
i1 = msg_parts[2].mid (1).toInt (&ok);
|
|
|
|
if (ok and i1 >= -50 and i1 < 50)
|
2015-03-14 15:13:18 -04:00
|
|
|
{
|
2015-06-05 20:02:02 -04:00
|
|
|
m_rptSent = msg_parts[2].mid (1);
|
2015-03-14 15:13:18 -04:00
|
|
|
m_qsoStart = t2;
|
2013-03-18 12:14:18 -04:00
|
|
|
}
|
2015-06-05 20:02:02 -04:00
|
|
|
}
|
2013-03-18 12:14:18 -04:00
|
|
|
}
|
2015-06-05 20:02:02 -04:00
|
|
|
}
|
2012-05-22 13:09:48 -04:00
|
|
|
m_restart=false;
|
2015-06-05 20:02:02 -04:00
|
|
|
//----------------------------------------------------------------------
|
2015-05-27 09:08:28 -04:00
|
|
|
} else {
|
2020-09-05 15:11:32 -04:00
|
|
|
if (!m_auto && m_sentFirst73) {
|
2015-06-05 20:02:02 -04:00
|
|
|
m_sentFirst73 = false;
|
2015-03-14 15:13:18 -04:00
|
|
|
}
|
2015-06-05 20:02:02 -04:00
|
|
|
}
|
2019-01-18 16:22:25 -05:00
|
|
|
if (g_iptt == 1 && m_iptt0 == 0) {
|
|
|
|
auto const& current_message = QString::fromLatin1 (msgsent);
|
2020-07-23 13:51:05 -04:00
|
|
|
if(m_config.watchdog () && m_mode!="WSPR" && m_mode!="FST4W"
|
2019-01-18 16:22:25 -05:00
|
|
|
&& current_message != m_msgSent0) {
|
|
|
|
tx_watchdog (false); // in case we are auto sequencing
|
|
|
|
m_msgSent0 = current_message;
|
|
|
|
}
|
2016-06-30 12:25:47 -04:00
|
|
|
|
2020-07-27 14:49:39 -04:00
|
|
|
if (m_mode != "FST4W" && m_mode != "WSPR")
|
|
|
|
{
|
|
|
|
if(!m_tune) write_all("Tx",m_currentMessage);
|
|
|
|
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,m_TRperiod);
|
|
|
|
}
|
2015-05-27 09:08:28 -04:00
|
|
|
}
|
2014-09-24 13:25:19 -04:00
|
|
|
|
2019-03-07 11:21:17 -05:00
|
|
|
switch (m_ntx)
|
|
|
|
{
|
|
|
|
case 1: m_QSOProgress = REPLYING; break;
|
|
|
|
case 2: m_QSOProgress = REPORT; break;
|
|
|
|
case 3: m_QSOProgress = ROGER_REPORT; break;
|
|
|
|
case 4: m_QSOProgress = ROGERS; break;
|
|
|
|
case 5: m_QSOProgress = SIGNOFF; break;
|
|
|
|
case 6: m_QSOProgress = CALLING; break;
|
|
|
|
default: break; // determined elsewhere
|
2013-04-27 09:11:29 -04:00
|
|
|
}
|
2019-03-07 11:21:17 -05:00
|
|
|
m_transmitting = true;
|
|
|
|
transmitDisplay (true);
|
|
|
|
statusUpdate ();
|
|
|
|
}
|
2020-11-06 13:28:59 -05:00
|
|
|
if(!m_btxok && m_btxok0 && g_iptt==1)
|
|
|
|
{
|
|
|
|
stopTx();
|
|
|
|
if ("1" == m_env.value ("WSJT_TX_BOTH", "0"))
|
|
|
|
{
|
|
|
|
m_txFirst = !m_txFirst;
|
|
|
|
ui->txFirstCheckBox->setChecked (m_txFirst);
|
|
|
|
}
|
|
|
|
}
|
2013-03-24 13:29:26 -04:00
|
|
|
|
2012-05-22 13:09:48 -04:00
|
|
|
if(m_startAnother) {
|
2016-10-19 14:09:27 -04:00
|
|
|
if(m_mode=="MSK144") {
|
|
|
|
m_wait++;
|
|
|
|
}
|
|
|
|
if(m_mode!="MSK144" or m_wait>=4) {
|
|
|
|
m_wait=0;
|
|
|
|
m_startAnother=false;
|
|
|
|
on_actionOpen_next_in_directory_triggered();
|
|
|
|
}
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
|
|
|
|
2019-01-28 10:19:46 -05:00
|
|
|
if(m_mode=="FT8" or m_mode=="MSK144" or m_mode=="FT4") {
|
2018-10-30 17:06:01 -04:00
|
|
|
if(ui->txrb1->isEnabled() and
|
|
|
|
(SpecOp::NA_VHF==m_config.special_op_id() or
|
|
|
|
SpecOp::FIELD_DAY==m_config.special_op_id() or
|
2020-01-24 12:26:36 -05:00
|
|
|
SpecOp::RTTY==m_config.special_op_id() or
|
|
|
|
SpecOp::WW_DIGI==m_config.special_op_id()) ) {
|
2018-08-01 13:08:16 -04:00
|
|
|
//We're in a contest-like mode other than EU_VHF: start QSO with Tx2.
|
|
|
|
ui->tx1->setEnabled(false);
|
2019-03-28 10:41:56 -04:00
|
|
|
ui->txb1->setEnabled(false);
|
2018-08-01 13:08:16 -04:00
|
|
|
}
|
2018-10-30 17:06:01 -04:00
|
|
|
if(!ui->tx1->isEnabled() and SpecOp::EU_VHF==m_config.special_op_id()) {
|
2018-08-01 13:08:16 -04:00
|
|
|
//We're in EU_VHF mode: start QSO with Tx1.
|
|
|
|
ui->tx1->setEnabled(true);
|
2019-03-28 10:41:56 -04:00
|
|
|
ui->txb1->setEnabled(true);
|
2018-08-01 13:08:16 -04:00
|
|
|
}
|
2018-07-31 11:10:57 -04:00
|
|
|
}
|
|
|
|
|
2020-09-10 13:33:33 -04:00
|
|
|
//Once per second (onesec)
|
2015-06-13 10:24:54 -04:00
|
|
|
if(nsec != m_sec0) {
|
2020-07-21 14:56:20 -04:00
|
|
|
// qDebug() << "AAA" << nsec;
|
2020-09-18 13:33:30 -04:00
|
|
|
if(m_mode=="FST4") chk_FST4_freq_range();
|
2018-08-03 16:31:19 -04:00
|
|
|
m_currentBand=m_config.bands()->find(m_freqNominal);
|
2018-10-30 17:06:01 -04:00
|
|
|
if( SpecOp::HOUND == m_config.special_op_id() ) {
|
2018-02-05 14:58:03 -05:00
|
|
|
qint32 tHound=QDateTime::currentMSecsSinceEpoch()/1000 - m_tAutoOn;
|
2018-02-05 15:13:16 -05:00
|
|
|
//To keep calling Fox, Hound must reactivate Enable Tx at least once every 2 minutes
|
2018-02-07 11:56:38 -05:00
|
|
|
if(tHound >= 120 and m_ntx==1) auto_tx_mode(false);
|
2018-02-05 14:58:03 -05:00
|
|
|
}
|
2019-01-24 17:29:03 -05:00
|
|
|
|
2019-04-01 14:23:10 -04:00
|
|
|
progressBar.setVisible(true);
|
2019-05-22 12:44:28 -04:00
|
|
|
progressBar.setFormat ("%v/%m");
|
2015-11-17 20:28:12 -05:00
|
|
|
if(m_auto and m_mode=="Echo" and m_bEchoTxOK) {
|
2019-05-22 12:44:28 -04:00
|
|
|
progressBar.setMaximum(3);
|
2016-07-01 20:25:38 -04:00
|
|
|
progressBar.setValue(int(m_s6));
|
2015-11-17 20:28:12 -05:00
|
|
|
}
|
2019-04-01 14:23:10 -04:00
|
|
|
if(m_mode!="Echo") {
|
2015-11-17 20:28:12 -05:00
|
|
|
if(m_monitoring or m_transmitting) {
|
2016-07-01 20:25:38 -04:00
|
|
|
progressBar.setMaximum(m_TRperiod);
|
2015-11-17 20:28:12 -05:00
|
|
|
int isec=int(fmod(tsec,m_TRperiod));
|
2019-05-22 12:44:28 -04:00
|
|
|
if(m_TRperiod-int(m_TRperiod)>0.0) {
|
|
|
|
QString progBarLabel;
|
2020-05-06 21:56:57 -04:00
|
|
|
progBarLabel = progBarLabel.asprintf("%d/%3.1f",isec,m_TRperiod);
|
2019-05-22 12:44:28 -04:00
|
|
|
progressBar.setFormat (progBarLabel);
|
|
|
|
}
|
2016-07-01 20:25:38 -04:00
|
|
|
progressBar.setValue(isec);
|
2015-11-17 20:28:12 -05:00
|
|
|
} else {
|
2016-07-01 20:25:38 -04:00
|
|
|
progressBar.setValue(0);
|
2015-11-17 20:28:12 -05:00
|
|
|
}
|
2015-06-05 20:02:02 -04:00
|
|
|
}
|
2015-06-11 20:26:44 -04:00
|
|
|
|
2016-04-06 13:11:58 -04:00
|
|
|
astroUpdate ();
|
|
|
|
|
2012-05-22 13:09:48 -04:00
|
|
|
if(m_transmitting) {
|
2018-07-09 20:13:56 -04:00
|
|
|
char s[42];
|
2020-09-05 15:11:32 -04:00
|
|
|
if(SpecOp::FOX==m_config.special_op_id() and ui->tabWidget->currentIndex()==1) {
|
2018-02-21 10:48:56 -05:00
|
|
|
sprintf(s,"Tx: %d Slots",foxcom_.nslots);
|
2017-12-19 14:26:39 -05:00
|
|
|
} else {
|
|
|
|
sprintf(s,"Tx: %s",msgsent);
|
|
|
|
}
|
2016-04-30 20:40:51 -04:00
|
|
|
m_nsendingsh=0;
|
|
|
|
if(s[4]==64) m_nsendingsh=1;
|
|
|
|
if(m_nsendingsh==1 or m_currentMessageType==7) {
|
2020-08-08 08:20:52 -04:00
|
|
|
tx_status_label.setStyleSheet("QLabel{color: #000000; background-color: #66ffff}");
|
2016-04-30 20:40:51 -04:00
|
|
|
} else if(m_nsendingsh==-1 or m_currentMessageType==6) {
|
2020-08-08 08:20:52 -04:00
|
|
|
tx_status_label.setStyleSheet("QLabel{color: #000000; background-color: #ffccff}");
|
2012-05-22 13:09:48 -04:00
|
|
|
} else {
|
2020-08-08 08:20:52 -04:00
|
|
|
tx_status_label.setStyleSheet("QLabel{color: #000000; background-color: #ffff33}");
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
2013-04-17 10:53:58 -04:00
|
|
|
if(m_tune) {
|
2016-07-01 20:25:38 -04:00
|
|
|
tx_status_label.setText("Tx: TUNE");
|
2013-04-17 10:53:58 -04:00
|
|
|
} else {
|
2015-06-05 20:02:02 -04:00
|
|
|
if(m_mode=="Echo") {
|
2016-07-01 20:25:38 -04:00
|
|
|
tx_status_label.setText("Tx: ECHO");
|
2015-06-05 20:02:02 -04:00
|
|
|
} else {
|
2018-02-20 15:09:44 -05:00
|
|
|
s[40]=0;
|
2017-09-25 13:02:52 -04:00
|
|
|
QString t{QString::fromLatin1(s)};
|
2020-09-05 15:11:32 -04:00
|
|
|
if(SpecOp::FOX==m_config.special_op_id() and ui->tabWidget->currentIndex()==1 and foxcom_.nslots==1) {
|
2018-02-21 10:48:56 -05:00
|
|
|
t=m_fm1.trimmed();
|
|
|
|
}
|
2019-01-28 10:19:46 -05:00
|
|
|
if(m_mode=="FT4") t="Tx: "+ m_currentMessage;
|
2018-02-20 16:30:31 -05:00
|
|
|
tx_status_label.setText(t.trimmed());
|
2015-06-05 20:02:02 -04:00
|
|
|
}
|
2013-04-17 10:53:58 -04:00
|
|
|
}
|
2012-05-22 13:09:48 -04:00
|
|
|
} else if(m_monitoring) {
|
2016-07-09 14:35:25 -04:00
|
|
|
if (!m_tx_watchdog) {
|
2020-08-08 08:20:52 -04:00
|
|
|
tx_status_label.setStyleSheet("QLabel{color: #000000; background-color: #00ff00}");
|
2020-05-19 07:15:58 -04:00
|
|
|
auto t = tr ("Receiving");
|
2016-10-12 14:21:45 -04:00
|
|
|
if(m_mode=="MSK144") {
|
2016-09-29 09:29:20 -04:00
|
|
|
int npct=int(100.0*m_fCPUmskrtd/0.298667);
|
2020-08-08 08:20:52 -04:00
|
|
|
if(npct>90) tx_status_label.setStyleSheet("QLabel{color: #000000; background-color: #ff0000}");
|
2020-05-19 07:15:58 -04:00
|
|
|
t += QString {" %1%"}.arg (npct, 2);
|
2016-09-29 09:29:20 -04:00
|
|
|
}
|
|
|
|
tx_status_label.setText (t);
|
2016-07-01 20:25:38 -04:00
|
|
|
}
|
2015-05-27 09:08:28 -04:00
|
|
|
transmitDisplay(false);
|
2016-07-09 14:35:25 -04:00
|
|
|
} else if (!m_diskData && !m_tx_watchdog) {
|
2016-07-01 20:25:38 -04:00
|
|
|
tx_status_label.setStyleSheet("");
|
|
|
|
tx_status_label.setText("");
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
|
|
|
|
2016-04-06 13:11:58 -04:00
|
|
|
QDateTime t = QDateTime::currentDateTimeUtc();
|
2012-11-12 11:33:45 -05:00
|
|
|
QString utc = t.date().toString("yyyy MMM dd") + "\n " +
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
t.time().toString() + " ";
|
2012-05-22 13:09:48 -04:00
|
|
|
ui->labUTC->setText(utc);
|
2019-04-16 13:21:45 -04:00
|
|
|
if(m_bBestSPArmed and (m_dateTimeBestSP.secsTo(t) >= 120)) on_pbBestSP_clicked(); //BestSP timeout
|
|
|
|
if(!m_monitoring and !m_diskData) ui->signal_meter_widget->setValue(0,0);
|
2013-04-30 14:54:11 -04:00
|
|
|
m_sec0=nsec;
|
2016-04-06 13:11:58 -04:00
|
|
|
displayDialFrequency ();
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
2016-04-30 20:40:51 -04:00
|
|
|
m_iptt0=g_iptt;
|
|
|
|
m_btxok0=m_btxok;
|
2017-12-06 16:38:24 -05:00
|
|
|
} //End of guiUpdate
|
2012-05-22 13:09:48 -04:00
|
|
|
|
2018-10-08 09:08:52 -04:00
|
|
|
void MainWindow::useNextCall()
|
|
|
|
{
|
|
|
|
ui->dxCallEntry->setText(m_nextCall);
|
|
|
|
m_nextCall="";
|
|
|
|
ui->labNextCall->setStyleSheet("");
|
|
|
|
ui->labNextCall->setText("");
|
|
|
|
if(m_nextGrid.contains(grid_regexp)) {
|
|
|
|
ui->dxGridEntry->setText(m_nextGrid);
|
|
|
|
m_ntx=2;
|
|
|
|
ui->txrb2->setChecked(true);
|
|
|
|
} else {
|
|
|
|
m_ntx=3;
|
|
|
|
ui->txrb3->setChecked(true);
|
|
|
|
}
|
|
|
|
genStdMsgs(m_nextRpt);
|
|
|
|
}
|
2013-04-12 13:57:20 -04:00
|
|
|
|
2013-03-24 13:29:26 -04:00
|
|
|
void MainWindow::startTx2()
|
|
|
|
{
|
2015-07-13 07:00:55 -04:00
|
|
|
if (!m_modulator->isActive ()) { // TODO - not thread safe
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
double fSpread=0.0;
|
2014-03-05 13:20:40 -05:00
|
|
|
double snr=99.0;
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
QString t=ui->tx5->currentText();
|
|
|
|
if(t.mid(0,1)=="#") fSpread=t.mid(1,5).toDouble();
|
2015-07-13 07:00:55 -04:00
|
|
|
m_modulator->setSpread(fSpread); // TODO - not thread safe
|
2014-03-05 13:20:40 -05:00
|
|
|
t=ui->tx6->text();
|
|
|
|
if(t.mid(0,1)=="#") snr=t.mid(1,5).toDouble();
|
2013-04-17 10:53:58 -04:00
|
|
|
if(snr>0.0 or snr < -50.0) snr=99.0;
|
2019-05-24 08:31:56 -04:00
|
|
|
if((m_ntx==6 or m_ntx==7) and m_config.force_call_1st()) {
|
|
|
|
ui->cbAutoSeq->setChecked(true);
|
|
|
|
ui->cbFirst->setChecked(true);
|
|
|
|
}
|
2013-08-05 09:57:55 -04:00
|
|
|
transmit (snr);
|
2017-03-06 09:34:25 -05:00
|
|
|
ui->signal_meter_widget->setValue(0,0);
|
2015-06-05 20:02:02 -04:00
|
|
|
if(m_mode=="Echo" and !m_tune) m_bTransmittedEcho=true;
|
|
|
|
|
2020-07-23 13:51:05 -04:00
|
|
|
if((m_mode=="WSPR" or m_mode=="FST4W") and !m_tune) {
|
2015-06-04 07:32:25 -04:00
|
|
|
if (m_config.TX_messages ()) {
|
|
|
|
t = " Transmitting " + m_mode + " ----------------------- " +
|
2016-04-06 13:11:58 -04:00
|
|
|
m_config.bands ()->find (m_freqNominal);
|
2020-07-27 14:51:56 -04:00
|
|
|
t=beacon_start_time (m_TRperiod / 2) + ' ' + t.rightJustified (66, '-');
|
2015-06-13 10:24:54 -04:00
|
|
|
ui->decodedTextBrowser->appendText(t);
|
2015-06-04 07:32:25 -04:00
|
|
|
}
|
2019-01-03 12:15:48 -05:00
|
|
|
write_all("Tx",m_currentMessage);
|
2015-05-27 09:08:28 -04:00
|
|
|
}
|
2013-03-24 13:29:26 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void MainWindow::stopTx()
|
|
|
|
{
|
2013-08-07 19:09:13 -04:00
|
|
|
Q_EMIT endTransmitMessage ();
|
2014-04-11 18:50:44 -04:00
|
|
|
m_btxok = false;
|
2014-09-24 13:25:19 -04:00
|
|
|
m_transmitting = false;
|
2013-07-08 09:17:22 -04:00
|
|
|
g_iptt=0;
|
2016-07-09 14:35:25 -04:00
|
|
|
if (!m_tx_watchdog) {
|
2016-07-01 20:25:38 -04:00
|
|
|
tx_status_label.setStyleSheet("");
|
|
|
|
tx_status_label.setText("");
|
|
|
|
}
|
2016-09-06 19:18:48 -04:00
|
|
|
ptt0Timer.start(200); //end-of-transmission sequencer delay
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
monitor (true);
|
2016-05-24 06:08:35 -04:00
|
|
|
statusUpdate ();
|
2013-03-24 13:29:26 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void MainWindow::stopTx2()
|
|
|
|
{
|
2020-09-08 07:54:19 -04:00
|
|
|
m_config.transceiver_ptt (false); //Lower PTT
|
2016-11-26 20:34:43 -05:00
|
|
|
if (m_mode == "JT9" && m_bFast9
|
|
|
|
&& ui->cbAutoSeq->isVisible () && ui->cbAutoSeq->isChecked()
|
|
|
|
&& m_ntx == 5 && m_nTx73 >= 5) {
|
|
|
|
on_stopTxButton_clicked ();
|
|
|
|
m_nTx73 = 0;
|
2015-11-17 20:28:12 -05:00
|
|
|
}
|
2020-07-23 13:51:05 -04:00
|
|
|
if(((m_mode=="WSPR" or m_mode=="FST4W") and m_ntr==-1) and !m_tuneup) {
|
2015-06-01 20:23:17 -04:00
|
|
|
m_wideGraph->setWSPRtransmitted();
|
2015-06-06 09:40:10 -04:00
|
|
|
WSPR_scheduling ();
|
2015-05-27 09:08:28 -04:00
|
|
|
m_ntr=0;
|
|
|
|
}
|
2020-05-19 06:26:24 -04:00
|
|
|
last_tx_label.setText(tr ("Last Tx: %1").arg (m_currentMessage.trimmed()));
|
2013-03-24 13:29:26 -04:00
|
|
|
}
|
|
|
|
|
2012-05-22 13:09:48 -04:00
|
|
|
void MainWindow::ba2msg(QByteArray ba, char message[]) //ba2msg()
|
|
|
|
{
|
2012-11-16 11:42:28 -05:00
|
|
|
int iz=ba.length();
|
2018-07-06 12:52:39 -04:00
|
|
|
for(int i=0; i<37; i++) {
|
2012-11-29 14:01:48 -05:00
|
|
|
if(i<iz) {
|
2018-12-27 14:44:50 -05:00
|
|
|
if(int(ba[i])>=97 and int(ba[i])<=122) ba[i]=int(ba[i])-32;
|
2012-05-22 13:09:48 -04:00
|
|
|
message[i]=ba[i];
|
2012-11-29 14:01:48 -05:00
|
|
|
} else {
|
|
|
|
message[i]=32;
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
|
|
|
}
|
2018-07-06 12:52:39 -04:00
|
|
|
message[37]=0;
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void MainWindow::on_txFirstCheckBox_stateChanged(int nstate) //TxFirst
|
|
|
|
{
|
|
|
|
m_txFirst = (nstate==2);
|
|
|
|
}
|
|
|
|
|
2016-12-30 10:45:31 -05:00
|
|
|
void MainWindow::set_dateTimeQSO(int m_ntx)
|
|
|
|
{
|
|
|
|
// m_ntx = -1 resets to default time
|
|
|
|
// Our QSO start time can be fairly well determined from Tx 2 and Tx 3 -- the grid reports
|
|
|
|
// If we CQ'd and sending sigrpt then 2 minutes ago n=2
|
|
|
|
// If we're on msg 3 then 3 minutes ago n=3 -- might have sat on msg1 for a while
|
|
|
|
// If we've already set our time on just return.
|
|
|
|
// This should mean that Tx2 or Tx3 has been repeated so don't update the start time
|
|
|
|
// We reset it in several places
|
|
|
|
if (m_ntx == -1) { // we use a default date to detect change
|
2017-07-09 16:45:53 -04:00
|
|
|
m_dateTimeQSOOn = QDateTime {};
|
2016-12-30 10:45:31 -05:00
|
|
|
}
|
2017-07-09 16:45:53 -04:00
|
|
|
else if (m_dateTimeQSOOn.isValid ()) {
|
2016-12-30 10:45:31 -05:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
else { // we also take of m_TRperiod/2 to allow for late clicks
|
2017-07-09 16:45:53 -04:00
|
|
|
auto now = QDateTime::currentDateTimeUtc();
|
2019-05-22 12:44:28 -04:00
|
|
|
m_dateTimeQSOOn = now.addSecs (-(m_ntx - 2) * int(m_TRperiod) -
|
|
|
|
int(fmod(double(now.time().second()),m_TRperiod)));
|
2016-12-30 10:45:31 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-05-22 13:09:48 -04:00
|
|
|
void MainWindow::set_ntx(int n) //set_ntx()
|
|
|
|
{
|
|
|
|
m_ntx=n;
|
|
|
|
}
|
|
|
|
|
2017-07-25 21:39:23 -04:00
|
|
|
void MainWindow::on_txrb1_toggled (bool status)
|
2016-12-30 10:45:31 -05:00
|
|
|
{
|
2017-07-07 09:13:22 -04:00
|
|
|
if (status) {
|
2017-07-25 21:39:23 -04:00
|
|
|
if (ui->tx1->isEnabled ()) {
|
|
|
|
m_ntx = 1;
|
|
|
|
set_dateTimeQSO (-1); // we reset here as tx2/tx3 is used for start times
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
QTimer::singleShot (0, ui->txrb2, SLOT (click ()));
|
|
|
|
}
|
2017-07-07 09:13:22 -04:00
|
|
|
}
|
2016-12-30 10:45:31 -05:00
|
|
|
}
|
|
|
|
|
2020-11-12 08:30:48 -05:00
|
|
|
bool MainWindow::elide_tx1_not_allowed () const
|
2017-07-25 21:38:57 -04:00
|
|
|
{
|
2017-09-01 01:11:57 -04:00
|
|
|
auto const& my_callsign = m_config.my_callsign ();
|
2020-11-12 08:30:48 -05:00
|
|
|
return
|
|
|
|
(m_mode=="FT8" && SpecOp::HOUND == m_config.special_op_id())
|
|
|
|
|| ((m_mode.startsWith ("FT") || "MSK144" == m_mode || "Q65" == m_mode || "FST4" == m_mode)
|
|
|
|
&& Radio::is_77bit_nonstandard_callsign (my_callsign))
|
|
|
|
|| (my_callsign != m_baseCall && !shortList (my_callsign));
|
|
|
|
}
|
|
|
|
|
|
|
|
void MainWindow::on_txrb1_doubleClicked ()
|
|
|
|
{
|
|
|
|
ui->tx1->setEnabled (elide_tx1_not_allowed () || !ui->tx1->isEnabled ());
|
2017-07-25 21:39:23 -04:00
|
|
|
if (!ui->tx1->isEnabled ()) {
|
|
|
|
// leave time for clicks to complete before setting txrb2
|
|
|
|
QTimer::singleShot (500, ui->txrb2, SLOT (click ()));
|
|
|
|
}
|
2017-07-25 21:38:57 -04:00
|
|
|
}
|
|
|
|
|
2017-07-25 21:39:23 -04:00
|
|
|
void MainWindow::on_txrb2_toggled (bool status)
|
2016-12-30 10:45:31 -05:00
|
|
|
{
|
|
|
|
// Tx 2 means we already have CQ'd so good reference
|
2017-07-07 09:13:22 -04:00
|
|
|
if (status) {
|
2018-07-11 14:27:53 -04:00
|
|
|
m_ntx=2;
|
2017-07-25 21:39:23 -04:00
|
|
|
set_dateTimeQSO (m_ntx);
|
2017-07-07 09:13:22 -04:00
|
|
|
}
|
2016-12-30 10:45:31 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
void MainWindow::on_txrb3_toggled(bool status)
|
|
|
|
{
|
2018-07-27 16:08:05 -04:00
|
|
|
// Tx 3 means we should have already have done Tx 1 so good reference
|
2017-07-07 09:13:22 -04:00
|
|
|
if (status) {
|
|
|
|
m_ntx=3;
|
|
|
|
set_dateTimeQSO(m_ntx);
|
|
|
|
}
|
2016-12-30 10:45:31 -05:00
|
|
|
}
|
|
|
|
|
2017-07-25 21:39:23 -04:00
|
|
|
void MainWindow::on_txrb4_toggled (bool status)
|
2012-05-22 13:09:48 -04:00
|
|
|
{
|
2017-07-07 09:13:22 -04:00
|
|
|
if (status) {
|
|
|
|
m_ntx=4;
|
|
|
|
}
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
|
|
|
|
2017-07-25 21:39:23 -04:00
|
|
|
void MainWindow::on_txrb4_doubleClicked ()
|
2017-07-25 21:39:04 -04:00
|
|
|
{
|
2017-09-01 01:11:57 -04:00
|
|
|
// RR73 only allowed if not a type 2 compound callsign
|
|
|
|
auto const& my_callsign = m_config.my_callsign ();
|
|
|
|
auto is_compound = my_callsign != m_baseCall;
|
|
|
|
m_send_RR73 = !((is_compound && !shortList (my_callsign)) || m_send_RR73);
|
2020-03-19 16:20:42 -04:00
|
|
|
if(m_mode=="FT4") m_send_RR73=true;
|
2017-07-25 21:39:04 -04:00
|
|
|
genStdMsgs (m_rpt);
|
|
|
|
}
|
|
|
|
|
2017-07-25 21:39:23 -04:00
|
|
|
void MainWindow::on_txrb5_toggled (bool status)
|
2012-05-22 13:09:48 -04:00
|
|
|
{
|
2017-07-07 09:13:22 -04:00
|
|
|
if (status) {
|
2017-07-25 21:39:23 -04:00
|
|
|
m_ntx = 5;
|
2017-07-07 09:13:22 -04:00
|
|
|
}
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
|
|
|
|
2017-07-25 21:39:23 -04:00
|
|
|
void MainWindow::on_txrb5_doubleClicked ()
|
2017-07-24 15:27:23 -04:00
|
|
|
{
|
|
|
|
genStdMsgs (m_rpt, true);
|
|
|
|
}
|
|
|
|
|
2017-07-07 09:13:22 -04:00
|
|
|
void MainWindow::on_txrb6_toggled(bool status)
|
2012-05-22 13:09:48 -04:00
|
|
|
{
|
2017-07-07 09:13:22 -04:00
|
|
|
if (status) {
|
|
|
|
m_ntx=6;
|
2017-07-24 15:27:23 -04:00
|
|
|
if (ui->txrb6->text().contains (QRegularExpression {"^(CQ|QRZ) "})) set_dateTimeQSO(-1);
|
2017-07-07 09:13:22 -04:00
|
|
|
}
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
|
|
|
|
2017-07-07 09:13:22 -04:00
|
|
|
void MainWindow::on_txb1_clicked()
|
2012-05-22 13:09:48 -04:00
|
|
|
{
|
2017-07-25 21:38:57 -04:00
|
|
|
if (ui->tx1->isEnabled ()) {
|
2017-07-07 09:13:22 -04:00
|
|
|
m_ntx=1;
|
2017-07-24 15:27:23 -04:00
|
|
|
m_QSOProgress = REPLYING;
|
2017-07-07 09:13:22 -04:00
|
|
|
ui->txrb1->setChecked(true);
|
2019-04-02 13:16:06 -04:00
|
|
|
if(m_transmitting) m_restart=true;
|
2017-07-25 21:38:57 -04:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
on_txb2_clicked ();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void MainWindow::on_txb1_doubleClicked()
|
|
|
|
{
|
2020-11-12 08:30:48 -05:00
|
|
|
ui->tx1->setEnabled (elide_tx1_not_allowed () || !ui->tx1->isEnabled ());
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
|
|
|
|
2017-07-07 09:13:22 -04:00
|
|
|
void MainWindow::on_txb2_clicked()
|
2012-05-22 13:09:48 -04:00
|
|
|
{
|
2017-07-07 09:13:22 -04:00
|
|
|
m_ntx=2;
|
2017-07-24 15:27:23 -04:00
|
|
|
m_QSOProgress = REPORT;
|
2017-07-07 09:13:22 -04:00
|
|
|
ui->txrb2->setChecked(true);
|
2019-04-02 13:16:06 -04:00
|
|
|
if(m_transmitting) m_restart=true;
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
|
|
|
|
2017-07-07 09:13:22 -04:00
|
|
|
void MainWindow::on_txb3_clicked()
|
2012-05-22 13:09:48 -04:00
|
|
|
{
|
2017-07-07 09:13:22 -04:00
|
|
|
m_ntx=3;
|
2017-07-24 15:27:23 -04:00
|
|
|
m_QSOProgress = ROGER_REPORT;
|
2017-07-07 09:13:22 -04:00
|
|
|
ui->txrb3->setChecked(true);
|
2019-04-02 13:16:06 -04:00
|
|
|
if(m_transmitting) m_restart=true;
|
2017-07-07 09:13:22 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void MainWindow::on_txb4_clicked()
|
|
|
|
{
|
|
|
|
m_ntx=4;
|
2017-07-24 15:27:23 -04:00
|
|
|
m_QSOProgress = ROGERS;
|
2017-07-07 09:13:22 -04:00
|
|
|
ui->txrb4->setChecked(true);
|
2019-04-02 13:16:06 -04:00
|
|
|
if(m_transmitting) m_restart=true;
|
2017-07-07 09:13:22 -04:00
|
|
|
}
|
|
|
|
|
2017-07-25 21:39:04 -04:00
|
|
|
void MainWindow::on_txb4_doubleClicked()
|
|
|
|
{
|
2017-09-01 01:11:57 -04:00
|
|
|
// RR73 only allowed if not a type 2 compound callsign
|
|
|
|
auto const& my_callsign = m_config.my_callsign ();
|
|
|
|
auto is_compound = my_callsign != m_baseCall;
|
|
|
|
m_send_RR73 = !((is_compound && !shortList (my_callsign)) || m_send_RR73);
|
2019-03-13 13:59:41 -04:00
|
|
|
if(m_mode=="FT4") m_send_RR73=true;
|
2017-07-25 21:39:04 -04:00
|
|
|
genStdMsgs (m_rpt);
|
|
|
|
}
|
|
|
|
|
2017-07-07 09:13:22 -04:00
|
|
|
void MainWindow::on_txb5_clicked()
|
|
|
|
{
|
|
|
|
m_ntx=5;
|
2017-07-24 15:27:23 -04:00
|
|
|
m_QSOProgress = SIGNOFF;
|
2017-07-07 09:13:22 -04:00
|
|
|
ui->txrb5->setChecked(true);
|
2019-04-02 13:16:06 -04:00
|
|
|
if(m_transmitting) m_restart=true;
|
2017-07-07 09:13:22 -04:00
|
|
|
}
|
|
|
|
|
2017-07-24 15:27:23 -04:00
|
|
|
void MainWindow::on_txb5_doubleClicked()
|
|
|
|
{
|
|
|
|
genStdMsgs (m_rpt, true);
|
|
|
|
}
|
|
|
|
|
2017-07-07 09:13:22 -04:00
|
|
|
void MainWindow::on_txb6_clicked()
|
|
|
|
{
|
|
|
|
m_ntx=6;
|
2017-07-24 15:27:23 -04:00
|
|
|
m_QSOProgress = CALLING;
|
2017-07-09 16:45:53 -04:00
|
|
|
set_dateTimeQSO(-1);
|
2017-07-07 09:13:22 -04:00
|
|
|
ui->txrb6->setChecked(true);
|
2019-04-02 13:16:06 -04:00
|
|
|
if(m_transmitting) m_restart=true;
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
|
|
|
|
2017-10-13 18:34:36 -04:00
|
|
|
void MainWindow::doubleClickOnCall2(Qt::KeyboardModifiers modifiers)
|
2013-04-03 20:09:25 -04:00
|
|
|
{
|
2019-03-28 09:30:26 -04:00
|
|
|
//Confusing: come here after double-click on left text window, not right window.
|
2017-07-09 16:45:53 -04:00
|
|
|
set_dateTimeQSO(-1); // reset our QSO start time
|
2013-04-03 20:09:25 -04:00
|
|
|
m_decodedText2=true;
|
2018-02-06 16:49:57 -05:00
|
|
|
doubleClickOnCall(modifiers);
|
2013-04-03 20:09:25 -04:00
|
|
|
m_decodedText2=false;
|
|
|
|
}
|
2013-07-08 09:17:22 -04:00
|
|
|
|
2018-02-06 16:49:57 -05:00
|
|
|
void MainWindow::doubleClickOnCall(Qt::KeyboardModifiers modifiers)
|
2012-05-22 13:09:48 -04:00
|
|
|
{
|
2013-04-03 20:09:25 -04:00
|
|
|
QTextCursor cursor;
|
2020-08-15 14:31:18 -04:00
|
|
|
if(m_mode=="ISCAT" or m_mode=="FST4W") {
|
2016-07-03 16:31:19 -04:00
|
|
|
MessageBox::information_message (this,
|
2020-08-15 14:31:18 -04:00
|
|
|
"Double-click not available for ISCAT or FST4W mode");
|
2020-05-22 11:56:00 -04:00
|
|
|
return;
|
2016-07-03 16:31:19 -04:00
|
|
|
}
|
2015-04-22 13:48:03 -04:00
|
|
|
if(m_decodedText2) {
|
2018-02-06 15:27:00 -05:00
|
|
|
cursor=ui->decodedTextBrowser->textCursor();
|
2018-02-06 16:49:57 -05:00
|
|
|
} else {
|
|
|
|
cursor=ui->decodedTextBrowser2->textCursor();
|
2015-04-22 13:48:03 -04:00
|
|
|
}
|
2017-11-03 14:27:46 -04:00
|
|
|
|
|
|
|
if(modifiers==(Qt::ShiftModifier + Qt::ControlModifier + Qt::AltModifier)) {
|
2018-11-05 14:33:26 -05:00
|
|
|
//### What was the purpose of this ??? ###
|
2017-11-03 14:27:46 -04:00
|
|
|
cursor.setPosition(0);
|
|
|
|
} else {
|
|
|
|
cursor.setPosition(cursor.selectionStart());
|
|
|
|
}
|
|
|
|
|
2018-10-30 17:06:01 -04:00
|
|
|
if(SpecOp::FOX==m_config.special_op_id() and m_decodedText2) {
|
2017-12-06 12:05:48 -05:00
|
|
|
if(m_houndQueue.count()<10 and m_nSortedHounds>0) {
|
|
|
|
QString t=cursor.block().text();
|
|
|
|
selectHound(t);
|
2017-11-16 11:33:15 -05:00
|
|
|
}
|
2017-11-02 16:35:22 -04:00
|
|
|
return;
|
|
|
|
}
|
2020-07-24 07:46:43 -04:00
|
|
|
DecodedText message {cursor.block().text().trimmed().left(61).remove("TU; ")};
|
2018-02-06 16:49:57 -05:00
|
|
|
m_bDoubleClicked = true;
|
2017-10-13 18:34:36 -04:00
|
|
|
processMessage (message, modifiers);
|
2015-04-15 12:40:49 -04:00
|
|
|
}
|
2013-04-03 20:09:25 -04:00
|
|
|
|
2017-10-13 18:34:36 -04:00
|
|
|
void MainWindow::processMessage (DecodedText const& message, Qt::KeyboardModifiers modifiers)
|
2015-04-15 12:40:49 -04:00
|
|
|
{
|
2017-10-13 18:34:36 -04:00
|
|
|
// decode keyboard modifiers we are interested in
|
|
|
|
auto shift = modifiers.testFlag (Qt::ShiftModifier);
|
|
|
|
auto ctrl = modifiers.testFlag (Qt::ControlModifier);
|
|
|
|
// auto alt = modifiers.testFlag (Qt::AltModifier);
|
2017-07-09 20:01:20 -04:00
|
|
|
// basic mode sanity checks
|
2021-03-03 06:51:22 -05:00
|
|
|
auto const& parts = message.clean_string ().split (' ', SkipEmptyParts);
|
2017-07-09 20:01:20 -04:00
|
|
|
if (parts.size () < 5) return;
|
2017-09-01 01:11:57 -04:00
|
|
|
auto const& mode = parts.at (4).left (1);
|
2017-07-09 20:01:20 -04:00
|
|
|
if (("JT9+JT65" == m_mode && !("@" == mode || "#" == mode))
|
|
|
|
|| ("JT65" == m_mode && mode != "#")
|
|
|
|
|| ("JT9" == m_mode && mode != "@")
|
|
|
|
|| ("MSK144" == m_mode && !("&" == mode || "^" == mode))
|
|
|
|
|| ("QRA64" == m_mode && mode.left (1) != ":")) {
|
2020-07-23 13:51:05 -04:00
|
|
|
return; //Currently we do auto-sequencing only in FT4, FT8, MSK144, and FST4
|
2017-07-09 20:01:20 -04:00
|
|
|
}
|
|
|
|
|
2017-09-01 01:11:57 -04:00
|
|
|
//Skip the rest if no decoded text extracted
|
|
|
|
int frequency = message.frequencyOffset();
|
|
|
|
if (message.isTX()) {
|
2017-09-30 13:48:46 -04:00
|
|
|
if (!m_config.enable_VHF_features()) {
|
2017-09-30 09:56:33 -04:00
|
|
|
if(!shift) ui->RxFreqSpinBox->setValue(frequency); //Set Rx freq
|
2018-02-10 21:29:27 -05:00
|
|
|
if((ctrl or shift) and !ui->cbHoldTxFreq->isChecked ()) {
|
2017-12-18 14:07:10 -05:00
|
|
|
ui->TxFreqSpinBox->setValue(frequency); //Set Tx freq
|
|
|
|
}
|
2016-05-17 15:35:38 -04:00
|
|
|
}
|
2016-11-14 10:00:15 -05:00
|
|
|
return;
|
|
|
|
}
|
2016-05-17 15:35:38 -04:00
|
|
|
|
2018-03-18 16:30:55 -04:00
|
|
|
// check for CQ with listening frequency
|
|
|
|
if (parts.size () >= 7
|
|
|
|
&& (m_bFastMode || m_mode=="FT8")
|
|
|
|
&& "CQ" == parts[5]
|
|
|
|
&& m_config.is_transceiver_online ()) {
|
|
|
|
bool ok;
|
|
|
|
auto kHz = parts[6].toUInt (&ok);
|
2018-03-18 16:38:42 -04:00
|
|
|
if (ok && kHz >= 10 && 3 == parts[6].size ()) {
|
2018-03-18 16:30:55 -04:00
|
|
|
// QSY Freq for answering CQ nnn
|
|
|
|
setRig (m_freqNominal / 1000000 * 1000000 + 1000 * kHz);
|
|
|
|
ui->decodedTextBrowser2->displayQSY (QString {"QSY %1"}.arg (m_freqNominal / 1e6, 7, 'f', 3));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-05-22 12:44:28 -04:00
|
|
|
int nmod = fmod(double(message.timeInSeconds()),2.0*m_TRperiod);
|
2016-05-04 21:32:16 -04:00
|
|
|
m_txFirst=(nmod!=0);
|
2018-10-30 17:06:01 -04:00
|
|
|
if( SpecOp::HOUND == m_config.special_op_id() ) m_txFirst=false; //Hound must not transmit first
|
|
|
|
if( SpecOp::FOX == m_config.special_op_id() ) m_txFirst=true; //Fox must always transmit first
|
2016-05-04 21:32:16 -04:00
|
|
|
ui->txFirstCheckBox->setChecked(m_txFirst);
|
|
|
|
|
2017-09-01 01:11:57 -04:00
|
|
|
auto const& message_words = message.messageWords ();
|
|
|
|
if (message_words.size () < 2) return;
|
|
|
|
|
2015-03-04 07:22:33 -05:00
|
|
|
QString hiscall;
|
|
|
|
QString hisgrid;
|
2017-09-01 01:11:57 -04:00
|
|
|
message.deCallAndGrid(/*out*/hiscall,hisgrid);
|
2020-07-19 13:20:41 -04:00
|
|
|
|
2021-03-03 06:51:22 -05:00
|
|
|
if(message.clean_string ().contains(hiscall+"/R")) {
|
2018-10-13 20:39:24 -04:00
|
|
|
hiscall+="/R";
|
|
|
|
ui->dxCallEntry->setText(hiscall);
|
|
|
|
}
|
2021-03-03 06:51:22 -05:00
|
|
|
if(message.clean_string ().contains(hiscall+"/P")) {
|
2018-10-13 20:39:24 -04:00
|
|
|
hiscall+="/P";
|
|
|
|
ui->dxCallEntry->setText(hiscall);
|
|
|
|
}
|
2019-03-12 11:09:49 -04:00
|
|
|
|
2021-03-03 06:51:22 -05:00
|
|
|
QStringList w=message.clean_string ().mid(22).remove("<").remove(">").split(" ",SkipEmptyParts);
|
2020-04-24 10:33:23 -04:00
|
|
|
int nw=w.size();
|
|
|
|
if(nw>=4) {
|
2020-04-25 16:28:05 -04:00
|
|
|
if(message_words.size()<3) return;
|
2020-04-24 10:33:23 -04:00
|
|
|
int n=w.at(nw-2).toInt();
|
|
|
|
if(n>=520001 and n<=592047) {
|
|
|
|
hiscall=w.at(1);
|
|
|
|
hisgrid=w.at(nw-1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-07-31 13:18:57 -04:00
|
|
|
bool is_73 = message_words.filter (QRegularExpression {"^(73|RR73)$"}).size ();
|
2021-03-03 06:51:22 -05:00
|
|
|
if (!is_73 and !message.isStandardMessage() and !message.clean_string ().contains("<")) {
|
2018-11-09 11:39:02 -05:00
|
|
|
qDebug () << "Not processing message - hiscall:" << hiscall << "hisgrid:" << hisgrid
|
2021-03-03 06:51:22 -05:00
|
|
|
<< message.clean_string () << message.isStandardMessage();
|
2017-09-22 13:38:51 -04:00
|
|
|
return;
|
|
|
|
}
|
2018-07-30 15:46:25 -04:00
|
|
|
|
2015-04-22 13:48:03 -04:00
|
|
|
// only allow automatic mode changes between JT9 and JT65, and when not transmitting
|
2015-11-10 18:26:42 -05:00
|
|
|
if (!m_transmitting and m_mode == "JT9+JT65") {
|
2017-09-01 01:11:57 -04:00
|
|
|
if (message.isJT9())
|
2016-05-17 15:35:38 -04:00
|
|
|
{
|
|
|
|
m_modeTx="JT9";
|
|
|
|
ui->pbTxMode->setText("Tx JT9 @");
|
|
|
|
m_wideGraph->setModeTx(m_modeTx);
|
2017-09-01 01:11:57 -04:00
|
|
|
} else if (message.isJT65()) {
|
2016-05-17 15:35:38 -04:00
|
|
|
m_modeTx="JT65";
|
|
|
|
ui->pbTxMode->setText("Tx JT65 #");
|
|
|
|
m_wideGraph->setModeTx(m_modeTx);
|
2014-09-24 13:26:03 -04:00
|
|
|
}
|
2017-09-01 01:11:57 -04:00
|
|
|
} else if ((message.isJT9 () and m_modeTx != "JT9" and m_mode != "JT4") or
|
|
|
|
(message.isJT65 () and m_modeTx != "JT65" and m_mode != "JT4")) {
|
2016-05-17 15:35:38 -04:00
|
|
|
// if we are not allowing mode change then don't process decode
|
|
|
|
return;
|
|
|
|
}
|
2014-09-24 13:26:03 -04:00
|
|
|
|
2020-07-18 09:47:20 -04:00
|
|
|
// ignore calls by other hounds
|
|
|
|
if (SpecOp::HOUND == m_config.special_op_id()
|
|
|
|
&& message.messageWords ().indexOf (QRegularExpression {R"(R\+-[0-9]+)"}) >= 0)
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2017-09-01 01:11:57 -04:00
|
|
|
QString firstcall = message.call();
|
2017-09-30 15:25:01 -04:00
|
|
|
if(firstcall.length()==5 and firstcall.mid(0,3)=="CQ ") firstcall="CQ";
|
2017-06-27 09:36:10 -04:00
|
|
|
if(!m_bFastMode and (!m_config.enable_VHF_features() or m_mode=="FT8")) {
|
2017-09-30 09:56:33 -04:00
|
|
|
// Don't change Tx freq if in a fast mode, or VHF features enabled; also not if a
|
|
|
|
// station is calling me, unless CTRL or SHIFT is held down.
|
|
|
|
if ((Radio::is_callsign (firstcall)
|
|
|
|
&& firstcall != m_config.my_callsign () && firstcall != m_baseCall
|
|
|
|
&& firstcall != "DE")
|
|
|
|
|| "CQ" == firstcall || "QRZ" == firstcall || ctrl || shift) {
|
2018-10-30 17:06:01 -04:00
|
|
|
if (((SpecOp::HOUND != m_config.special_op_id()) || m_mode != "FT8")
|
2018-02-10 21:29:27 -05:00
|
|
|
&& (!ui->cbHoldTxFreq->isChecked () || shift || ctrl)) {
|
2017-12-18 14:07:10 -05:00
|
|
|
ui->TxFreqSpinBox->setValue(frequency);
|
|
|
|
}
|
2017-09-30 13:48:46 -04:00
|
|
|
if(m_mode != "JT4" && m_mode != "JT65" && !m_mode.startsWith ("JT9") &&
|
2020-09-05 14:09:33 -04:00
|
|
|
m_mode != "QRA64" && m_mode!="FT8" && m_mode!="FT4" && m_mode!="FST4") {
|
2017-09-30 09:56:33 -04:00
|
|
|
return;
|
|
|
|
}
|
2014-09-24 13:26:03 -04:00
|
|
|
}
|
2015-05-27 09:08:28 -04:00
|
|
|
}
|
2014-09-24 13:26:03 -04:00
|
|
|
|
2015-04-26 12:41:12 -04:00
|
|
|
// prior DX call (possible QSO partner)
|
2018-10-13 20:39:24 -04:00
|
|
|
auto qso_partner_base_call = Radio::base_callsign (ui->dxCallEntry->text ());
|
2015-03-14 15:13:18 -04:00
|
|
|
auto base_call = Radio::base_callsign (hiscall);
|
2013-08-24 21:48:45 -04:00
|
|
|
|
2015-11-17 20:28:12 -05:00
|
|
|
// Determine appropriate response to received message
|
2021-03-03 06:51:22 -05:00
|
|
|
auto dtext = " " + message.clean_string () + " ";
|
2018-08-29 09:31:12 -04:00
|
|
|
dtext=dtext.remove("<").remove(">");
|
2015-03-14 15:13:18 -04:00
|
|
|
if(dtext.contains (" " + m_baseCall + " ")
|
2018-07-30 15:46:25 -04:00
|
|
|
|| dtext.contains ("<" + m_baseCall + "> ")
|
2018-08-29 09:31:12 -04:00
|
|
|
//###??? || dtext.contains ("<" + m_baseCall + " " + hiscall + "> ")
|
2015-03-14 15:13:18 -04:00
|
|
|
|| dtext.contains ("/" + m_baseCall + " ")
|
|
|
|
|| dtext.contains (" " + m_baseCall + "/")
|
2018-08-01 11:25:24 -04:00
|
|
|
|| (firstcall == "DE")) {
|
2020-04-21 15:50:27 -04:00
|
|
|
|
2020-04-22 13:32:00 -04:00
|
|
|
QString w2;
|
2020-05-01 16:39:40 -04:00
|
|
|
int nw=w.size();
|
|
|
|
if(nw>=3) w2=w.at(2);
|
2018-07-27 15:21:40 -04:00
|
|
|
int nrpt=w2.toInt();
|
2020-05-01 13:33:27 -04:00
|
|
|
QString w34;
|
2020-05-01 16:39:40 -04:00
|
|
|
if(nw>=4) {
|
|
|
|
// w34=w.at(nw-2);
|
|
|
|
nrpt=w.at(nw-2).toInt();
|
|
|
|
w34=w.at(nw-1);
|
2020-05-01 13:33:27 -04:00
|
|
|
}
|
2020-05-01 16:39:40 -04:00
|
|
|
bool bRTTY = (nrpt>=529 and nrpt<=599);
|
|
|
|
bool bEU_VHF_w2=(nrpt>=520001 and nrpt<=594000);
|
2018-10-30 17:06:01 -04:00
|
|
|
if(bEU_VHF_w2 and SpecOp::EU_VHF!=m_config.special_op_id()) {
|
2020-05-01 13:33:27 -04:00
|
|
|
auto const& msg = tr("Should you switch to EU VHF Contest mode?\n\n"
|
2020-04-30 14:44:51 -04:00
|
|
|
"To do so, check 'Special operating activity' and\n"
|
|
|
|
"'EU VHF Contest' on the Settings | Advanced tab.");
|
2020-05-01 13:33:27 -04:00
|
|
|
MessageBox::information_message (this, msg);
|
2018-07-27 16:08:05 -04:00
|
|
|
}
|
2020-04-23 16:15:19 -04:00
|
|
|
|
2021-03-03 06:51:22 -05:00
|
|
|
QStringList t=message.clean_string ().split(' ', SkipEmptyParts);
|
2018-08-01 11:25:24 -04:00
|
|
|
int n=t.size();
|
|
|
|
QString t0=t.at(n-2);
|
|
|
|
QString t1=t0.right(1);
|
2018-09-01 20:58:21 -04:00
|
|
|
bool bFieldDay_msg = (t1>="A" and t1<="F" and t0.size()<=3 and n>=9);
|
2018-08-01 11:25:24 -04:00
|
|
|
int m=t0.remove(t1).toInt();
|
|
|
|
if(m < 1) bFieldDay_msg=false;
|
|
|
|
if(bFieldDay_msg) {
|
|
|
|
m_xRcvd=t.at(n-2) + " " + t.at(n-1);
|
|
|
|
t0=t.at(n-3);
|
|
|
|
}
|
2018-10-30 17:06:01 -04:00
|
|
|
if(bFieldDay_msg and SpecOp::FIELD_DAY!=m_config.special_op_id()) {
|
2018-07-30 13:23:23 -04:00
|
|
|
// ### Should be in ARRL Field Day mode ??? ###
|
|
|
|
MessageBox::information_message (this, tr ("Should you switch to ARRL Field Day mode?"));
|
|
|
|
}
|
2018-07-30 13:41:25 -04:00
|
|
|
|
2018-10-30 17:06:01 -04:00
|
|
|
if(bRTTY and SpecOp::RTTY != m_config.special_op_id()) {
|
2018-09-05 11:07:27 -04:00
|
|
|
// ### Should be in RTTY contest mode ??? ###
|
|
|
|
MessageBox::information_message (this, tr ("Should you switch to RTTY contest mode?"));
|
2018-07-30 13:41:25 -04:00
|
|
|
}
|
2020-04-25 12:11:20 -04:00
|
|
|
|
|
|
|
if(SpecOp::EU_VHF==m_config.special_op_id() and message_words.at(1).contains(m_baseCall) and
|
|
|
|
(!message_words.at(2).contains(qso_partner_base_call)) and (!m_bDoubleClicked)) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2018-07-28 15:29:07 -04:00
|
|
|
if(message_words.size () > 3 // enough fields for a normal message
|
|
|
|
&& (message_words.at(1).contains(m_baseCall) || "DE" == message_words.at(1))
|
2019-04-22 09:42:28 -04:00
|
|
|
&& (message_words.at(2).contains(qso_partner_base_call) or m_bDoubleClicked
|
|
|
|
or bEU_VHF_w2 or (m_QSOProgress==CALLING))) {
|
2018-10-30 17:06:01 -04:00
|
|
|
if(message_words.at(3).contains(grid_regexp) and SpecOp::EU_VHF!=m_config.special_op_id()) {
|
2020-01-24 12:26:36 -05:00
|
|
|
if(SpecOp::NA_VHF==m_config.special_op_id() or SpecOp::WW_DIGI==m_config.special_op_id()){
|
2020-09-05 15:22:18 -04:00
|
|
|
setTxMsg(3);
|
2018-07-27 15:21:40 -04:00
|
|
|
m_QSOProgress=ROGER_REPORT;
|
2018-07-27 11:52:38 -04:00
|
|
|
} else {
|
2018-11-09 12:46:02 -05:00
|
|
|
if(m_mode=="JT65" and message_words.size()>4 and message_words.at(4)=="OOO") {
|
2020-09-05 15:22:18 -04:00
|
|
|
setTxMsg(3);
|
2018-11-09 12:46:02 -05:00
|
|
|
m_QSOProgress=ROGER_REPORT;
|
|
|
|
} else {
|
2020-09-05 15:22:18 -04:00
|
|
|
setTxMsg(2);
|
2018-11-09 12:46:02 -05:00
|
|
|
m_QSOProgress=REPORT;
|
|
|
|
}
|
2015-04-26 12:41:12 -04:00
|
|
|
}
|
2018-10-30 17:06:01 -04:00
|
|
|
} else if(w34.contains(grid_regexp) and SpecOp::EU_VHF==m_config.special_op_id()) {
|
2020-05-01 16:39:40 -04:00
|
|
|
|
2018-07-28 15:29:07 -04:00
|
|
|
if(nrpt==0) {
|
2020-09-05 15:22:18 -04:00
|
|
|
setTxMsg(2);
|
2018-07-28 15:29:07 -04:00
|
|
|
m_QSOProgress=REPORT;
|
|
|
|
} else {
|
|
|
|
if(w2=="R") {
|
2020-09-05 15:22:18 -04:00
|
|
|
setTxMsg(4);
|
2018-07-28 15:29:07 -04:00
|
|
|
m_QSOProgress=ROGERS;
|
|
|
|
} else {
|
2020-09-05 15:22:18 -04:00
|
|
|
setTxMsg(3);
|
2018-07-27 15:21:40 -04:00
|
|
|
m_QSOProgress=ROGER_REPORT;
|
2017-07-24 15:27:23 -04:00
|
|
|
}
|
2015-04-26 12:41:12 -04:00
|
|
|
}
|
2018-10-30 17:06:01 -04:00
|
|
|
} else if(SpecOp::RTTY == m_config.special_op_id() and bRTTY) {
|
2020-05-01 16:39:40 -04:00
|
|
|
if(w2=="R") {
|
2020-09-05 15:22:18 -04:00
|
|
|
setTxMsg(4);
|
2020-05-01 16:39:40 -04:00
|
|
|
m_QSOProgress=ROGERS;
|
|
|
|
} else {
|
2020-09-05 15:22:18 -04:00
|
|
|
setTxMsg(3);
|
2020-05-01 16:39:40 -04:00
|
|
|
m_QSOProgress=ROGER_REPORT;
|
|
|
|
}
|
|
|
|
m_xRcvd=t[n-2] + " " + t[n-1];
|
2018-10-30 17:06:01 -04:00
|
|
|
} else if(SpecOp::FIELD_DAY==m_config.special_op_id() and bFieldDay_msg) {
|
2018-08-01 11:25:24 -04:00
|
|
|
if(t0=="R") {
|
2020-09-05 15:22:18 -04:00
|
|
|
setTxMsg(4);
|
2018-08-01 11:25:24 -04:00
|
|
|
m_QSOProgress=ROGERS;
|
|
|
|
} else {
|
2020-09-05 15:22:18 -04:00
|
|
|
setTxMsg(3);
|
2018-08-01 11:25:24 -04:00
|
|
|
m_QSOProgress=ROGER_REPORT;
|
2017-07-24 15:27:23 -04:00
|
|
|
}
|
2018-07-28 15:29:07 -04:00
|
|
|
} else { // no grid on end of msg
|
2020-11-12 08:32:56 -05:00
|
|
|
auto const& word_3 = message_words.at (3);
|
2021-03-03 09:34:42 -05:00
|
|
|
auto word_3_as_number = word_3.toInt ();
|
2021-03-01 17:20:30 -05:00
|
|
|
if (("RRR" == word_3
|
2021-03-03 09:34:42 -05:00
|
|
|
|| word_3_as_number == 73
|
2021-03-01 17:20:30 -05:00
|
|
|
|| "RR73" == word_3
|
|
|
|
|| ("R" == word_3 && m_QSOProgress != REPORT))) {
|
2020-11-12 08:32:56 -05:00
|
|
|
if(m_mode=="FT4" and "RR73" == word_3) m_dateTimeRcvdRR73=QDateTime::currentDateTimeUtc();
|
|
|
|
m_bTUmsg=false;
|
|
|
|
m_nextCall=""; //### Temporary: disable use of "TU;" message
|
|
|
|
if(SpecOp::RTTY == m_config.special_op_id() and m_nextCall!="") {
|
|
|
|
// We're in RTTY contest and have "nextCall" queued up: send a "TU; ..." message
|
|
|
|
logQSOTimer.start(0);
|
|
|
|
ui->tx3->setText(ui->tx3->text().remove("TU; "));
|
|
|
|
useNextCall();
|
|
|
|
QString t="TU; " + ui->tx3->text();
|
|
|
|
ui->tx3->setText(t);
|
|
|
|
m_bTUmsg=true;
|
|
|
|
} else {
|
2021-03-03 16:58:49 -05:00
|
|
|
if (m_QSOProgress > CALLING && m_QSOProgress < SIGNOFF
|
|
|
|
&& SpecOp::NONE < m_config.special_op_id () && SpecOp::FOX > m_config.special_op_id ()
|
|
|
|
&& ("RR73" == word_3 || 73 == word_3_as_number))
|
2021-02-23 21:19:11 -05:00
|
|
|
{
|
|
|
|
logQSOTimer.start(0);
|
|
|
|
m_ntx=6;
|
|
|
|
ui->txrb6->setChecked(true);
|
|
|
|
}
|
2021-03-02 14:23:17 -05:00
|
|
|
else if (word_3.contains (QRegularExpression {"^R(?!R73|RR)"})
|
|
|
|
&& m_QSOProgress != ROGER_REPORT)
|
2021-03-01 17:20:30 -05:00
|
|
|
{
|
|
|
|
m_ntx=4;
|
|
|
|
ui->txrb4->setChecked(true);
|
|
|
|
}
|
2021-02-23 21:19:11 -05:00
|
|
|
else
|
|
|
|
{
|
|
|
|
m_ntx=5;
|
|
|
|
ui->txrb5->setChecked(true);
|
|
|
|
}
|
2020-11-12 08:32:56 -05:00
|
|
|
}
|
2021-03-01 17:20:30 -05:00
|
|
|
if (m_QSOProgress >= ROGER_REPORT)
|
|
|
|
{
|
|
|
|
m_QSOProgress = SIGNOFF;
|
|
|
|
}
|
2018-07-28 15:29:07 -04:00
|
|
|
} else if((m_QSOProgress >= REPORT
|
2019-01-23 16:53:03 -05:00
|
|
|
|| (m_QSOProgress >= REPLYING &&
|
2019-01-28 10:19:46 -05:00
|
|
|
(m_mode=="MSK144" or m_mode=="FT8" or m_mode=="FT4")))
|
2020-11-12 08:32:56 -05:00
|
|
|
&& word_3.startsWith ('R')) {
|
2018-07-28 15:29:07 -04:00
|
|
|
m_ntx=4;
|
|
|
|
m_QSOProgress = ROGERS;
|
2018-10-30 17:06:01 -04:00
|
|
|
if(SpecOp::RTTY == m_config.special_op_id()) {
|
2018-08-01 11:25:24 -04:00
|
|
|
int n=t.size();
|
2018-11-02 16:25:47 -04:00
|
|
|
int nRpt=t[n-2].toInt();
|
|
|
|
if(nRpt>=529 and nRpt<=599) m_xRcvd=t[n-2] + " " + t[n-1];
|
2017-07-24 15:27:23 -04:00
|
|
|
}
|
2018-07-28 15:29:07 -04:00
|
|
|
ui->txrb4->setChecked(true);
|
2020-11-12 08:32:56 -05:00
|
|
|
} else if (m_QSOProgress >= CALLING)
|
|
|
|
{
|
2021-02-23 21:19:11 -05:00
|
|
|
if ((word_3_as_number >= -50 && word_3_as_number <= 49)
|
|
|
|
|| (word_3_as_number >= 529 && word_3_as_number <= 599))
|
|
|
|
{
|
|
|
|
if(SpecOp::EU_VHF==m_config.special_op_id() or
|
|
|
|
SpecOp::FIELD_DAY==m_config.special_op_id() or
|
|
|
|
SpecOp::RTTY==m_config.special_op_id())
|
|
|
|
{
|
|
|
|
setTxMsg(2);
|
|
|
|
m_QSOProgress=REPORT;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if (word_3.startsWith ("R-") || word_3.startsWith ("R+"))
|
|
|
|
{
|
|
|
|
setTxMsg(4);
|
|
|
|
m_QSOProgress=ROGERS;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
setTxMsg (3);
|
|
|
|
m_QSOProgress = ROGER_REPORT;
|
|
|
|
}
|
|
|
|
}
|
2020-11-12 08:32:56 -05:00
|
|
|
}
|
2017-07-24 15:27:23 -04:00
|
|
|
}
|
2021-02-23 21:19:11 -05:00
|
|
|
else
|
|
|
|
{ // nothing for us
|
|
|
|
return;
|
|
|
|
}
|
2018-07-28 15:29:07 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (m_QSOProgress >= ROGERS
|
2018-10-04 14:50:02 -04:00
|
|
|
&& message_words.size () > 2 && message_words.at (1).contains (m_baseCall)
|
|
|
|
&& message_words.at (2) == "73") {
|
2018-07-28 15:29:07 -04:00
|
|
|
// 73 back to compound call holder
|
2020-09-05 15:11:32 -04:00
|
|
|
m_ntx=5;
|
|
|
|
ui->txrb5->setChecked(true);
|
2018-07-28 15:29:07 -04:00
|
|
|
m_QSOProgress = SIGNOFF;
|
|
|
|
}
|
2019-04-22 09:42:28 -04:00
|
|
|
else if (!(m_bAutoReply && (m_QSOProgress > CALLING))) {
|
2018-10-04 14:50:02 -04:00
|
|
|
if ((message_words.size () > 4 && message_words.at (1).contains (m_baseCall)
|
|
|
|
&& message_words.at (4) == "OOO")) {
|
2018-07-28 15:29:07 -04:00
|
|
|
// EME short code report or MSK144/FT8 contest mode reply, send back Tx3
|
|
|
|
m_ntx=3;
|
|
|
|
m_QSOProgress = ROGER_REPORT;
|
|
|
|
ui->txrb3->setChecked (true);
|
|
|
|
} else if (!is_73) { // don't respond to sign off messages
|
|
|
|
m_ntx=2;
|
|
|
|
m_QSOProgress = REPORT;
|
|
|
|
ui->txrb2->setChecked(true);
|
|
|
|
if (m_bDoubleClickAfterCQnnn and m_transmitting) {
|
|
|
|
on_stopTxButton_clicked();
|
|
|
|
TxAgainTimer.start(1500);
|
2017-11-26 17:27:55 -05:00
|
|
|
}
|
2018-07-28 15:29:07 -04:00
|
|
|
m_bDoubleClickAfterCQnnn=false;
|
2017-07-24 15:27:23 -04:00
|
|
|
}
|
2018-07-28 15:29:07 -04:00
|
|
|
else {
|
|
|
|
return; // nothing we need to respond to
|
2013-04-29 14:35:58 -04:00
|
|
|
}
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
}
|
2018-12-08 13:00:58 -05:00
|
|
|
else { // nothing for us
|
2018-12-08 11:56:29 -05:00
|
|
|
// if(message_words.size () > 3 // enough fields for a normal message
|
|
|
|
// && SpecOp::RTTY == m_config.special_op_id()
|
|
|
|
// && (message_words.at(1).contains(m_baseCall) || "DE" == message_words.at(1))
|
|
|
|
// && (!message_words.at(2).contains(qso_partner_base_call) and !bEU_VHF_w2)) {
|
2018-12-08 13:00:58 -05:00
|
|
|
//// Queue up the next QSO partner
|
2018-12-08 11:56:29 -05:00
|
|
|
// m_nextCall=message_words.at(2);
|
|
|
|
// m_nextGrid=message_words.at(3);
|
|
|
|
// m_nextRpt=message.report();
|
|
|
|
// ui->labNextCall->setText("Next: " + m_nextCall);
|
2020-08-08 08:20:52 -04:00
|
|
|
// ui->labNextCall->setStyleSheet("QLabel {color: #000000; background-color: #66ff66}");
|
2018-12-08 11:56:29 -05:00
|
|
|
// }
|
2018-12-08 13:00:58 -05:00
|
|
|
return;
|
|
|
|
}
|
2018-07-28 15:29:07 -04:00
|
|
|
}
|
2017-09-01 01:11:57 -04:00
|
|
|
else if (firstcall == "DE" && message_words.size () > 3 && message_words.at (3) == "73") {
|
2017-07-24 15:27:23 -04:00
|
|
|
if (m_QSOProgress >= ROGERS && base_call == qso_partner_base_call && m_currentMessageType) {
|
2015-04-26 12:41:12 -04:00
|
|
|
// 73 back to compound call holder
|
2020-09-05 15:22:18 -04:00
|
|
|
m_ntx=5;
|
|
|
|
ui->txrb5->setChecked(true);
|
2017-07-24 15:27:23 -04:00
|
|
|
m_QSOProgress = SIGNOFF;
|
2018-07-28 15:29:07 -04:00
|
|
|
} else {
|
2015-04-26 12:41:12 -04:00
|
|
|
// treat like a CQ/QRZ
|
2017-07-25 21:38:57 -04:00
|
|
|
if (ui->tx1->isEnabled ()) {
|
|
|
|
m_ntx = 1;
|
|
|
|
m_QSOProgress = REPLYING;
|
|
|
|
ui->txrb1->setChecked (true);
|
2018-07-28 15:29:07 -04:00
|
|
|
} else {
|
2018-07-11 14:27:53 -04:00
|
|
|
m_ntx=2;
|
2017-07-25 21:38:57 -04:00
|
|
|
m_QSOProgress = REPORT;
|
|
|
|
ui->txrb2->setChecked (true);
|
|
|
|
}
|
2015-04-26 12:41:12 -04:00
|
|
|
}
|
|
|
|
}
|
2017-09-01 01:11:57 -04:00
|
|
|
else if (is_73 && !message.isStandardMessage ()) {
|
2020-09-05 15:11:32 -04:00
|
|
|
m_ntx=5;
|
|
|
|
ui->txrb5->setChecked(true);
|
2017-07-24 15:27:23 -04:00
|
|
|
m_QSOProgress = SIGNOFF;
|
2018-10-04 14:50:02 -04:00
|
|
|
} else {
|
|
|
|
// just work them
|
2018-07-28 15:29:07 -04:00
|
|
|
if (ui->tx1->isEnabled ()) {
|
|
|
|
m_ntx = 1;
|
|
|
|
m_QSOProgress = REPLYING;
|
|
|
|
ui->txrb1->setChecked (true);
|
|
|
|
} else {
|
|
|
|
m_ntx=2;
|
|
|
|
m_QSOProgress = REPORT;
|
|
|
|
ui->txrb2->setChecked (true);
|
2013-04-07 21:50:49 -04:00
|
|
|
}
|
2018-07-28 15:29:07 -04:00
|
|
|
}
|
2017-07-24 15:27:23 -04:00
|
|
|
// if we get here then we are reacting to the message
|
2017-07-30 21:28:33 -04:00
|
|
|
if (m_bAutoReply) m_bCallingCQ = CALLING == m_QSOProgress;
|
2017-09-29 09:27:55 -04:00
|
|
|
if (ui->RxFreqSpinBox->isEnabled () and m_mode != "MSK144" and !shift) {
|
2017-09-01 01:11:57 -04:00
|
|
|
ui->RxFreqSpinBox->setValue (frequency); //Set Rx freq
|
|
|
|
}
|
|
|
|
|
2017-08-29 22:27:57 -04:00
|
|
|
QString s1 = m_QSOText.trimmed ();
|
2021-03-03 06:51:22 -05:00
|
|
|
QString s2 = message.clean_string ().trimmed();
|
2017-09-01 01:11:57 -04:00
|
|
|
if (s1!=s2 and !message.isTX()) {
|
2018-05-09 14:46:23 -04:00
|
|
|
if (!s2.contains(m_baseCall) or m_mode=="MSK144") { // Taken care of elsewhere if for_us and slow mode
|
2018-10-24 19:00:19 -04:00
|
|
|
ui->decodedTextBrowser2->displayDecodedText(message, m_baseCall,m_mode,m_config.DXCC(),
|
2018-08-24 13:18:49 -04:00
|
|
|
m_logBook,m_currentBand,m_config.ppfx());
|
2018-02-02 11:43:49 -05:00
|
|
|
}
|
2017-09-01 16:10:35 -04:00
|
|
|
m_QSOText = s2;
|
2017-07-24 15:27:23 -04:00
|
|
|
}
|
|
|
|
|
2017-09-25 19:38:27 -04:00
|
|
|
if (Radio::is_callsign (hiscall)
|
|
|
|
&& (base_call != qso_partner_base_call || base_call != hiscall)) {
|
|
|
|
if (qso_partner_base_call != base_call) {
|
|
|
|
// clear the DX grid if the base call of his call is different
|
|
|
|
// from the current DX call
|
|
|
|
ui->dxGridEntry->clear ();
|
|
|
|
}
|
|
|
|
// his base call different or his call more qualified
|
|
|
|
// i.e. compound version of same base call
|
|
|
|
ui->dxCallEntry->setText (hiscall);
|
|
|
|
}
|
|
|
|
if (hisgrid.contains (grid_regexp)) {
|
|
|
|
if(ui->dxGridEntry->text().mid(0,4) != hisgrid) ui->dxGridEntry->setText(hisgrid);
|
2018-07-28 15:29:07 -04:00
|
|
|
}
|
2020-06-07 13:32:18 -04:00
|
|
|
lookup();
|
2017-09-25 19:38:27 -04:00
|
|
|
m_hisGrid = ui->dxGridEntry->text();
|
|
|
|
|
2017-09-01 01:11:57 -04:00
|
|
|
QString rpt = message.report();
|
2017-07-24 15:27:23 -04:00
|
|
|
int n=rpt.toInt();
|
|
|
|
if(m_mode=="MSK144" and m_bShMsgs) {
|
|
|
|
int n=rpt.toInt();
|
|
|
|
if(n<=-2) n=-3;
|
|
|
|
if(n>=-1 and n<=1) n=0;
|
|
|
|
if(n>=2 and n<=4) n=3;
|
|
|
|
if(n>=5 and n<=7) n=6;
|
|
|
|
if(n>=8 and n<=11) n=10;
|
|
|
|
if(n>=12 and n<=14) n=13;
|
|
|
|
if(n>=15) n=16;
|
|
|
|
rpt=QString::number(n);
|
|
|
|
}
|
|
|
|
|
|
|
|
ui->rptSpinBox->setValue(n);
|
2018-10-08 12:52:28 -04:00
|
|
|
// Don't genStdMsgs if we're already sending 73, or a "TU; " msg is queued.
|
2018-11-05 14:33:26 -05:00
|
|
|
m_bTUmsg=false; //### Temporary: disable use of "TU;" messages
|
2018-10-08 09:08:52 -04:00
|
|
|
if (!m_nTx73 and !m_bTUmsg) {
|
2017-07-24 15:27:23 -04:00
|
|
|
genStdMsgs(rpt);
|
|
|
|
}
|
2014-09-24 13:25:19 -04:00
|
|
|
if(m_transmitting) m_restart=true;
|
2019-01-24 11:58:57 -05:00
|
|
|
if (ui->cbAutoSeq->isVisible () && ui->cbAutoSeq->isChecked ()
|
2019-01-28 10:19:46 -05:00
|
|
|
&& !m_bDoubleClicked && m_mode!="FT4") {
|
2019-01-23 16:53:03 -05:00
|
|
|
return;
|
|
|
|
}
|
2020-08-29 09:04:29 -04:00
|
|
|
if(m_config.quick_call() && m_bDoubleClicked) auto_tx_mode(true);
|
2016-11-22 10:47:59 -05:00
|
|
|
m_bDoubleClicked=false;
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
|
|
|
|
2020-09-05 15:22:18 -04:00
|
|
|
void MainWindow::setTxMsg(int n)
|
2018-07-27 15:21:40 -04:00
|
|
|
{
|
|
|
|
m_ntx=n;
|
|
|
|
if(n==1) ui->txrb1->setChecked(true);
|
|
|
|
if(n==2) ui->txrb2->setChecked(true);
|
|
|
|
if(n==3) ui->txrb3->setChecked(true);
|
|
|
|
if(n==4) ui->txrb4->setChecked(true);
|
|
|
|
if(n==5) ui->txrb5->setChecked(true);
|
2019-01-28 14:20:32 -05:00
|
|
|
if(n==6) ui->txrb6->setChecked(true);
|
2018-07-27 15:21:40 -04:00
|
|
|
}
|
|
|
|
|
2016-11-26 20:34:43 -05:00
|
|
|
void MainWindow::genCQMsg ()
|
2012-05-22 13:09:48 -04:00
|
|
|
{
|
2017-08-25 12:59:58 -04:00
|
|
|
if(m_config.my_callsign().size () && m_config.my_grid().size ()) {
|
2018-07-31 10:45:32 -04:00
|
|
|
QString grid{m_config.my_grid()};
|
2017-08-25 12:59:58 -04:00
|
|
|
if (ui->cbCQTx->isEnabled () && ui->cbCQTx->isVisible () && ui->cbCQTx->isChecked ()) {
|
2018-07-30 11:17:09 -04:00
|
|
|
if(stdCall(m_config.my_callsign())) {
|
|
|
|
msgtype (QString {"CQ %1 %2 %3"}
|
2017-08-25 12:59:58 -04:00
|
|
|
.arg (m_freqNominal / 1000 - m_freqNominal / 1000000 * 1000, 3, 10, QChar {'0'})
|
|
|
|
.arg (m_config.my_callsign())
|
|
|
|
.arg (grid.left (4)),
|
|
|
|
ui->tx6);
|
2018-07-30 11:17:09 -04:00
|
|
|
} else {
|
|
|
|
msgtype (QString {"CQ %1 %2"}
|
|
|
|
.arg (m_freqNominal / 1000 - m_freqNominal / 1000000 * 1000, 3, 10, QChar {'0'})
|
|
|
|
.arg (m_config.my_callsign()),
|
|
|
|
ui->tx6);
|
|
|
|
}
|
2017-08-25 12:59:58 -04:00
|
|
|
} else {
|
2018-07-30 11:17:09 -04:00
|
|
|
if(stdCall(m_config.my_callsign())) {
|
2018-09-27 14:28:17 -04:00
|
|
|
msgtype (QString {"%1 %2 %3"}.arg(m_CQtype).arg(m_config.my_callsign())
|
|
|
|
.arg(grid.left(4)),ui->tx6);
|
2018-07-30 11:17:09 -04:00
|
|
|
} else {
|
|
|
|
msgtype (QString {"%1 %2"}.arg(m_CQtype).arg(m_config.my_callsign()),ui->tx6);
|
|
|
|
}
|
2015-03-04 07:22:33 -05:00
|
|
|
}
|
2017-08-25 12:59:58 -04:00
|
|
|
if ((m_mode=="JT4" or m_mode=="QRA64") and ui->cbShMsgs->isChecked()) {
|
|
|
|
if (ui->cbTx6->isChecked ()) {
|
|
|
|
msgtype ("@1250 (SEND MSGS)", ui->tx6);
|
|
|
|
} else {
|
|
|
|
msgtype ("@1000 (TUNE)", ui->tx6);
|
|
|
|
}
|
2015-03-04 07:22:33 -05:00
|
|
|
}
|
2018-07-31 11:39:25 -04:00
|
|
|
|
2018-09-27 14:28:17 -04:00
|
|
|
QString t=ui->tx6->text();
|
2020-01-08 09:41:47 -05:00
|
|
|
QStringList tlist=t.split(" ");
|
2019-02-28 11:42:28 -05:00
|
|
|
if((m_mode=="FT4" or m_mode=="FT8" or m_mode=="MSK144") and
|
|
|
|
SpecOp::NONE != m_config.special_op_id() and
|
2020-01-08 09:41:47 -05:00
|
|
|
( tlist.at(1)==m_config.my_callsign() or
|
|
|
|
tlist.at(2)==m_config.my_callsign() ) and
|
2019-02-28 11:42:28 -05:00
|
|
|
stdCall(m_config.my_callsign())) {
|
2020-01-08 09:41:47 -05:00
|
|
|
if(SpecOp::NA_VHF == m_config.special_op_id()) m_cqStr="TEST";
|
|
|
|
if(SpecOp::EU_VHF == m_config.special_op_id()) m_cqStr="TEST";
|
|
|
|
if(SpecOp::FIELD_DAY == m_config.special_op_id()) m_cqStr="FD";
|
2020-01-24 12:26:36 -05:00
|
|
|
if(SpecOp::RTTY == m_config.special_op_id()) m_cqStr="RU";
|
|
|
|
if(SpecOp::WW_DIGI == m_config.special_op_id()) m_cqStr="WW";
|
2020-01-08 09:41:47 -05:00
|
|
|
if( tlist.at(1)==m_config.my_callsign() ) {
|
|
|
|
t="CQ " + m_cqStr + " " + tlist.at(1) + " " + tlist.at(2);
|
|
|
|
} else {
|
|
|
|
t="CQ " + m_cqStr + " " + tlist.at(2) + " " + tlist.at(3);
|
2019-02-28 11:42:28 -05:00
|
|
|
}
|
2018-08-01 11:25:24 -04:00
|
|
|
ui->tx6->setText(t);
|
2018-07-06 15:05:55 -04:00
|
|
|
}
|
2017-08-25 12:59:58 -04:00
|
|
|
} else {
|
|
|
|
ui->tx6->clear ();
|
|
|
|
}
|
2016-11-26 20:34:43 -05:00
|
|
|
}
|
|
|
|
|
2018-10-18 15:45:16 -04:00
|
|
|
void MainWindow::abortQSO()
|
|
|
|
{
|
|
|
|
bool b=m_auto;
|
|
|
|
clearDX();
|
2018-10-28 15:25:34 -04:00
|
|
|
if(b) auto_tx_mode(false);
|
2018-10-18 15:45:16 -04:00
|
|
|
ui->txrb6->setChecked(true);
|
|
|
|
}
|
|
|
|
|
2018-12-05 14:47:36 -05:00
|
|
|
bool MainWindow::stdCall(QString const& w)
|
2016-11-26 20:34:43 -05:00
|
|
|
{
|
2018-12-05 14:47:36 -05:00
|
|
|
static QRegularExpression standard_call_re {
|
|
|
|
R"(
|
2020-08-13 05:30:49 -04:00
|
|
|
^\s* # optional leading spaces
|
2018-12-05 14:47:36 -05:00
|
|
|
( [A-Z]{0,2} | [A-Z][0-9] | [0-9][A-Z] ) # part 1
|
|
|
|
( [0-9][A-Z]{0,3} ) # part 2
|
2020-08-13 05:30:49 -04:00
|
|
|
(/R | /P)? # optional suffix
|
|
|
|
\s*$ # optional trailing spaces
|
2018-12-05 14:47:36 -05:00
|
|
|
)", QRegularExpression::CaseInsensitiveOption | QRegularExpression::ExtendedPatternSyntaxOption};
|
|
|
|
return standard_call_re.match (w).hasMatch ();
|
2018-07-30 11:17:09 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void MainWindow::genStdMsgs(QString rpt, bool unconditional)
|
2018-10-08 09:08:52 -04:00
|
|
|
{
|
2016-11-26 20:34:43 -05:00
|
|
|
genCQMsg ();
|
2017-07-24 15:27:23 -04:00
|
|
|
auto const& hisCall=ui->dxCallEntry->text();
|
2016-07-10 18:20:30 -04:00
|
|
|
if(!hisCall.size ()) {
|
|
|
|
ui->labAz->clear ();
|
|
|
|
ui->tx1->clear ();
|
|
|
|
ui->tx2->clear ();
|
|
|
|
ui->tx3->clear ();
|
|
|
|
ui->tx4->clear ();
|
2018-08-27 11:26:09 -04:00
|
|
|
if(unconditional) ui->tx5->lineEdit ()->clear (); //Test if it needs sending again
|
2017-05-12 16:46:19 -04:00
|
|
|
m_gen_message_is_cq = false;
|
2013-07-08 15:57:01 -04:00
|
|
|
return;
|
|
|
|
}
|
2017-07-24 15:27:23 -04:00
|
|
|
auto const& my_callsign = m_config.my_callsign ();
|
|
|
|
auto is_compound = my_callsign != m_baseCall;
|
|
|
|
auto is_type_one = is_compound && shortList (my_callsign);
|
|
|
|
auto const& my_grid = m_config.my_grid ().left (4);
|
|
|
|
auto const& hisBase = Radio::base_callsign (hisCall);
|
2018-07-09 13:46:32 -04:00
|
|
|
auto eme_short_codes = m_config.enable_VHF_features () && ui->cbShMsgs->isChecked ()
|
|
|
|
&& m_mode == "JT65";
|
2018-07-30 11:17:09 -04:00
|
|
|
|
|
|
|
bool bMyCall=stdCall(my_callsign);
|
|
|
|
bool bHisCall=stdCall(hisCall);
|
|
|
|
|
2015-03-14 15:13:18 -04:00
|
|
|
QString t0=hisBase + " " + m_baseCall + " ";
|
2018-10-05 21:56:22 -04:00
|
|
|
QString t0s=hisCall + " " + my_callsign + " ";
|
2018-08-29 11:47:51 -04:00
|
|
|
QString t0a,t0b;
|
2018-10-21 14:18:46 -04:00
|
|
|
|
|
|
|
if(bHisCall and bMyCall) t0=hisCall + " " + my_callsign + " ";
|
|
|
|
t0a="<"+hisCall + "> " + my_callsign + " ";
|
|
|
|
t0b=hisCall + " <" + my_callsign + "> ";
|
2018-08-29 11:47:51 -04:00
|
|
|
|
2016-10-05 10:20:25 -04:00
|
|
|
QString t00=t0;
|
2017-07-24 15:27:23 -04:00
|
|
|
QString t {t0 + my_grid};
|
2018-10-21 14:18:46 -04:00
|
|
|
if(!bMyCall) t=t0a;
|
2012-05-22 13:09:48 -04:00
|
|
|
msgtype(t, ui->tx1);
|
2017-07-24 15:27:23 -04:00
|
|
|
if (eme_short_codes) {
|
2012-05-22 13:09:48 -04:00
|
|
|
t=t+" OOO";
|
|
|
|
msgtype(t, ui->tx2);
|
|
|
|
msgtype("RO", ui->tx3);
|
2018-11-12 12:56:20 -05:00
|
|
|
msgtype("RRR", ui->tx4);
|
2018-07-29 09:26:03 -04:00
|
|
|
msgtype("73", ui->tx5->lineEdit());
|
2012-05-22 13:09:48 -04:00
|
|
|
} else {
|
2015-11-17 20:28:12 -05:00
|
|
|
int n=rpt.toInt();
|
2020-05-06 21:56:57 -04:00
|
|
|
rpt = rpt.asprintf("%+2.2d",n);
|
2016-12-17 16:18:47 -05:00
|
|
|
|
2020-07-23 13:51:05 -04:00
|
|
|
if(m_mode=="MSK144" or m_mode=="FT8" or m_mode=="FT4" || m_mode=="FST4") {
|
2018-08-29 11:47:51 -04:00
|
|
|
QString t2,t3;
|
|
|
|
QString sent=rpt;
|
|
|
|
QString rs,rst;
|
2018-07-29 09:26:03 -04:00
|
|
|
int nn=(n+36)/6;
|
2018-07-06 15:45:00 -04:00
|
|
|
if(nn<2) nn=2;
|
|
|
|
if(nn>9) nn=9;
|
2020-05-06 21:56:57 -04:00
|
|
|
rst = rst.asprintf("5%1d9 ",nn);
|
2018-08-29 11:47:51 -04:00
|
|
|
rs=rst.mid(0,2);
|
|
|
|
t=t0;
|
2018-10-21 14:18:46 -04:00
|
|
|
if(!bMyCall) {
|
2018-10-19 21:50:09 -04:00
|
|
|
t=t0b;
|
|
|
|
msgtype(t0a, ui->tx1);
|
|
|
|
}
|
2018-10-21 14:18:46 -04:00
|
|
|
if(!bHisCall) {
|
2018-10-19 21:50:09 -04:00
|
|
|
t=t0a;
|
2018-12-31 10:37:36 -05:00
|
|
|
msgtype(t0a + my_grid, ui->tx1);
|
2018-10-19 21:50:09 -04:00
|
|
|
}
|
2018-10-30 17:06:01 -04:00
|
|
|
if(SpecOp::NA_VHF==m_config.special_op_id()) sent=my_grid;
|
2020-01-24 12:26:36 -05:00
|
|
|
if(SpecOp::WW_DIGI==m_config.special_op_id()) sent=my_grid;
|
2018-10-30 17:06:01 -04:00
|
|
|
if(SpecOp::FIELD_DAY==m_config.special_op_id()) sent=m_config.Field_Day_Exchange();
|
2020-01-24 12:26:36 -05:00
|
|
|
if(SpecOp::RTTY==m_config.special_op_id()) {
|
2018-10-30 17:06:01 -04:00
|
|
|
sent=rst + m_config.RTTY_Exchange();
|
|
|
|
QString t1=m_config.RTTY_Exchange();
|
2018-08-03 11:46:28 -04:00
|
|
|
if(t1=="DX" or t1=="#") {
|
2020-05-06 21:56:57 -04:00
|
|
|
t1 = t1.asprintf("%4.4d",ui->sbSerialNumber->value());
|
2018-08-29 11:47:51 -04:00
|
|
|
sent=rst + t1;
|
2018-08-03 11:46:28 -04:00
|
|
|
}
|
2018-07-06 15:45:00 -04:00
|
|
|
}
|
2018-10-30 17:06:01 -04:00
|
|
|
if(SpecOp::EU_VHF==m_config.special_op_id()) {
|
2020-04-21 15:50:27 -04:00
|
|
|
QString a;
|
2020-05-13 11:54:25 -04:00
|
|
|
t="<" + t0s.split(" ").at(0) + "> <" + t0s.split(" ").at(1) + "> ";
|
2020-05-06 21:56:57 -04:00
|
|
|
a = a.asprintf("%4.4d ",ui->sbSerialNumber->value());
|
2018-08-29 11:47:51 -04:00
|
|
|
sent=rs + a + m_config.my_grid();
|
2016-12-17 16:18:47 -05:00
|
|
|
}
|
2018-08-29 11:47:51 -04:00
|
|
|
msgtype(t + sent, ui->tx2);
|
|
|
|
if(sent==rpt) msgtype(t + "R" + sent, ui->tx3);
|
|
|
|
if(sent!=rpt) msgtype(t + "R " + sent, ui->tx3);
|
2019-03-22 08:49:22 -04:00
|
|
|
if(m_mode=="FT4" and SpecOp::RTTY==m_config.special_op_id()) {
|
2019-03-12 11:09:49 -04:00
|
|
|
QDateTime now=QDateTime::currentDateTimeUtc();
|
|
|
|
int sinceTx3 = m_dateTimeSentTx3.secsTo(now);
|
|
|
|
int sinceRR73 = m_dateTimeRcvdRR73.secsTo(now);
|
2019-04-03 13:15:23 -04:00
|
|
|
if(m_bDoubleClicked and (sinceTx3 < 15) and (sinceRR73 < 3)) {
|
2019-03-12 11:09:49 -04:00
|
|
|
t="TU; " + ui->tx3->text();
|
|
|
|
ui->tx3->setText(t);
|
|
|
|
}
|
|
|
|
}
|
2017-08-01 14:16:01 -04:00
|
|
|
}
|
2018-08-29 11:47:51 -04:00
|
|
|
|
2017-08-01 14:16:01 -04:00
|
|
|
if(m_mode=="MSK144" and m_bShMsgs) {
|
2018-10-05 21:56:22 -04:00
|
|
|
int i=t0s.length()-1;
|
|
|
|
t0="<" + t0s.mid(0,i) + "> ";
|
2018-10-30 17:06:01 -04:00
|
|
|
if(SpecOp::NA_VHF != m_config.special_op_id()) {
|
2017-08-01 14:16:01 -04:00
|
|
|
if(n<=-2) n=-3;
|
|
|
|
if(n>=-1 and n<=1) n=0;
|
|
|
|
if(n>=2 and n<=4) n=3;
|
|
|
|
if(n>=5 and n<=7) n=6;
|
|
|
|
if(n>=8 and n<=11) n=10;
|
|
|
|
if(n>=12 and n<=14) n=13;
|
|
|
|
if(n>=15) n=16;
|
2020-05-06 21:56:57 -04:00
|
|
|
rpt = rpt.asprintf("%+2.2d",n);
|
2016-12-17 16:18:47 -05:00
|
|
|
}
|
2016-01-22 13:10:39 -05:00
|
|
|
}
|
2018-07-06 15:05:55 -04:00
|
|
|
|
2020-08-04 06:43:19 -04:00
|
|
|
if((m_mode!="MSK144" and m_mode!="FT8" and m_mode!="FT4" && m_mode != "FST4")) {
|
2016-12-18 13:31:48 -05:00
|
|
|
t=t00 + rpt;
|
|
|
|
msgtype(t, ui->tx2);
|
2016-12-17 16:18:47 -05:00
|
|
|
t=t0 + "R" + rpt;
|
2016-12-18 13:31:48 -05:00
|
|
|
msgtype(t, ui->tx3);
|
2016-12-17 16:18:47 -05:00
|
|
|
}
|
2018-11-27 15:06:56 -05:00
|
|
|
|
|
|
|
if(m_mode=="MSK144" and m_bShMsgs) {
|
|
|
|
if(m_config.special_op_id()==SpecOp::NONE) {
|
|
|
|
t=t0 + "R" + rpt;
|
|
|
|
msgtype(t, ui->tx3);
|
|
|
|
}
|
2018-09-13 11:02:00 -04:00
|
|
|
m_send_RR73=false;
|
|
|
|
}
|
2018-07-06 15:05:55 -04:00
|
|
|
|
2017-07-25 21:39:04 -04:00
|
|
|
t=t0 + (m_send_RR73 ? "RR73" : "RRR");
|
2020-07-23 13:51:05 -04:00
|
|
|
if((m_mode=="MSK144" and !m_bShMsgs) or m_mode=="FT8" or m_mode=="FT4" || m_mode == "FST4") {
|
2018-08-29 11:47:51 -04:00
|
|
|
if(!bHisCall and bMyCall) t=hisCall + " <" + my_callsign + "> " + (m_send_RR73 ? "RR73" : "RRR");
|
|
|
|
if(bHisCall and !bMyCall) t="<" + hisCall + "> " + my_callsign + " " + (m_send_RR73 ? "RR73" : "RRR");
|
|
|
|
}
|
2017-07-24 15:27:23 -04:00
|
|
|
if ((m_mode=="JT4" || m_mode=="QRA64") && m_bShMsgs) t="@1500 (RRR)";
|
2012-05-22 13:09:48 -04:00
|
|
|
msgtype(t, ui->tx4);
|
2018-07-29 09:26:03 -04:00
|
|
|
|
2012-05-22 13:09:48 -04:00
|
|
|
t=t0 + "73";
|
2020-07-23 13:51:05 -04:00
|
|
|
if((m_mode=="MSK144" and !m_bShMsgs) or m_mode=="FT8" or m_mode=="FT4" || m_mode == "FST4") {
|
2018-08-29 11:47:51 -04:00
|
|
|
if(!bHisCall and bMyCall) t=hisCall + " <" + my_callsign + "> 73";
|
|
|
|
if(bHisCall and !bMyCall) t="<" + hisCall + "> " + my_callsign + " 73";
|
|
|
|
}
|
2017-07-24 15:27:23 -04:00
|
|
|
if (m_mode=="JT4" || m_mode=="QRA64") {
|
|
|
|
if (m_bShMsgs) t="@1750 (73)";
|
2018-07-29 09:26:03 -04:00
|
|
|
msgtype(t, ui->tx5->lineEdit());
|
2018-07-06 15:05:55 -04:00
|
|
|
} else if ("MSK144" == m_mode && m_bShMsgs) {
|
2018-07-29 09:26:03 -04:00
|
|
|
msgtype(t, ui->tx5->lineEdit());
|
|
|
|
} else if(unconditional || hisBase != m_lastCallsign || !m_lastCallsign.size ()) {
|
2017-07-24 15:27:23 -04:00
|
|
|
// only update tx5 when forced or callsign changes
|
2018-07-29 09:26:03 -04:00
|
|
|
msgtype(t, ui->tx5->lineEdit());
|
2017-07-14 13:05:14 -04:00
|
|
|
m_lastCallsign = hisBase;
|
|
|
|
}
|
2017-07-24 15:27:23 -04:00
|
|
|
}
|
2012-11-16 11:08:33 -05:00
|
|
|
|
2020-07-23 13:51:05 -04:00
|
|
|
if(m_mode=="FT8" or m_mode=="FT4" or m_mode=="MSK144" || m_mode == "FST4") return;
|
2018-07-30 11:17:09 -04:00
|
|
|
|
2017-07-24 15:27:23 -04:00
|
|
|
if (is_compound) {
|
|
|
|
if (is_type_one) {
|
|
|
|
t=hisBase + " " + my_callsign;
|
2014-10-18 20:56:41 -04:00
|
|
|
msgtype(t, ui->tx1);
|
2014-01-31 14:01:33 -05:00
|
|
|
} else {
|
2017-09-01 18:22:20 -04:00
|
|
|
t = "DE " + my_callsign + " ";
|
2015-03-04 07:22:33 -05:00
|
|
|
switch (m_config.type_2_msg_gen ())
|
|
|
|
{
|
|
|
|
case Configuration::type_2_msg_1_full:
|
2017-09-01 17:29:02 -04:00
|
|
|
msgtype(t + my_grid, ui->tx1);
|
2017-07-24 15:27:23 -04:00
|
|
|
if (!eme_short_codes) {
|
2020-08-04 06:43:19 -04:00
|
|
|
if((m_mode=="MSK144" || m_mode=="FT8" || m_mode=="FT4" || m_mode == "FST4") &&
|
2020-05-21 12:05:51 -04:00
|
|
|
SpecOp::NA_VHF == m_config.special_op_id()) {
|
2020-07-19 07:31:10 -04:00
|
|
|
msgtype(t + "R " + my_grid, ui->tx3); // #### Unreachable code
|
2018-07-11 14:27:53 -04:00
|
|
|
} else {
|
2017-09-01 17:29:02 -04:00
|
|
|
msgtype(t + "R" + rpt, ui->tx3);
|
|
|
|
}
|
2017-07-24 15:27:23 -04:00
|
|
|
if ((m_mode != "JT4" && m_mode != "QRA64") || !m_bShMsgs) {
|
2017-09-01 17:29:02 -04:00
|
|
|
msgtype(t + "73", ui->tx5->lineEdit ());
|
2017-07-24 15:27:23 -04:00
|
|
|
}
|
|
|
|
}
|
2015-03-04 07:22:33 -05:00
|
|
|
break;
|
|
|
|
|
|
|
|
case Configuration::type_2_msg_3_full:
|
2020-08-04 06:43:19 -04:00
|
|
|
if ((m_mode=="MSK144" || m_mode=="FT8" || m_mode=="FT4" || m_mode == "FST4") &&
|
2020-05-21 12:05:51 -04:00
|
|
|
SpecOp::NA_VHF == m_config.special_op_id()) {
|
2017-09-01 18:22:20 -04:00
|
|
|
msgtype(t + "R " + my_grid, ui->tx3);
|
|
|
|
msgtype(t + "RRR", ui->tx4);
|
2018-07-11 14:27:53 -04:00
|
|
|
} else {
|
2017-09-01 18:22:20 -04:00
|
|
|
msgtype(t00 + my_grid, ui->tx1);
|
|
|
|
msgtype(t + "R" + rpt, ui->tx3);
|
|
|
|
}
|
2017-07-24 15:27:23 -04:00
|
|
|
if (!eme_short_codes && ((m_mode != "JT4" && m_mode != "QRA64") || !m_bShMsgs)) {
|
2017-09-01 18:22:20 -04:00
|
|
|
msgtype(t + "73", ui->tx5->lineEdit ());
|
2017-07-24 15:27:23 -04:00
|
|
|
}
|
2015-03-04 07:22:33 -05:00
|
|
|
break;
|
|
|
|
|
|
|
|
case Configuration::type_2_msg_5_only:
|
2017-09-01 18:22:20 -04:00
|
|
|
msgtype(t00 + my_grid, ui->tx1);
|
2017-07-24 15:27:23 -04:00
|
|
|
if (!eme_short_codes) {
|
2020-08-04 06:43:19 -04:00
|
|
|
if ((m_mode=="MSK144" || m_mode=="FT8" || m_mode=="FT4" || m_mode == "FST4") &&
|
2020-05-21 12:05:51 -04:00
|
|
|
SpecOp::NA_VHF == m_config.special_op_id()) {
|
2020-07-19 07:31:10 -04:00
|
|
|
msgtype(t + "R " + my_grid, ui->tx3); // #### Unreachable code
|
2017-09-01 18:22:20 -04:00
|
|
|
msgtype(t + "RRR", ui->tx4);
|
2018-07-11 14:27:53 -04:00
|
|
|
} else {
|
2017-09-09 16:54:56 -04:00
|
|
|
msgtype(t0 + "R" + rpt, ui->tx3);
|
2017-09-01 18:22:20 -04:00
|
|
|
}
|
2017-07-24 15:27:23 -04:00
|
|
|
}
|
2017-09-09 18:59:06 -04:00
|
|
|
// don't use short codes here as in a sked with a type 2
|
|
|
|
// prefix we would never send out prefix/suffix
|
2017-09-01 18:22:20 -04:00
|
|
|
msgtype(t + "73", ui->tx5->lineEdit ());
|
2015-03-04 07:22:33 -05:00
|
|
|
break;
|
|
|
|
}
|
2014-01-31 14:01:33 -05:00
|
|
|
}
|
2017-09-25 13:02:52 -04:00
|
|
|
if (hisCall != hisBase
|
|
|
|
&& m_config.type_2_msg_gen () != Configuration::type_2_msg_5_only
|
2017-07-24 15:27:23 -04:00
|
|
|
&& !eme_short_codes) {
|
2017-09-25 13:02:52 -04:00
|
|
|
// cfm we have his full call copied as we could not do this earlier
|
2015-11-11 20:16:44 -05:00
|
|
|
t = hisCall + " 73";
|
|
|
|
msgtype(t, ui->tx5->lineEdit ());
|
|
|
|
}
|
2014-01-31 14:01:33 -05:00
|
|
|
} else {
|
2018-10-30 17:06:01 -04:00
|
|
|
if (hisCall != hisBase and SpecOp::HOUND != m_config.special_op_id()) {
|
2017-07-24 15:27:23 -04:00
|
|
|
if (shortList(hisCall)) {
|
2015-11-11 20:16:44 -05:00
|
|
|
// cfm we know his full call with a type 1 tx1 message
|
2017-07-24 15:27:23 -04:00
|
|
|
t = hisCall + " " + my_callsign;
|
2014-10-18 20:56:41 -04:00
|
|
|
msgtype(t, ui->tx1);
|
2014-01-31 14:01:33 -05:00
|
|
|
}
|
2017-07-24 15:27:23 -04:00
|
|
|
else if (!eme_short_codes
|
|
|
|
&& ("MSK144" != m_mode || !m_bShMsgs)) {
|
2015-11-11 20:16:44 -05:00
|
|
|
t=hisCall + " 73";
|
2017-07-24 15:27:23 -04:00
|
|
|
msgtype(t, ui->tx5->lineEdit ());
|
2015-11-11 20:16:44 -05:00
|
|
|
}
|
2014-01-31 14:01:33 -05:00
|
|
|
}
|
|
|
|
}
|
2013-04-07 21:50:49 -04:00
|
|
|
m_rpt=rpt;
|
2018-10-30 17:06:01 -04:00
|
|
|
if(SpecOp::HOUND == m_config.special_op_id() and is_compound) ui->tx1->setText("DE " + m_config.my_callsign());
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
|
|
|
|
2015-11-17 20:28:12 -05:00
|
|
|
void MainWindow::TxAgain()
|
|
|
|
{
|
|
|
|
auto_tx_mode(true);
|
|
|
|
}
|
|
|
|
|
2015-06-18 18:18:05 -04:00
|
|
|
void MainWindow::clearDX ()
|
|
|
|
{
|
2019-02-13 13:47:31 -05:00
|
|
|
set_dateTimeQSO (-1);
|
2019-04-15 16:26:41 -04:00
|
|
|
if (m_QSOProgress != CALLING) {
|
|
|
|
auto_tx_mode (false);
|
|
|
|
}
|
2016-07-10 18:20:30 -04:00
|
|
|
ui->dxCallEntry->clear ();
|
|
|
|
ui->dxGridEntry->clear ();
|
2017-07-24 15:27:23 -04:00
|
|
|
m_lastCallsign.clear ();
|
2016-07-10 18:20:30 -04:00
|
|
|
m_rptSent.clear ();
|
|
|
|
m_rptRcvd.clear ();
|
|
|
|
m_qsoStart.clear ();
|
|
|
|
m_qsoStop.clear ();
|
2019-03-28 09:30:26 -04:00
|
|
|
m_inQSOwith.clear();
|
2016-07-10 18:20:30 -04:00
|
|
|
genStdMsgs (QString {});
|
2020-09-05 15:11:32 -04:00
|
|
|
if (m_mode=="FT8" and SpecOp::HOUND == m_config.special_op_id()) {
|
|
|
|
m_ntx=1;
|
|
|
|
ui->txrb1->setChecked(true);
|
2017-12-15 16:36:58 -05:00
|
|
|
} else {
|
2020-09-05 15:11:32 -04:00
|
|
|
m_ntx=6;
|
|
|
|
ui->txrb6->setChecked(true);
|
2017-12-15 16:36:58 -05:00
|
|
|
}
|
2017-07-24 15:27:23 -04:00
|
|
|
m_QSOProgress = CALLING;
|
2015-06-18 18:18:05 -04:00
|
|
|
}
|
|
|
|
|
2020-06-07 13:32:18 -04:00
|
|
|
void MainWindow::lookup()
|
2012-05-22 13:09:48 -04:00
|
|
|
{
|
2016-07-10 18:20:30 -04:00
|
|
|
QString hisCall {ui->dxCallEntry->text()};
|
2020-06-04 11:32:19 -04:00
|
|
|
QString hisgrid0 {ui->dxGridEntry->text()};
|
2016-07-10 18:20:30 -04:00
|
|
|
if (!hisCall.size ()) return;
|
2017-07-07 19:11:41 -04:00
|
|
|
QFile f {m_config.writeable_data_dir ().absoluteFilePath ("CALL3.TXT")};
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
if (f.open (QIODevice::ReadOnly | QIODevice::Text))
|
|
|
|
{
|
|
|
|
char c[132];
|
|
|
|
qint64 n=0;
|
|
|
|
for(int i=0; i<999999; i++) {
|
|
|
|
n=f.readLine(c,sizeof(c));
|
|
|
|
if(n <= 0) {
|
2020-06-04 11:32:19 -04:00
|
|
|
if(!hisgrid0.contains(grid_regexp)) {
|
|
|
|
ui->dxGridEntry->clear();
|
|
|
|
}
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
QString t=QString(c);
|
|
|
|
if(t.indexOf(hisCall)==0) {
|
|
|
|
int i1=t.indexOf(",");
|
|
|
|
QString hisgrid=t.mid(i1+1,6);
|
|
|
|
i1=hisgrid.indexOf(",");
|
|
|
|
if(i1>0) {
|
|
|
|
hisgrid=hisgrid.mid(0,4);
|
|
|
|
} else {
|
2020-06-04 11:32:19 -04:00
|
|
|
hisgrid=hisgrid.mid(0,6).toUpper();
|
|
|
|
}
|
|
|
|
if(hisgrid.left(4)==hisgrid0.left(4) or (hisgrid0.size()==0)) {
|
|
|
|
ui->dxGridEntry->setText(hisgrid);
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
f.close();
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void MainWindow::on_lookupButton_clicked() //Lookup button
|
|
|
|
{
|
2020-06-07 13:32:18 -04:00
|
|
|
lookup();
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void MainWindow::on_addButton_clicked() //Add button
|
|
|
|
{
|
2016-07-10 18:20:30 -04:00
|
|
|
if(!ui->dxGridEntry->text ().size ()) {
|
2016-07-03 16:31:19 -04:00
|
|
|
MessageBox::warning_message (this, tr ("Add to CALL3.TXT")
|
|
|
|
, tr ("Please enter a valid grid locator"));
|
2012-10-27 14:06:48 -04:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
m_call3Modified=false;
|
2016-07-10 18:20:30 -04:00
|
|
|
QString hisCall=ui->dxCallEntry->text();
|
|
|
|
QString hisgrid=ui->dxGridEntry->text();
|
2013-04-08 14:31:21 -04:00
|
|
|
QString newEntry=hisCall + "," + hisgrid;
|
2012-10-27 14:06:48 -04:00
|
|
|
|
2016-07-03 16:31:19 -04:00
|
|
|
// int ret = MessageBox::query_message(this, tr ("Add to CALL3.TXT"),
|
|
|
|
// tr ("Is %1 known to be active on EME?").arg (newEntry));
|
|
|
|
// if(ret==MessageBox::Yes) {
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
// newEntry += ",EME,,";
|
|
|
|
// } else {
|
|
|
|
newEntry += ",,,";
|
|
|
|
// }
|
|
|
|
|
2017-07-07 19:11:41 -04:00
|
|
|
QFile f1 {m_config.writeable_data_dir ().absoluteFilePath ("CALL3.TXT")};
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
if(!f1.open(QIODevice::ReadWrite | QIODevice::Text)) {
|
2016-07-03 16:31:19 -04:00
|
|
|
MessageBox::warning_message (this, tr ("Add to CALL3.TXT")
|
|
|
|
, tr ("Cannot open \"%1\" for read/write: %2")
|
|
|
|
.arg (f1.fileName ()).arg (f1.errorString ()));
|
2012-10-27 14:06:48 -04:00
|
|
|
return;
|
|
|
|
}
|
2013-03-19 09:18:23 -04:00
|
|
|
if(f1.size()==0) {
|
|
|
|
QTextStream out(&f1);
|
2020-06-13 11:04:41 -04:00
|
|
|
out << "ZZZZZZ"
|
|
|
|
#if QT_VERSION >= QT_VERSION_CHECK (5, 15, 0)
|
|
|
|
<< Qt::endl
|
|
|
|
#else
|
|
|
|
<< endl
|
|
|
|
#endif
|
|
|
|
;
|
2013-03-19 09:18:23 -04:00
|
|
|
f1.close();
|
|
|
|
f1.open(QIODevice::ReadOnly | QIODevice::Text);
|
|
|
|
}
|
2017-07-07 19:11:41 -04:00
|
|
|
QFile f2 {m_config.writeable_data_dir ().absoluteFilePath ("CALL3.TMP")};
|
2012-10-27 14:06:48 -04:00
|
|
|
if(!f2.open(QIODevice::WriteOnly | QIODevice::Text)) {
|
2016-07-03 16:31:19 -04:00
|
|
|
MessageBox::warning_message (this, tr ("Add to CALL3.TXT")
|
|
|
|
, tr ("Cannot open \"%1\" for writing: %2")
|
|
|
|
.arg (f2.fileName ()).arg (f2.errorString ()));
|
2012-10-27 14:06:48 -04:00
|
|
|
return;
|
|
|
|
}
|
2014-11-25 09:39:15 -05:00
|
|
|
QTextStream in(&f1); //Read from CALL3.TXT
|
|
|
|
QTextStream out(&f2); //Copy into CALL3.TMP
|
2013-04-08 14:31:21 -04:00
|
|
|
QString hc=hisCall;
|
2012-10-27 14:06:48 -04:00
|
|
|
QString hc1="";
|
2014-11-25 09:39:15 -05:00
|
|
|
QString hc2="000000";
|
2012-10-27 14:06:48 -04:00
|
|
|
QString s;
|
|
|
|
do {
|
|
|
|
s=in.readLine();
|
|
|
|
hc1=hc2;
|
|
|
|
if(s.mid(0,2)=="//") {
|
2017-02-28 14:13:49 -05:00
|
|
|
out << s + QChar::LineFeed; //Copy all comment lines
|
2012-10-27 14:06:48 -04:00
|
|
|
} else {
|
|
|
|
int i1=s.indexOf(",");
|
|
|
|
hc2=s.mid(0,i1);
|
|
|
|
if(hc>hc1 && hc<hc2) {
|
2017-02-28 14:13:49 -05:00
|
|
|
out << newEntry + QChar::LineFeed;
|
|
|
|
out << s + QChar::LineFeed;
|
2012-10-27 14:06:48 -04:00
|
|
|
m_call3Modified=true;
|
|
|
|
} else if(hc==hc2) {
|
2016-07-03 16:31:19 -04:00
|
|
|
QString t {tr ("%1\nis already in CALL3.TXT"
|
|
|
|
", do you wish to replace it?").arg (s)};
|
|
|
|
int ret = MessageBox::query_message (this, tr ("Add to CALL3.TXT"), t);
|
|
|
|
if(ret==MessageBox::Yes) {
|
2017-02-28 14:13:49 -05:00
|
|
|
out << newEntry + QChar::LineFeed;
|
2012-10-27 14:06:48 -04:00
|
|
|
m_call3Modified=true;
|
|
|
|
}
|
|
|
|
} else {
|
2017-02-28 14:13:49 -05:00
|
|
|
if(s!="") out << s + QChar::LineFeed;
|
2012-10-27 14:06:48 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
} while(!s.isNull());
|
|
|
|
|
|
|
|
f1.close();
|
2017-02-28 14:13:49 -05:00
|
|
|
if(hc>hc1 && !m_call3Modified) out << newEntry + QChar::LineFeed;
|
2012-10-27 14:06:48 -04:00
|
|
|
if(m_call3Modified) {
|
2017-07-07 19:11:41 -04:00
|
|
|
QFile f0 {m_config.writeable_data_dir ().absoluteFilePath ("CALL3.OLD")};
|
2012-10-27 14:06:48 -04:00
|
|
|
if(f0.exists()) f0.remove();
|
2017-07-07 19:11:41 -04:00
|
|
|
QFile f1 {m_config.writeable_data_dir ().absoluteFilePath ("CALL3.TXT")};
|
|
|
|
f1.rename(m_config.writeable_data_dir ().absoluteFilePath ("CALL3.OLD"));
|
|
|
|
f2.rename(m_config.writeable_data_dir ().absoluteFilePath ("CALL3.TXT"));
|
2012-10-27 14:06:48 -04:00
|
|
|
f2.close();
|
|
|
|
}
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
|
|
|
|
2012-11-16 11:42:28 -05:00
|
|
|
void MainWindow::msgtype(QString t, QLineEdit* tx) //msgtype()
|
2012-05-22 13:09:48 -04:00
|
|
|
{
|
2018-07-06 12:52:39 -04:00
|
|
|
// Set background colors of the Tx message boxes, depending on message type
|
|
|
|
char message[38];
|
|
|
|
char msgsent[38];
|
2012-05-22 13:09:48 -04:00
|
|
|
QByteArray s=t.toUpper().toLocal8Bit();
|
|
|
|
ba2msg(s,message);
|
2014-10-18 20:56:41 -04:00
|
|
|
int ichk=1,itype=0;
|
2018-07-10 09:04:01 -04:00
|
|
|
gen65_(message,&ichk,msgsent,const_cast<int*>(itone0),&itype,22,22);
|
2012-11-24 12:03:54 -05:00
|
|
|
msgsent[22]=0;
|
|
|
|
bool text=false;
|
2017-01-02 09:22:29 -05:00
|
|
|
bool shortMsg=false;
|
2014-10-18 20:56:41 -04:00
|
|
|
if(itype==6) text=true;
|
2018-07-11 14:27:53 -04:00
|
|
|
|
|
|
|
//### Check this stuff ###
|
|
|
|
if(itype==7 and m_config.enable_VHF_features() and m_mode=="JT65") shortMsg=true;
|
2016-09-13 13:52:45 -04:00
|
|
|
if(m_mode=="MSK144" and t.mid(0,1)=="<") text=false;
|
2020-05-21 12:05:51 -04:00
|
|
|
if((m_mode=="MSK144" or m_mode=="FT8" or m_mode=="FT4") and
|
|
|
|
SpecOp::NA_VHF==m_config.special_op_id()) {
|
2016-12-17 16:18:47 -05:00
|
|
|
int i0=t.trimmed().length()-7;
|
|
|
|
if(t.mid(i0,3)==" R ") text=false;
|
|
|
|
}
|
2018-10-21 14:18:46 -04:00
|
|
|
text=false;
|
2018-07-11 14:27:53 -04:00
|
|
|
//### ... to here ...
|
2018-07-06 15:45:00 -04:00
|
|
|
|
2018-07-30 11:17:09 -04:00
|
|
|
|
2012-05-22 13:09:48 -04:00
|
|
|
QPalette p(tx->palette());
|
2012-11-24 12:03:54 -05:00
|
|
|
if(text) {
|
2018-07-30 11:17:09 -04:00
|
|
|
p.setColor(QPalette::Base,"#ffccff"); //pink
|
2012-05-22 13:09:48 -04:00
|
|
|
} else {
|
2017-01-02 09:22:29 -05:00
|
|
|
if(shortMsg) {
|
2018-07-30 11:17:09 -04:00
|
|
|
p.setColor(QPalette::Base,"#66ffff"); //light blue
|
2016-03-24 11:44:48 -04:00
|
|
|
} else {
|
2018-01-23 09:54:49 -05:00
|
|
|
p.setColor(QPalette::Base,Qt::transparent);
|
2021-02-23 21:21:31 -05:00
|
|
|
if ("MSK144" == m_mode && t.count ('<') == 1) {
|
2018-07-30 11:17:09 -04:00
|
|
|
p.setColor(QPalette::Base,"#00ffff"); //another light blue
|
2016-06-03 11:45:54 -04:00
|
|
|
}
|
2016-03-24 11:44:48 -04:00
|
|
|
}
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
|
|
|
tx->setPalette(p);
|
2018-07-30 11:17:09 -04:00
|
|
|
|
2014-05-22 07:09:21 -04:00
|
|
|
auto pos = tx->cursorPosition ();
|
2016-11-05 15:41:03 -04:00
|
|
|
tx->setText(t.toUpper());
|
2014-05-22 07:09:21 -04:00
|
|
|
tx->setCursorPosition (pos);
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void MainWindow::on_tx1_editingFinished() //tx1 edited
|
|
|
|
{
|
|
|
|
QString t=ui->tx1->text();
|
|
|
|
msgtype(t, ui->tx1);
|
|
|
|
}
|
|
|
|
|
|
|
|
void MainWindow::on_tx2_editingFinished() //tx2 edited
|
|
|
|
{
|
|
|
|
QString t=ui->tx2->text();
|
|
|
|
msgtype(t, ui->tx2);
|
|
|
|
}
|
|
|
|
|
|
|
|
void MainWindow::on_tx3_editingFinished() //tx3 edited
|
|
|
|
{
|
|
|
|
QString t=ui->tx3->text();
|
|
|
|
msgtype(t, ui->tx3);
|
|
|
|
}
|
|
|
|
|
|
|
|
void MainWindow::on_tx4_editingFinished() //tx4 edited
|
|
|
|
{
|
|
|
|
QString t=ui->tx4->text();
|
|
|
|
msgtype(t, ui->tx4);
|
|
|
|
}
|
|
|
|
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
void MainWindow::on_tx5_currentTextChanged (QString const& text) //tx5 edited
|
2012-05-22 13:09:48 -04:00
|
|
|
{
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
msgtype(text, ui->tx5->lineEdit ());
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void MainWindow::on_tx6_editingFinished() //tx6 edited
|
|
|
|
{
|
2017-08-25 12:59:58 -04:00
|
|
|
QString t=ui->tx6->text().toUpper();
|
2017-11-21 15:08:10 -05:00
|
|
|
if(t.indexOf(" ")>0) {
|
|
|
|
QString t1=t.split(" ").at(1);
|
2018-12-27 13:14:01 -05:00
|
|
|
QRegExp AZ4("^[A-Z]{1,4}$");
|
|
|
|
QRegExp NN3("^[0-9]{1,3}$");
|
2017-11-21 15:08:10 -05:00
|
|
|
m_CQtype="CQ";
|
2018-12-27 13:14:01 -05:00
|
|
|
if(t1.size()<=4 and t1.contains(AZ4)) m_CQtype="CQ " + t1;
|
|
|
|
if(t1.size()<=3 and t1.contains(NN3)) m_CQtype="CQ " + t1;
|
2017-11-21 15:08:10 -05:00
|
|
|
}
|
2012-05-22 13:09:48 -04:00
|
|
|
msgtype(t, ui->tx6);
|
|
|
|
}
|
|
|
|
|
2020-07-03 14:17:13 -04:00
|
|
|
void MainWindow::on_RoundRobin_currentTextChanged(QString text)
|
|
|
|
{
|
2020-08-08 16:25:32 -04:00
|
|
|
ui->sbTxPercent->setEnabled (text == tr ("Random"));
|
2020-07-03 14:17:13 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2016-07-10 18:20:30 -04:00
|
|
|
void MainWindow::on_dxCallEntry_textChanged (QString const& call)
|
2012-05-22 13:09:48 -04:00
|
|
|
{
|
2016-07-10 18:20:30 -04:00
|
|
|
m_hisCall = call;
|
2020-06-07 13:02:27 -04:00
|
|
|
ui->dxGridEntry->clear();
|
2013-03-18 09:24:50 -04:00
|
|
|
statusChanged();
|
2016-05-24 06:08:35 -04:00
|
|
|
statusUpdate ();
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
|
|
|
|
2016-11-07 08:47:09 -05:00
|
|
|
void MainWindow::on_dxCallEntry_returnPressed ()
|
|
|
|
{
|
|
|
|
on_lookupButton_clicked();
|
|
|
|
}
|
|
|
|
|
2016-07-10 18:20:30 -04:00
|
|
|
void MainWindow::on_dxGridEntry_textChanged (QString const& grid)
|
2012-05-22 13:09:48 -04:00
|
|
|
{
|
2016-07-10 18:20:30 -04:00
|
|
|
if (ui->dxGridEntry->hasAcceptableInput ()) {
|
|
|
|
if (grid != m_hisGrid) {
|
|
|
|
m_hisGrid = grid;
|
|
|
|
statusUpdate ();
|
|
|
|
}
|
2016-10-13 14:02:44 -04:00
|
|
|
qint64 nsec = (QDateTime::currentMSecsSinceEpoch()/1000) % 86400;
|
2013-03-23 11:41:31 -04:00
|
|
|
double utch=nsec/3600.0;
|
|
|
|
int nAz,nEl,nDmiles,nDkm,nHotAz,nHotABetter;
|
2016-06-11 19:53:18 -04:00
|
|
|
azdist_(const_cast <char *> ((m_config.my_grid () + " ").left (6).toLatin1().constData()),
|
|
|
|
const_cast <char *> ((m_hisGrid + " ").left (6).toLatin1().constData()),&utch,
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
&nAz,&nEl,&nDmiles,&nDkm,&nHotAz,&nHotABetter,6,6);
|
2013-03-23 11:41:31 -04:00
|
|
|
QString t;
|
2016-10-13 14:02:44 -04:00
|
|
|
int nd=nDkm;
|
|
|
|
if(m_config.miles()) nd=nDmiles;
|
|
|
|
if(m_mode=="MSK144") {
|
2020-05-06 21:56:57 -04:00
|
|
|
if(nHotABetter==0)t = t.asprintf("Az: %d B: %d El: %d %d",nAz,nHotAz,nEl,nd);
|
|
|
|
if(nHotABetter!=0)t = t.asprintf("Az: %d A: %d El: %d %d",nAz,nHotAz,nEl,nd);
|
2016-10-13 14:02:44 -04:00
|
|
|
} else {
|
2020-05-06 21:56:57 -04:00
|
|
|
t = t.asprintf("Az: %d %d",nAz,nd);
|
2016-10-13 14:02:44 -04:00
|
|
|
}
|
|
|
|
if(m_config.miles()) t += " mi";
|
|
|
|
if(!m_config.miles()) t += " km";
|
2016-07-11 19:35:24 -04:00
|
|
|
ui->labAz->setText (t);
|
2016-10-13 14:02:44 -04:00
|
|
|
} else {
|
|
|
|
if (m_hisGrid.size ()) {
|
|
|
|
m_hisGrid.clear ();
|
|
|
|
ui->labAz->clear ();
|
|
|
|
statusUpdate ();
|
|
|
|
}
|
2016-07-10 18:20:30 -04:00
|
|
|
}
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void MainWindow::on_genStdMsgsPushButton_clicked() //genStdMsgs button
|
|
|
|
{
|
2013-04-08 14:31:21 -04:00
|
|
|
genStdMsgs(m_rpt);
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void MainWindow::on_logQSOButton_clicked() //Log QSO button
|
|
|
|
{
|
2020-10-14 15:59:32 -04:00
|
|
|
if (SpecOp::FOX != m_config.special_op_id ()
|
|
|
|
&& ui->cbAutoSeq->isVisible () && ui->cbAutoSeq->isEnabled () && ui->cbAutoSeq->isChecked ())
|
2019-08-12 19:20:40 -04:00
|
|
|
{
|
|
|
|
// ensure that auto Tx is disabled even if clear DX call & grid
|
|
|
|
// on 73 is not checked, unless in Fox mode where it is allowed
|
|
|
|
// to be a robot.
|
|
|
|
auto_tx_mode (false);
|
|
|
|
}
|
|
|
|
|
2018-01-22 14:45:51 -05:00
|
|
|
if (!m_hisCall.size ()) {
|
|
|
|
MessageBox::warning_message (this, tr ("Warning: DX Call field is empty."));
|
|
|
|
}
|
2016-12-30 10:45:31 -05:00
|
|
|
// m_dateTimeQSOOn should really already be set but we'll ensure it gets set to something just in case
|
2017-07-09 16:45:53 -04:00
|
|
|
if (!m_dateTimeQSOOn.isValid ()) {
|
|
|
|
m_dateTimeQSOOn = QDateTime::currentDateTimeUtc();
|
|
|
|
}
|
|
|
|
auto dateTimeQSOOff = QDateTime::currentDateTimeUtc();
|
|
|
|
if (dateTimeQSOOff < m_dateTimeQSOOn) dateTimeQSOOff = m_dateTimeQSOOn;
|
2018-05-11 08:24:15 -04:00
|
|
|
QString grid=m_hisGrid;
|
|
|
|
if(grid=="....") grid="";
|
2018-10-30 17:06:01 -04:00
|
|
|
|
|
|
|
switch( m_config.special_op_id() )
|
|
|
|
{
|
|
|
|
case SpecOp::NA_VHF:
|
|
|
|
m_xSent=m_config.my_grid().left(4);
|
|
|
|
m_xRcvd=m_hisGrid;
|
|
|
|
break;
|
|
|
|
case SpecOp::EU_VHF:
|
|
|
|
m_rptSent=m_xSent.split(" ").at(0).left(2);
|
|
|
|
m_rptRcvd=m_xRcvd.split(" ").at(0).left(2);
|
2020-04-22 11:51:30 -04:00
|
|
|
if(m_xRcvd.split(" ").size()>=2) m_hisGrid=m_xRcvd.split(" ").at(1);
|
2018-10-30 17:06:01 -04:00
|
|
|
grid=m_hisGrid;
|
|
|
|
ui->dxGridEntry->setText(grid);
|
|
|
|
break;
|
|
|
|
case SpecOp::FIELD_DAY:
|
|
|
|
m_rptSent=m_xSent.split(" ").at(0);
|
|
|
|
m_rptRcvd=m_xRcvd.split(" ").at(0);
|
|
|
|
break;
|
|
|
|
case SpecOp::RTTY:
|
|
|
|
m_rptSent=m_xSent.split(" ").at(0);
|
|
|
|
m_rptRcvd=m_xRcvd.split(" ").at(0);
|
|
|
|
break;
|
2020-01-24 12:26:36 -05:00
|
|
|
case SpecOp::WW_DIGI:
|
|
|
|
m_xSent=m_config.my_grid().left(4);
|
|
|
|
m_xRcvd=m_hisGrid;
|
|
|
|
break;
|
2018-10-31 16:53:10 -04:00
|
|
|
default: break;
|
2018-10-30 17:06:01 -04:00
|
|
|
}
|
|
|
|
|
2018-11-02 16:25:47 -04:00
|
|
|
m_logDlg->initLogQSO (m_hisCall, grid, m_modeTx, m_rptSent, m_rptRcvd,
|
|
|
|
m_dateTimeQSOOn, dateTimeQSOOff, m_freqNominal +
|
2019-05-29 18:35:18 -04:00
|
|
|
ui->TxFreqSpinBox->value(), m_noSuffix, m_xSent, m_xRcvd);
|
2019-03-07 14:36:58 -05:00
|
|
|
m_inQSOwith="";
|
2013-04-28 09:35:01 -04:00
|
|
|
}
|
|
|
|
|
2018-02-04 17:42:35 -05:00
|
|
|
void MainWindow::acceptQSO (QDateTime const& QSO_date_off, QString const& call, QString const& grid
|
2015-04-15 12:40:49 -04:00
|
|
|
, Frequency dial_freq, QString const& mode
|
|
|
|
, QString const& rpt_sent, QString const& rpt_received
|
|
|
|
, QString const& tx_power, QString const& comments
|
2018-02-04 17:42:35 -05:00
|
|
|
, QString const& name, QDateTime const& QSO_date_on, QString const& operator_call
|
2018-12-02 10:09:37 -05:00
|
|
|
, QString const& my_call, QString const& my_grid
|
|
|
|
, QString const& exchange_sent, QString const& exchange_rcvd
|
2020-06-25 13:58:47 -04:00
|
|
|
, QString const& propmode, QByteArray const& ADIF)
|
2013-04-28 09:35:01 -04:00
|
|
|
{
|
2017-07-07 09:13:22 -04:00
|
|
|
QString date = QSO_date_on.toString("yyyyMMdd");
|
2019-09-17 16:04:34 -04:00
|
|
|
if (!m_logBook.add (call, grid, m_config.bands()->find(dial_freq), mode, ADIF))
|
2018-10-24 19:00:19 -04:00
|
|
|
{
|
|
|
|
MessageBox::warning_message (this, tr ("Log file error"),
|
|
|
|
tr ("Cannot open \"%1\"").arg (m_logBook.path ()));
|
|
|
|
}
|
2013-09-06 01:00:28 -04:00
|
|
|
|
2018-10-24 19:00:19 -04:00
|
|
|
m_messageClient->qso_logged (QSO_date_off, call, grid, dial_freq, mode, rpt_sent, rpt_received
|
2018-12-02 10:09:37 -05:00
|
|
|
, tx_power, comments, name, QSO_date_on, operator_call, my_call, my_grid
|
2020-06-25 13:58:47 -04:00
|
|
|
, exchange_sent, exchange_rcvd, propmode);
|
2018-02-04 17:42:35 -05:00
|
|
|
m_messageClient->logged_ADIF (ADIF);
|
2018-10-24 19:00:19 -04:00
|
|
|
|
|
|
|
// Log to N1MM Logger
|
|
|
|
if (m_config.broadcast_to_n1mm () && m_config.valid_n1mm_info ())
|
|
|
|
{
|
|
|
|
QUdpSocket sock;
|
|
|
|
if (-1 == sock.writeDatagram (ADIF + " <eor>"
|
|
|
|
, QHostAddress {m_config.n1mm_server_name ()}
|
|
|
|
, m_config.n1mm_server_port ()))
|
|
|
|
{
|
|
|
|
MessageBox::warning_message (this, tr ("Error sending log to N1MM"),
|
|
|
|
tr ("Write returned \"%1\"").arg (sock.errorString ()));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-04-15 16:26:41 -04:00
|
|
|
if(m_config.clear_DX () and SpecOp::HOUND != m_config.special_op_id()) clearDX ();
|
2017-07-09 16:45:53 -04:00
|
|
|
m_dateTimeQSOOn = QDateTime {};
|
2018-11-22 20:18:39 -05:00
|
|
|
auto special_op = m_config.special_op_id ();
|
2020-01-24 12:26:36 -05:00
|
|
|
if (SpecOp::NONE < special_op && special_op < SpecOp::FOX) {
|
2019-02-28 11:21:06 -05:00
|
|
|
ui->sbSerialNumber->setValue(ui->sbSerialNumber->value() + 1);
|
|
|
|
}
|
2018-11-22 20:18:39 -05:00
|
|
|
|
|
|
|
m_xSent.clear ();
|
|
|
|
m_xRcvd.clear ();
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|
2012-09-24 15:11:31 -04:00
|
|
|
|
2017-12-18 16:50:00 -05:00
|
|
|
qint64 MainWindow::nWidgets(QString t)
|
2016-10-20 15:25:48 -04:00
|
|
|
{
|
2016-12-30 16:46:29 -05:00
|
|
|
Q_ASSERT(t.length()==N_WIDGETS);
|
2017-12-18 16:50:00 -05:00
|
|
|
qint64 n=0;
|
2016-12-30 16:46:29 -05:00
|
|
|
for(int i=0; i<N_WIDGETS; i++) {
|
2016-10-20 15:25:48 -04:00
|
|
|
n=n + n + t.mid(i,1).toInt();
|
|
|
|
}
|
|
|
|
return n;
|
|
|
|
}
|
|
|
|
|
2017-12-18 16:50:00 -05:00
|
|
|
void MainWindow::displayWidgets(qint64 n)
|
2016-10-20 15:25:48 -04:00
|
|
|
{
|
2018-02-28 08:50:58 -05:00
|
|
|
/* See text file "displayWidgets.txt" for widget numbers */
|
2017-12-18 16:50:00 -05:00
|
|
|
qint64 j=qint64(1)<<(N_WIDGETS-1);
|
2016-10-20 15:25:48 -04:00
|
|
|
bool b;
|
2016-12-30 16:46:29 -05:00
|
|
|
for(int i=0; i<N_WIDGETS; i++) {
|
2017-12-18 16:50:00 -05:00
|
|
|
b=(n&j) != 0;
|
2016-10-20 15:25:48 -04:00
|
|
|
if(i==0) ui->txFirstCheckBox->setVisible(b);
|
|
|
|
if(i==1) ui->TxFreqSpinBox->setVisible(b);
|
2016-10-21 11:32:05 -04:00
|
|
|
if(i==2) ui->RxFreqSpinBox->setVisible(b);
|
|
|
|
if(i==3) ui->sbFtol->setVisible(b);
|
|
|
|
if(i==4) ui->rptSpinBox->setVisible(b);
|
|
|
|
if(i==5) ui->sbTR->setVisible(b);
|
2016-10-30 19:52:25 -04:00
|
|
|
if(i==6) {
|
2018-03-18 16:42:11 -04:00
|
|
|
ui->sbCQTxFreq->setVisible (b);
|
|
|
|
ui->cbCQTx->setVisible (b);
|
|
|
|
auto is_compound = m_config.my_callsign () != m_baseCall;
|
|
|
|
ui->cbCQTx->setEnabled (b && (!is_compound || shortList (m_config.my_callsign ())));
|
2016-10-30 19:52:25 -04:00
|
|
|
}
|
2016-10-21 11:32:05 -04:00
|
|
|
if(i==7) ui->cbShMsgs->setVisible(b);
|
|
|
|
if(i==8) ui->cbFast9->setVisible(b);
|
|
|
|
if(i==9) ui->cbAutoSeq->setVisible(b);
|
|
|
|
if(i==10) ui->cbTx6->setVisible(b);
|
|
|
|
if(i==11) ui->pbTxMode->setVisible(b);
|
|
|
|
if(i==12) ui->pbR2T->setVisible(b);
|
|
|
|
if(i==13) ui->pbT2R->setVisible(b);
|
2017-09-30 13:48:46 -04:00
|
|
|
if(i==14) ui->cbHoldTxFreq->setVisible(b);
|
2016-10-21 11:32:05 -04:00
|
|
|
if(i==15) ui->sbSubmode->setVisible(b);
|
|
|
|
if(i==16) ui->syncSpinBox->setVisible(b);
|
|
|
|
if(i==17) ui->WSPR_controls_widget->setVisible(b);
|
|
|
|
if(i==18) ui->ClrAvgButton->setVisible(b);
|
|
|
|
if(i==19) ui->actionQuickDecode->setEnabled(b);
|
|
|
|
if(i==19) ui->actionMediumDecode->setEnabled(b);
|
|
|
|
if(i==19) ui->actionDeepestDecode->setEnabled(b);
|
2017-07-26 06:56:12 -04:00
|
|
|
if(i==20) ui->actionInclude_averaging->setVisible (b);
|
|
|
|
if(i==21) ui->actionInclude_correlation->setVisible (b);
|
2016-10-21 11:32:05 -04:00
|
|
|
if(i==22) {
|
2017-09-28 11:09:46 -04:00
|
|
|
if(!b && m_echoGraph->isVisible()) m_echoGraph->hide();
|
2016-10-21 11:32:05 -04:00
|
|
|
}
|
2017-12-18 15:38:40 -05:00
|
|
|
if(i==23) ui->cbSWL->setVisible(b);
|
2017-12-02 11:04:52 -05:00
|
|
|
if(i==24) ui->actionEnable_AP_FT8->setVisible (b);
|
|
|
|
if(i==25) ui->actionEnable_AP_JT65->setVisible (b);
|
|
|
|
if(i==26) ui->actionEnable_AP_DXcall->setVisible (b);
|
2017-12-19 10:18:56 -05:00
|
|
|
if(i==27) ui->cbFirst->setVisible(b);
|
2018-10-04 14:50:02 -04:00
|
|
|
if(i==28) ui->labNextCall->setVisible(b);
|
2017-12-19 10:18:56 -05:00
|
|
|
if(i==29) ui->measure_check_box->setVisible(b);
|
|
|
|
if(i==30) ui->labDXped->setVisible(b);
|
|
|
|
if(i==31) ui->cbRxAll->setVisible(b);
|
2018-02-28 08:50:58 -05:00
|
|
|
if(i==32) ui->cbCQonly->setVisible(b);
|
2020-07-23 13:51:05 -04:00
|
|
|
if(i==33) ui->sbTR_FST4W->setVisible(b);
|
2020-11-16 19:55:24 -05:00
|
|
|
if (34 == i) // adjust the stacked widget
|
|
|
|
{
|
|
|
|
ui->opt_controls_stack->setCurrentIndex (b ? 1 : 0);
|
|
|
|
ui->sbF_Low->setVisible(b);
|
|
|
|
}
|
2020-09-16 17:02:40 -04:00
|
|
|
if(i==35) ui->sbF_High->setVisible(b);
|
2016-10-20 15:25:48 -04:00
|
|
|
j=j>>1;
|
|
|
|
}
|
2019-04-08 12:36:05 -04:00
|
|
|
ui->pbBestSP->setVisible(m_mode=="FT4");
|
2019-04-23 20:20:45 -04:00
|
|
|
b=false;
|
|
|
|
if(m_mode=="FT4" or m_mode=="FT8") {
|
2020-01-24 12:26:36 -05:00
|
|
|
b=SpecOp::EU_VHF==m_config.special_op_id() or
|
|
|
|
( SpecOp::RTTY==m_config.special_op_id() and
|
|
|
|
(m_config.RTTY_Exchange()=="DX" or m_config.RTTY_Exchange()=="#") );
|
2019-04-23 20:20:45 -04:00
|
|
|
}
|
2019-04-24 09:30:02 -04:00
|
|
|
if(m_mode=="MSK144") b=SpecOp::EU_VHF==m_config.special_op_id();
|
2018-07-06 14:29:36 -04:00
|
|
|
ui->sbSerialNumber->setVisible(b);
|
2017-07-24 15:27:23 -04:00
|
|
|
m_lastCallsign.clear (); // ensures Tx5 is updated for new modes
|
2020-07-23 13:51:05 -04:00
|
|
|
b=m_mode.startsWith("FST4");
|
2020-07-23 10:58:10 -04:00
|
|
|
ui->sbNB->setVisible(b);
|
2017-07-24 15:27:23 -04:00
|
|
|
genStdMsgs (m_rpt, true);
|
2016-10-20 15:25:48 -04:00
|
|
|
}
|
|
|
|
|
2020-07-23 13:51:05 -04:00
|
|
|
void MainWindow::on_actionFST4_triggered()
|
2020-06-16 14:58:08 -04:00
|
|
|
{
|
2020-07-23 13:51:05 -04:00
|
|
|
m_mode="FST4";
|
|
|
|
m_modeTx="FST4";
|
|
|
|
ui->actionFST4->setChecked(true);
|
2020-09-12 09:35:32 -04:00
|
|
|
m_bFast9=false;
|
|
|
|
m_bFastMode=false;
|
|
|
|
m_fastGraph->hide();
|
|
|
|
m_wideGraph->show();
|
2020-09-05 11:53:23 -04:00
|
|
|
m_nsps=6912; //For symspec only
|
|
|
|
m_FFTSize = m_nsps / 2;
|
|
|
|
Q_EMIT FFTSize(m_FFTSize);
|
2020-10-03 19:46:59 -04:00
|
|
|
ui->lh_decodes_title_label->setText(tr ("Band Activity"));
|
|
|
|
ui->rh_decodes_title_label->setText(tr ("Rx Frequency"));
|
2020-06-16 14:58:08 -04:00
|
|
|
WSPR_config(false);
|
2020-09-16 20:16:32 -04:00
|
|
|
if(m_config.single_decode()) {
|
|
|
|
// 012345678901234567890123456789012345
|
|
|
|
displayWidgets(nWidgets("111111000100111000010000000100000000"));
|
|
|
|
m_wideGraph->setSingleDecode(true);
|
|
|
|
} else {
|
2020-09-17 12:58:59 -04:00
|
|
|
displayWidgets(nWidgets("111011000100111000010000000100000011"));
|
2020-09-16 20:16:32 -04:00
|
|
|
m_wideGraph->setSingleDecode(false);
|
2020-09-17 12:58:59 -04:00
|
|
|
ui->sbFtol->setValue(20);
|
2020-09-16 20:16:32 -04:00
|
|
|
}
|
2020-09-05 10:34:55 -04:00
|
|
|
setup_status_bar(false);
|
2020-06-20 13:47:32 -04:00
|
|
|
ui->cbAutoSeq->setChecked(true);
|
2020-06-21 10:34:24 -04:00
|
|
|
m_wideGraph->setMode(m_mode);
|
|
|
|
m_wideGraph->setModeTx(m_modeTx);
|
2020-07-02 13:43:50 -04:00
|
|
|
m_wideGraph->setPeriod(m_TRperiod,6912);
|
2020-09-14 10:56:54 -04:00
|
|
|
m_wideGraph->setRxFreq(ui->RxFreqSpinBox->value());
|
2020-09-14 13:55:30 -04:00
|
|
|
m_wideGraph->setTol(ui->sbFtol->value());
|
2020-07-17 12:00:15 -04:00
|
|
|
m_wideGraph->setTxFreq(ui->TxFreqSpinBox->value());
|
2020-09-16 17:02:40 -04:00
|
|
|
m_wideGraph->setFST4_FreqRange(ui->sbF_Low->value(),ui->sbF_High->value());
|
2020-09-18 11:30:23 -04:00
|
|
|
chk_FST4_freq_range();
|
2020-07-23 13:51:05 -04:00
|
|
|
switch_mode (Modes::FST4);
|
2020-06-30 17:14:58 -04:00
|
|
|
m_wideGraph->setMode(m_mode);
|
2020-09-18 11:30:23 -04:00
|
|
|
ui->sbTR->values ({15, 30, 60, 120, 300, 900, 1800});
|
|
|
|
on_sbTR_valueChanged (ui->sbTR->value());
|
2020-06-16 14:58:08 -04:00
|
|
|
statusChanged();
|
2020-09-18 11:30:23 -04:00
|
|
|
m_bOK_to_chk=true;
|
2020-09-18 13:33:30 -04:00
|
|
|
chk_FST4_freq_range();
|
2020-06-16 14:58:08 -04:00
|
|
|
}
|
|
|
|
|
2020-07-23 13:51:05 -04:00
|
|
|
void MainWindow::on_actionFST4W_triggered()
|
2020-06-16 14:58:08 -04:00
|
|
|
{
|
2020-07-23 13:51:05 -04:00
|
|
|
m_mode="FST4W";
|
|
|
|
m_modeTx="FST4W";
|
|
|
|
ui->actionFST4W->setChecked(true);
|
2020-09-12 09:35:32 -04:00
|
|
|
m_bFast9=false;
|
|
|
|
m_bFastMode=false;
|
|
|
|
m_fastGraph->hide();
|
|
|
|
m_wideGraph->show();
|
2020-09-05 10:34:55 -04:00
|
|
|
m_nsps=6912; //For symspec only
|
|
|
|
m_FFTSize = m_nsps / 2;
|
|
|
|
Q_EMIT FFTSize(m_FFTSize);
|
2020-06-16 14:58:08 -04:00
|
|
|
WSPR_config(true);
|
2020-09-16 17:02:40 -04:00
|
|
|
// 012345678901234567890123456789012345
|
|
|
|
displayWidgets(nWidgets("000000000000000001010000000000000100"));
|
2020-09-05 10:34:55 -04:00
|
|
|
setup_status_bar(false);
|
2020-07-03 10:06:52 -04:00
|
|
|
ui->band_hopping_group_box->setChecked(false);
|
2020-06-16 15:56:15 -04:00
|
|
|
ui->band_hopping_group_box->setVisible(false);
|
2020-07-23 13:51:05 -04:00
|
|
|
on_sbTR_FST4W_valueChanged (ui->sbTR_FST4W->value ());
|
2020-09-13 09:38:39 -04:00
|
|
|
ui->WSPRfreqSpinBox->setMinimum(100);
|
|
|
|
ui->WSPRfreqSpinBox->setMaximum(5000);
|
2020-06-21 10:34:24 -04:00
|
|
|
m_wideGraph->setMode(m_mode);
|
|
|
|
m_wideGraph->setModeTx(m_modeTx);
|
2020-07-02 13:48:35 -04:00
|
|
|
m_wideGraph->setPeriod(m_TRperiod,6912);
|
2020-07-17 12:00:15 -04:00
|
|
|
m_wideGraph->setTxFreq(ui->WSPRfreqSpinBox->value());
|
2020-09-05 10:34:55 -04:00
|
|
|
m_wideGraph->setRxFreq(ui->sbFST4W_RxFreq->value());
|
|
|
|
m_wideGraph->setTol(ui->sbFST4W_FTol->value());
|
2020-07-02 14:03:00 -04:00
|
|
|
ui->sbFtol->setValue(100);
|
2020-07-23 13:51:05 -04:00
|
|
|
switch_mode (Modes::FST4W);
|
2020-06-16 14:58:08 -04:00
|
|
|
statusChanged();
|
|
|
|
}
|
|
|
|
|
2019-01-28 10:19:46 -05:00
|
|
|
void MainWindow::on_actionFT4_triggered()
|
2019-01-18 11:51:15 -05:00
|
|
|
{
|
2019-01-28 10:19:46 -05:00
|
|
|
m_mode="FT4";
|
|
|
|
m_modeTx="FT4";
|
2019-05-22 12:44:28 -04:00
|
|
|
m_TRperiod=7.5;
|
2019-01-18 11:51:15 -05:00
|
|
|
bool bVHF=m_config.enable_VHF_features();
|
|
|
|
m_bFast9=false;
|
|
|
|
m_bFastMode=false;
|
|
|
|
WSPR_config(false);
|
2019-01-28 10:19:46 -05:00
|
|
|
switch_mode (Modes::FT4);
|
2019-03-13 13:59:41 -04:00
|
|
|
m_nsps=6912;
|
2019-01-18 11:51:15 -05:00
|
|
|
m_FFTSize = m_nsps/2;
|
|
|
|
Q_EMIT FFTSize (m_FFTSize);
|
2019-05-23 09:23:58 -04:00
|
|
|
m_hsymStop=21;
|
2019-01-18 11:51:15 -05:00
|
|
|
setup_status_bar (bVHF);
|
2019-05-22 18:02:15 -04:00
|
|
|
m_toneSpacing=12000.0/576.0;
|
2019-03-13 13:59:41 -04:00
|
|
|
ui->actionFT4->setChecked(true);
|
2019-01-18 11:51:15 -05:00
|
|
|
m_wideGraph->setMode(m_mode);
|
|
|
|
m_wideGraph->setModeTx(m_modeTx);
|
2019-03-13 13:59:41 -04:00
|
|
|
m_send_RR73=true;
|
2019-01-18 11:51:15 -05:00
|
|
|
VHF_features_enabled(bVHF);
|
|
|
|
m_fastGraph->hide();
|
|
|
|
m_wideGraph->show();
|
2020-10-03 19:46:59 -04:00
|
|
|
ui->rh_decodes_headings_label->setText(" UTC dB DT Freq " + tr ("Message"));
|
2019-01-18 11:51:15 -05:00
|
|
|
m_wideGraph->setPeriod(m_TRperiod,m_nsps);
|
|
|
|
m_modulator->setTRPeriod(m_TRperiod); // TODO - not thread safe
|
|
|
|
m_detector->setTRPeriod(m_TRperiod); // TODO - not thread safe
|
2020-10-03 19:46:59 -04:00
|
|
|
ui->rh_decodes_title_label->setText(tr ("Rx Frequency"));
|
|
|
|
ui->lh_decodes_title_label->setText(tr ("Band Activity"));
|
|
|
|
ui->lh_decodes_headings_label->setText( " UTC dB DT Freq " + tr ("Message"));
|
2020-09-16 17:02:40 -04:00
|
|
|
displayWidgets(nWidgets("111010000100111000010000000110001000"));
|
2019-01-18 11:51:15 -05:00
|
|
|
ui->txrb2->setEnabled(true);
|
|
|
|
ui->txrb4->setEnabled(true);
|
|
|
|
ui->txrb5->setEnabled(true);
|
|
|
|
ui->txrb6->setEnabled(true);
|
|
|
|
ui->txb2->setEnabled(true);
|
|
|
|
ui->txb4->setEnabled(true);
|
|
|
|
ui->txb5->setEnabled(true);
|
|
|
|
ui->txb6->setEnabled(true);
|
|
|
|
ui->txFirstCheckBox->setEnabled(true);
|
2019-03-14 12:03:07 -04:00
|
|
|
chkFT4();
|
2019-01-18 11:51:15 -05:00
|
|
|
statusChanged();
|
|
|
|
}
|
|
|
|
|
2017-06-17 09:48:45 -04:00
|
|
|
void MainWindow::on_actionFT8_triggered()
|
|
|
|
{
|
|
|
|
m_mode="FT8";
|
2017-12-30 18:10:39 -05:00
|
|
|
bool bVHF=m_config.enable_VHF_features();
|
2017-06-17 09:48:45 -04:00
|
|
|
m_bFast9=false;
|
|
|
|
m_bFastMode=false;
|
|
|
|
WSPR_config(false);
|
|
|
|
switch_mode (Modes::FT8);
|
|
|
|
m_modeTx="FT8";
|
|
|
|
m_nsps=6912;
|
|
|
|
m_FFTSize = m_nsps / 2;
|
|
|
|
Q_EMIT FFTSize (m_FFTSize);
|
2017-07-06 12:12:32 -04:00
|
|
|
m_hsymStop=50;
|
2017-06-17 09:48:45 -04:00
|
|
|
setup_status_bar (bVHF);
|
|
|
|
m_toneSpacing=0.0; //???
|
|
|
|
ui->actionFT8->setChecked(true); //???
|
|
|
|
m_wideGraph->setMode(m_mode);
|
|
|
|
m_wideGraph->setModeTx(m_modeTx);
|
|
|
|
VHF_features_enabled(bVHF);
|
|
|
|
ui->cbAutoSeq->setChecked(true);
|
2019-05-22 12:44:28 -04:00
|
|
|
m_TRperiod=15.0;
|
2017-06-17 09:48:45 -04:00
|
|
|
m_fastGraph->hide();
|
|
|
|
m_wideGraph->show();
|
2020-10-03 19:46:59 -04:00
|
|
|
ui->rh_decodes_headings_label->setText(" UTC dB DT Freq " + tr ("Message"));
|
2017-06-17 09:48:45 -04:00
|
|
|
m_wideGraph->setPeriod(m_TRperiod,m_nsps);
|
2018-02-12 11:59:31 -05:00
|
|
|
m_modulator->setTRPeriod(m_TRperiod); // TODO - not thread safe
|
|
|
|
m_detector->setTRPeriod(m_TRperiod); // TODO - not thread safe
|
2020-10-03 19:46:59 -04:00
|
|
|
ui->rh_decodes_title_label->setText(tr ("Rx Frequency"));
|
2018-10-30 17:06:01 -04:00
|
|
|
if(SpecOp::FOX==m_config.special_op_id()) {
|
2020-10-03 19:46:59 -04:00
|
|
|
ui->lh_decodes_title_label->setText(tr ("Stations calling DXpedition %1").arg (m_config.my_callsign()));
|
|
|
|
ui->lh_decodes_headings_label->setText( "Call Grid dB Freq Dist Age Continent");
|
2017-11-03 14:27:46 -04:00
|
|
|
} else {
|
2020-10-03 19:46:59 -04:00
|
|
|
ui->lh_decodes_title_label->setText(tr ("Band Activity"));
|
|
|
|
ui->lh_decodes_headings_label->setText( " UTC dB DT Freq " + tr ("Message"));
|
2017-11-03 14:27:46 -04:00
|
|
|
}
|
2020-09-16 17:02:40 -04:00
|
|
|
displayWidgets(nWidgets("111010000100111000010000100110001000"));
|
2017-12-18 16:10:44 -05:00
|
|
|
ui->txrb2->setEnabled(true);
|
|
|
|
ui->txrb4->setEnabled(true);
|
|
|
|
ui->txrb5->setEnabled(true);
|
|
|
|
ui->txrb6->setEnabled(true);
|
|
|
|
ui->txb2->setEnabled(true);
|
|
|
|
ui->txb4->setEnabled(true);
|
|
|
|
ui->txb5->setEnabled(true);
|
|
|
|
ui->txb6->setEnabled(true);
|
2017-12-23 17:01:05 -05:00
|
|
|
ui->txFirstCheckBox->setEnabled(true);
|
|
|
|
ui->cbAutoSeq->setEnabled(true);
|
2018-10-30 17:06:01 -04:00
|
|
|
if(SpecOp::FOX==m_config.special_op_id()) {
|
2017-12-18 16:10:44 -05:00
|
|
|
ui->txFirstCheckBox->setChecked(true);
|
2017-12-19 16:50:53 -05:00
|
|
|
ui->txFirstCheckBox->setEnabled(false);
|
2018-02-22 09:45:28 -05:00
|
|
|
ui->cbHoldTxFreq->setChecked(true);
|
2017-12-19 16:50:53 -05:00
|
|
|
ui->cbAutoSeq->setEnabled(false);
|
2020-09-08 16:19:48 -04:00
|
|
|
ui->tabWidget->setCurrentIndex(1);
|
2017-12-18 16:10:44 -05:00
|
|
|
ui->TxFreqSpinBox->setValue(300);
|
2020-09-16 17:02:40 -04:00
|
|
|
displayWidgets(nWidgets("111010000100111000010000000000100000"));
|
2020-05-19 06:26:24 -04:00
|
|
|
ui->labDXped->setText(tr ("Fox"));
|
2018-11-11 23:44:03 -05:00
|
|
|
on_fox_log_action_triggered();
|
2017-12-18 16:10:44 -05:00
|
|
|
}
|
2018-10-30 17:06:01 -04:00
|
|
|
if(SpecOp::HOUND == m_config.special_op_id()) {
|
2017-12-18 16:10:44 -05:00
|
|
|
ui->txFirstCheckBox->setChecked(false);
|
2017-12-19 16:50:53 -05:00
|
|
|
ui->txFirstCheckBox->setEnabled(false);
|
|
|
|
ui->cbAutoSeq->setEnabled(false);
|
2017-12-18 16:10:44 -05:00
|
|
|
ui->tabWidget->setCurrentIndex(0);
|
|
|
|
ui->cbHoldTxFreq->setChecked(true);
|
2020-09-16 17:02:40 -04:00
|
|
|
displayWidgets(nWidgets("111010000100110000010000000000110000"));
|
2020-05-19 06:26:24 -04:00
|
|
|
ui->labDXped->setText(tr ("Hound"));
|
2018-02-22 09:45:28 -05:00
|
|
|
ui->txrb1->setChecked(true);
|
2017-12-18 16:10:44 -05:00
|
|
|
ui->txrb2->setEnabled(false);
|
|
|
|
ui->txrb4->setEnabled(false);
|
|
|
|
ui->txrb5->setEnabled(false);
|
|
|
|
ui->txrb6->setEnabled(false);
|
|
|
|
ui->txb2->setEnabled(false);
|
|
|
|
ui->txb4->setEnabled(false);
|
|
|
|
ui->txb5->setEnabled(false);
|
|
|
|
ui->txb6->setEnabled(false);
|
|
|
|
}
|
|
|
|
|
2018-11-12 14:08:02 -05:00
|
|
|
if (SpecOp::NONE < m_config.special_op_id () && SpecOp::FOX > m_config.special_op_id ()) {
|
2018-07-09 14:33:56 -04:00
|
|
|
QString t0="";
|
2018-10-30 17:06:01 -04:00
|
|
|
if(SpecOp::NA_VHF==m_config.special_op_id()) t0+="NA VHF";
|
|
|
|
if(SpecOp::EU_VHF==m_config.special_op_id()) t0+="EU VHF";
|
|
|
|
if(SpecOp::FIELD_DAY==m_config.special_op_id()) t0+="Field Day";
|
|
|
|
if(SpecOp::RTTY==m_config.special_op_id()) t0+="RTTY";
|
2020-01-24 12:26:36 -05:00
|
|
|
if(SpecOp::WW_DIGI==m_config.special_op_id()) t0+="WW_DIGI";
|
2018-07-09 14:33:56 -04:00
|
|
|
if(t0=="") {
|
|
|
|
ui->labDXped->setVisible(false);
|
|
|
|
} else {
|
|
|
|
ui->labDXped->setVisible(true);
|
|
|
|
ui->labDXped->setText(t0);
|
|
|
|
}
|
2018-11-11 23:44:03 -05:00
|
|
|
on_contest_log_action_triggered();
|
2018-07-07 14:47:33 -04:00
|
|
|
}
|
|
|
|
|
2018-10-30 17:06:01 -04:00
|
|
|
if((SpecOp::FOX==m_config.special_op_id() or SpecOp::HOUND==m_config.special_op_id()) and !m_config.split_mode() and !m_bWarnedSplit) {
|
2017-12-18 16:10:44 -05:00
|
|
|
QString errorMsg;
|
|
|
|
MessageBox::critical_message (this,
|
2018-02-05 10:20:54 -05:00
|
|
|
"Operation in FT8 DXpedition mode normally requires\n"
|
|
|
|
" *Split* rig control (either *Rig* or *Fake It* on\n"
|
|
|
|
"the *Settings | Radio* tab.)", errorMsg);
|
2018-02-05 10:16:29 -05:00
|
|
|
m_bWarnedSplit=true;
|
2017-10-30 11:18:54 -04:00
|
|
|
}
|
2017-06-17 09:48:45 -04:00
|
|
|
statusChanged();
|
|
|
|
}
|
|
|
|
|
2016-10-20 15:25:48 -04:00
|
|
|
void MainWindow::on_actionJT4_triggered()
|
|
|
|
{
|
|
|
|
m_mode="JT4";
|
|
|
|
bool bVHF=m_config.enable_VHF_features();
|
|
|
|
WSPR_config(false);
|
|
|
|
switch_mode (Modes::JT4);
|
|
|
|
m_modeTx="JT4";
|
2019-05-22 12:44:28 -04:00
|
|
|
m_TRperiod=60.0;
|
2018-02-12 11:59:31 -05:00
|
|
|
m_modulator->setTRPeriod(m_TRperiod); // TODO - not thread safe
|
|
|
|
m_detector->setTRPeriod(m_TRperiod); // TODO - not thread safe
|
2016-10-20 15:25:48 -04:00
|
|
|
m_nsps=6912; //For symspec only
|
|
|
|
m_FFTSize = m_nsps / 2;
|
|
|
|
Q_EMIT FFTSize (m_FFTSize);
|
|
|
|
m_hsymStop=176;
|
|
|
|
if(m_config.decode_at_52s()) m_hsymStop=184;
|
|
|
|
m_toneSpacing=0.0;
|
|
|
|
ui->actionJT4->setChecked(true);
|
|
|
|
VHF_features_enabled(true);
|
|
|
|
m_wideGraph->setPeriod(m_TRperiod,m_nsps);
|
|
|
|
m_wideGraph->setMode(m_mode);
|
|
|
|
m_wideGraph->setModeTx(m_modeTx);
|
|
|
|
m_bFastMode=false;
|
|
|
|
m_bFast9=false;
|
|
|
|
setup_status_bar (bVHF);
|
|
|
|
ui->sbSubmode->setMaximum(6);
|
2020-10-03 19:46:59 -04:00
|
|
|
ui->lh_decodes_title_label->setText(tr ("Single-Period Decodes"));
|
|
|
|
ui->rh_decodes_title_label->setText(tr ("Average Decodes"));
|
|
|
|
ui->lh_decodes_headings_label->setText("UTC dB DT Freq " + tr ("Message"));
|
|
|
|
ui->rh_decodes_headings_label->setText("UTC dB DT Freq " + tr ("Message"));
|
2016-10-20 15:25:48 -04:00
|
|
|
if(bVHF) {
|
|
|
|
ui->sbSubmode->setValue(m_nSubMode);
|
|
|
|
} else {
|
|
|
|
ui->sbSubmode->setValue(0);
|
|
|
|
}
|
2017-07-24 15:27:23 -04:00
|
|
|
if(bVHF) {
|
2020-09-16 17:02:40 -04:00
|
|
|
displayWidgets(nWidgets("111110010010110110111100000000000000"));
|
2017-07-24 15:27:23 -04:00
|
|
|
} else {
|
2020-09-16 17:02:40 -04:00
|
|
|
displayWidgets(nWidgets("111010000000110000110000000000000000"));
|
2017-07-24 15:27:23 -04:00
|
|
|
}
|
|
|
|
fast_config(false);
|
2016-12-16 14:36:21 -05:00
|
|
|
statusChanged();
|
2016-10-20 15:25:48 -04:00
|
|
|
}
|
|
|
|
|
2015-11-17 20:28:12 -05:00
|
|
|
void MainWindow::on_actionJT9_triggered()
|
2012-09-24 15:11:31 -04:00
|
|
|
{
|
2013-07-08 09:17:22 -04:00
|
|
|
m_mode="JT9";
|
2016-10-20 15:25:48 -04:00
|
|
|
bool bVHF=m_config.enable_VHF_features();
|
2015-11-17 20:28:12 -05:00
|
|
|
m_bFast9=ui->cbFast9->isChecked();
|
|
|
|
m_bFastMode=m_bFast9;
|
2016-04-06 13:11:58 -04:00
|
|
|
WSPR_config(false);
|
2015-05-28 19:22:17 -04:00
|
|
|
switch_mode (Modes::JT9);
|
2018-11-30 15:52:11 -05:00
|
|
|
m_modeTx="JT9";
|
2012-09-28 19:59:50 -04:00
|
|
|
m_nsps=6912;
|
2016-06-16 21:27:00 -04:00
|
|
|
m_FFTSize = m_nsps / 2;
|
|
|
|
Q_EMIT FFTSize (m_FFTSize);
|
2013-03-23 14:24:27 -04:00
|
|
|
m_hsymStop=173;
|
2015-11-17 20:28:12 -05:00
|
|
|
if(m_config.decode_at_52s()) m_hsymStop=179;
|
2016-07-01 20:25:38 -04:00
|
|
|
setup_status_bar (bVHF);
|
2014-03-05 13:20:40 -05:00
|
|
|
m_toneSpacing=0.0;
|
2015-11-17 20:28:12 -05:00
|
|
|
ui->actionJT9->setChecked(true);
|
2013-08-10 11:29:55 -04:00
|
|
|
m_wideGraph->setMode(m_mode);
|
|
|
|
m_wideGraph->setModeTx(m_modeTx);
|
2015-11-17 20:28:12 -05:00
|
|
|
VHF_features_enabled(bVHF);
|
2017-06-09 07:56:51 -04:00
|
|
|
if(m_nSubMode>=4 and bVHF) {
|
2016-10-21 11:32:05 -04:00
|
|
|
ui->cbFast9->setEnabled(true);
|
2016-10-12 12:33:18 -04:00
|
|
|
} else {
|
2016-10-21 11:32:05 -04:00
|
|
|
ui->cbFast9->setEnabled(false);
|
2016-10-12 12:33:18 -04:00
|
|
|
ui->cbFast9->setChecked(false);
|
|
|
|
}
|
2015-11-17 20:28:12 -05:00
|
|
|
ui->sbSubmode->setMaximum(7);
|
|
|
|
if(m_bFast9) {
|
2020-07-11 20:38:36 -04:00
|
|
|
ui->sbTR->values ({5, 10, 15, 30});
|
|
|
|
on_sbTR_valueChanged (ui->sbTR->value());
|
2015-11-17 20:28:12 -05:00
|
|
|
m_wideGraph->hide();
|
2020-05-25 09:35:31 -04:00
|
|
|
m_fastGraph->showNormal();
|
2015-11-17 20:28:12 -05:00
|
|
|
ui->TxFreqSpinBox->setValue(700);
|
|
|
|
ui->RxFreqSpinBox->setValue(700);
|
2020-10-03 19:46:59 -04:00
|
|
|
ui->lh_decodes_headings_label->setText(" UTC dB T Freq " + tr ("Message"));
|
|
|
|
ui->rh_decodes_headings_label->setText(" UTC dB T Freq " + tr ("Message"));
|
2015-11-17 20:28:12 -05:00
|
|
|
} else {
|
2016-11-28 14:34:52 -05:00
|
|
|
ui->cbAutoSeq->setChecked(false);
|
2020-07-23 13:51:05 -04:00
|
|
|
if (m_mode != "FST4")
|
2020-07-11 20:38:36 -04:00
|
|
|
{
|
|
|
|
m_TRperiod=60.0;
|
2020-10-03 19:46:59 -04:00
|
|
|
ui->lh_decodes_headings_label->setText("UTC dB DT Freq " + tr ("Message"));
|
|
|
|
ui->rh_decodes_headings_label->setText("UTC dB DT Freq " + tr ("Message"));
|
2020-07-11 20:38:36 -04:00
|
|
|
}
|
2015-11-17 20:28:12 -05:00
|
|
|
}
|
|
|
|
m_wideGraph->setPeriod(m_TRperiod,m_nsps);
|
2018-02-12 11:59:31 -05:00
|
|
|
m_modulator->setTRPeriod(m_TRperiod); // TODO - not thread safe
|
|
|
|
m_detector->setTRPeriod(m_TRperiod); // TODO - not thread safe
|
2020-10-03 19:46:59 -04:00
|
|
|
ui->lh_decodes_title_label->setText(tr ("Band Activity"));
|
|
|
|
ui->rh_decodes_title_label->setText(tr ("Rx Frequency"));
|
2017-07-24 15:27:23 -04:00
|
|
|
if(bVHF) {
|
2020-09-16 17:02:40 -04:00
|
|
|
displayWidgets(nWidgets("111110101000111110010000000000000000"));
|
2017-07-24 15:27:23 -04:00
|
|
|
} else {
|
2020-09-16 17:02:40 -04:00
|
|
|
displayWidgets(nWidgets("111010000000111000010000000000001000"));
|
2017-07-24 15:27:23 -04:00
|
|
|
}
|
|
|
|
fast_config(m_bFastMode);
|
|
|
|
ui->cbAutoSeq->setVisible(m_bFast9);
|
2016-12-16 14:36:21 -05:00
|
|
|
statusChanged();
|
2015-11-17 20:28:12 -05:00
|
|
|
}
|
|
|
|
|
2016-10-20 15:25:48 -04:00
|
|
|
void MainWindow::on_actionJT9_JT65_triggered()
|
2015-11-17 20:28:12 -05:00
|
|
|
{
|
2016-10-20 15:25:48 -04:00
|
|
|
m_mode="JT9+JT65";
|
2016-09-17 11:32:01 -04:00
|
|
|
WSPR_config(false);
|
2016-10-20 15:25:48 -04:00
|
|
|
switch_mode (Modes::JT65);
|
|
|
|
if(m_modeTx != "JT65") {
|
|
|
|
ui->pbTxMode->setText("Tx JT9 @");
|
|
|
|
m_modeTx="JT9";
|
|
|
|
}
|
|
|
|
m_nSubMode=0; //Dual-mode always means JT9 and JT65A
|
2019-05-22 12:44:28 -04:00
|
|
|
m_TRperiod=60.0;
|
2018-02-12 11:59:31 -05:00
|
|
|
m_modulator->setTRPeriod(m_TRperiod); // TODO - not thread safe
|
|
|
|
m_detector->setTRPeriod(m_TRperiod); // TODO - not thread safe
|
2016-10-20 15:25:48 -04:00
|
|
|
m_nsps=6912;
|
|
|
|
m_FFTSize = m_nsps / 2;
|
|
|
|
Q_EMIT FFTSize (m_FFTSize);
|
|
|
|
m_hsymStop=174;
|
|
|
|
if(m_config.decode_at_52s()) m_hsymStop=183;
|
|
|
|
m_toneSpacing=0.0;
|
|
|
|
setup_status_bar (false);
|
|
|
|
ui->actionJT9_JT65->setChecked(true);
|
|
|
|
VHF_features_enabled(false);
|
2015-11-17 20:28:12 -05:00
|
|
|
m_wideGraph->setPeriod(m_TRperiod,m_nsps);
|
2016-07-01 11:41:03 -04:00
|
|
|
m_wideGraph->setMode(m_mode);
|
|
|
|
m_wideGraph->setModeTx(m_modeTx);
|
2016-10-20 15:25:48 -04:00
|
|
|
m_bFastMode=false;
|
|
|
|
m_bFast9=false;
|
|
|
|
ui->sbSubmode->setValue(0);
|
2020-10-03 19:46:59 -04:00
|
|
|
ui->lh_decodes_title_label->setText(tr ("Band Activity"));
|
|
|
|
ui->rh_decodes_title_label->setText(tr ("Rx Frequency"));
|
|
|
|
ui->lh_decodes_headings_label->setText("UTC dB DT Freq " + tr ("Message"));
|
|
|
|
ui->rh_decodes_headings_label->setText("UTC dB DT Freq " + tr ("Message"));
|
2020-09-16 17:02:40 -04:00
|
|
|
displayWidgets(nWidgets("111010000001111000010000000000001000"));
|
2017-07-24 15:27:23 -04:00
|
|
|
fast_config(false);
|
2016-12-16 14:36:21 -05:00
|
|
|
statusChanged();
|
2016-06-08 17:20:58 -04:00
|
|
|
}
|
|
|
|
|
2013-07-08 09:17:22 -04:00
|
|
|
void MainWindow::on_actionJT65_triggered()
|
2012-09-24 15:11:31 -04:00
|
|
|
{
|
2020-07-23 13:51:05 -04:00
|
|
|
if(m_mode=="JT4" or m_mode=="WSPR" or m_mode=="FST4W") {
|
|
|
|
// If coming from JT4, WSPR, or FST4W mode, pretend temporarily that we're coming
|
2015-06-03 16:21:34 -04:00
|
|
|
// from JT9 and click the pbTxMode button
|
2015-04-22 13:48:03 -04:00
|
|
|
m_modeTx="JT9";
|
|
|
|
on_pbTxMode_clicked();
|
|
|
|
}
|
2016-04-14 09:22:05 -04:00
|
|
|
on_actionJT9_triggered();
|
2013-07-08 09:17:22 -04:00
|
|
|
m_mode="JT65";
|
2018-11-27 16:04:21 -05:00
|
|
|
m_modeTx="JT65";
|
2016-10-20 15:25:48 -04:00
|
|
|
bool bVHF=m_config.enable_VHF_features();
|
2016-04-06 13:11:58 -04:00
|
|
|
WSPR_config(false);
|
2015-05-28 19:22:17 -04:00
|
|
|
switch_mode (Modes::JT65);
|
2013-07-08 09:17:22 -04:00
|
|
|
if(m_modeTx!="JT65") on_pbTxMode_clicked();
|
2019-05-22 12:44:28 -04:00
|
|
|
m_TRperiod=60.0;
|
2018-02-12 11:59:31 -05:00
|
|
|
m_modulator->setTRPeriod(m_TRperiod); // TODO - not thread safe
|
|
|
|
m_detector->setTRPeriod(m_TRperiod); // TODO - not thread safe
|
2013-07-08 09:17:22 -04:00
|
|
|
m_nsps=6912; //For symspec only
|
2016-06-16 21:27:00 -04:00
|
|
|
m_FFTSize = m_nsps / 2;
|
|
|
|
Q_EMIT FFTSize (m_FFTSize);
|
2016-09-07 15:00:55 -04:00
|
|
|
m_hsymStop=174;
|
|
|
|
if(m_config.decode_at_52s()) m_hsymStop=183;
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
m_toneSpacing=0.0;
|
2013-07-08 09:17:22 -04:00
|
|
|
ui->actionJT65->setChecked(true);
|
2017-12-02 11:04:52 -05:00
|
|
|
VHF_features_enabled(bVHF);
|
2013-08-10 11:29:55 -04:00
|
|
|
m_wideGraph->setPeriod(m_TRperiod,m_nsps);
|
|
|
|
m_wideGraph->setMode(m_mode);
|
|
|
|
m_wideGraph->setModeTx(m_modeTx);
|
2020-09-20 10:17:27 -04:00
|
|
|
m_wideGraph->setRxFreq(ui->RxFreqSpinBox->value());
|
|
|
|
m_wideGraph->setTol(ui->sbFtol->value());
|
|
|
|
m_wideGraph->setTxFreq(ui->TxFreqSpinBox->value());
|
2016-07-01 20:25:38 -04:00
|
|
|
setup_status_bar (bVHF);
|
2015-11-17 20:28:12 -05:00
|
|
|
m_bFastMode=false;
|
|
|
|
m_bFast9=false;
|
2015-04-22 13:48:03 -04:00
|
|
|
ui->sbSubmode->setMaximum(2);
|
|
|
|
if(bVHF) {
|
|
|
|
ui->sbSubmode->setValue(m_nSubMode);
|
2020-10-03 19:46:59 -04:00
|
|
|
ui->lh_decodes_title_label->setText(tr ("Single-Period Decodes"));
|
|
|
|
ui->rh_decodes_title_label->setText(tr ("Average Decodes"));
|
2016-03-20 15:32:08 -04:00
|
|
|
} else {
|
2016-10-24 16:48:24 -04:00
|
|
|
ui->sbSubmode->setValue(0);
|
2020-10-03 19:46:59 -04:00
|
|
|
ui->lh_decodes_title_label->setText(tr ("Band Activity"));
|
|
|
|
ui->rh_decodes_title_label->setText(tr ("Rx Frequency"));
|
2016-03-20 15:32:08 -04:00
|
|
|
}
|
2017-07-24 15:27:23 -04:00
|
|
|
if(bVHF) {
|
2020-09-16 17:02:40 -04:00
|
|
|
displayWidgets(nWidgets("111110010000110110101100010000000000"));
|
2017-07-24 15:27:23 -04:00
|
|
|
} else {
|
2020-09-16 17:02:40 -04:00
|
|
|
displayWidgets(nWidgets("111010000000111000010000000000001000"));
|
2017-07-24 15:27:23 -04:00
|
|
|
}
|
|
|
|
fast_config(false);
|
2018-11-09 12:46:02 -05:00
|
|
|
if(ui->cbShMsgs->isChecked()) {
|
|
|
|
ui->cbAutoSeq->setChecked(false);
|
|
|
|
ui->cbAutoSeq->setVisible(false);
|
|
|
|
}
|
2016-12-16 14:36:21 -05:00
|
|
|
statusChanged();
|
2012-09-24 15:11:31 -04:00
|
|
|
}
|
|
|
|
|
2016-10-20 15:25:48 -04:00
|
|
|
void MainWindow::on_actionQRA64_triggered()
|
2012-09-24 15:11:31 -04:00
|
|
|
{
|
2016-10-20 15:25:48 -04:00
|
|
|
int n=m_nSubMode;
|
|
|
|
on_actionJT65_triggered();
|
|
|
|
m_nSubMode=n;
|
|
|
|
m_mode="QRA64";
|
|
|
|
m_modeTx="QRA64";
|
|
|
|
ui->actionQRA64->setChecked(true);
|
|
|
|
switch_mode (Modes::QRA64);
|
|
|
|
setup_status_bar (true);
|
|
|
|
m_hsymStop=180;
|
|
|
|
if(m_config.decode_at_52s()) m_hsymStop=188;
|
|
|
|
m_wideGraph->setMode(m_mode);
|
|
|
|
m_wideGraph->setModeTx(m_modeTx);
|
|
|
|
ui->sbSubmode->setMaximum(4);
|
|
|
|
ui->sbSubmode->setValue(m_nSubMode);
|
2017-07-26 06:56:12 -04:00
|
|
|
ui->actionInclude_averaging->setVisible (false);
|
|
|
|
ui->actionInclude_correlation->setVisible (false);
|
2019-07-09 14:59:34 -04:00
|
|
|
ui->RxFreqSpinBox->setValue(1000);
|
|
|
|
ui->TxFreqSpinBox->setValue(1000);
|
2017-02-10 11:38:19 -05:00
|
|
|
QString fname {QDir::toNativeSeparators(m_config.temp_dir ().absoluteFilePath ("red.dat"))};
|
|
|
|
m_wideGraph->setRedFile(fname);
|
2020-09-16 17:02:40 -04:00
|
|
|
displayWidgets(nWidgets("111110010010110110000000001000000000"));
|
2017-07-24 15:27:23 -04:00
|
|
|
statusChanged();
|
2016-10-20 15:25:48 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void MainWindow::on_actionISCAT_triggered()
|
|
|
|
{
|
|
|
|
m_mode="ISCAT";
|
|
|
|
m_modeTx="ISCAT";
|
|
|
|
ui->actionISCAT->setChecked(true);
|
2020-07-11 20:38:36 -04:00
|
|
|
ui->sbTR->values ({5, 10, 15, 30});
|
|
|
|
on_sbTR_valueChanged (ui->sbTR->value ());
|
2018-02-12 11:59:31 -05:00
|
|
|
m_modulator->setTRPeriod(m_TRperiod);
|
|
|
|
m_detector->setTRPeriod(m_TRperiod);
|
2016-10-20 15:25:48 -04:00
|
|
|
m_wideGraph->setPeriod(m_TRperiod,m_nsps);
|
|
|
|
m_nsps=6912; //For symspec only
|
2016-06-16 21:27:00 -04:00
|
|
|
m_FFTSize = m_nsps / 2;
|
|
|
|
Q_EMIT FFTSize (m_FFTSize);
|
2016-10-20 15:25:48 -04:00
|
|
|
m_hsymStop=103;
|
|
|
|
m_toneSpacing=11025.0/256.0;
|
|
|
|
WSPR_config(false);
|
2020-10-03 19:46:59 -04:00
|
|
|
ui->rh_decodes_widget->setVisible (false);
|
2016-10-20 15:25:48 -04:00
|
|
|
switch_mode(Modes::ISCAT);
|
2013-08-10 11:29:55 -04:00
|
|
|
m_wideGraph->setMode(m_mode);
|
|
|
|
m_wideGraph->setModeTx(m_modeTx);
|
2016-10-20 15:25:48 -04:00
|
|
|
statusChanged();
|
2020-05-25 09:35:31 -04:00
|
|
|
if(!m_fastGraph->isVisible()) m_fastGraph->showNormal();
|
2016-10-20 15:25:48 -04:00
|
|
|
if(m_wideGraph->isVisible()) m_wideGraph->hide();
|
|
|
|
setup_status_bar (true);
|
|
|
|
ui->cbShMsgs->setChecked(false);
|
2020-10-03 19:46:59 -04:00
|
|
|
ui->lh_decodes_headings_label->setText(
|
2016-11-03 10:05:05 -04:00
|
|
|
" UTC Sync dB DT DF F1 M N C T ");
|
2016-10-20 15:25:48 -04:00
|
|
|
ui->tabWidget->setCurrentIndex(0);
|
|
|
|
ui->sbSubmode->setMaximum(1);
|
|
|
|
if(m_nSubMode==0) ui->TxFreqSpinBox->setValue(1012);
|
|
|
|
if(m_nSubMode==1) ui->TxFreqSpinBox->setValue(560);
|
2020-09-16 17:02:40 -04:00
|
|
|
displayWidgets(nWidgets("100111000000000110000000000000000000"));
|
2017-07-24 15:27:23 -04:00
|
|
|
fast_config(true);
|
2016-12-16 14:36:21 -05:00
|
|
|
statusChanged ();
|
2015-04-22 13:48:03 -04:00
|
|
|
}
|
|
|
|
|
2016-10-20 15:25:48 -04:00
|
|
|
void MainWindow::on_actionMSK144_triggered()
|
2015-04-22 13:48:03 -04:00
|
|
|
{
|
2018-10-30 17:06:01 -04:00
|
|
|
if(SpecOp::EU_VHF < m_config.special_op_id()) {
|
2018-10-27 18:21:29 -04:00
|
|
|
// We are rejecting the requested mode change, so re-check the old mode
|
|
|
|
if("FT8"==m_mode) ui->actionFT8->setChecked(true);
|
|
|
|
if("JT4"==m_mode) ui->actionJT4->setChecked(true);
|
|
|
|
if("JT9"==m_mode) ui->actionJT9->setChecked(true);
|
|
|
|
if("JT65"==m_mode) ui->actionJT65->setChecked(true);
|
|
|
|
if("JT9_JT65"==m_mode) ui->actionJT9_JT65->setChecked(true);
|
|
|
|
if("ISCAT"==m_mode) ui->actionISCAT->setChecked(true);
|
|
|
|
if("QRA64"==m_mode) ui->actionQRA64->setChecked(true);
|
|
|
|
if("WSPR"==m_mode) ui->actionWSPR->setChecked(true);
|
|
|
|
if("Echo"==m_mode) ui->actionEcho->setChecked(true);
|
2020-07-02 09:39:11 -04:00
|
|
|
if("FreqCal"==m_mode) ui->actionFreqCal->setChecked(true);
|
2020-07-23 13:51:05 -04:00
|
|
|
if("FST4"==m_mode) ui->actionFST4->setChecked(true);
|
|
|
|
if("FST4W"==m_mode) ui->actionFST4W->setChecked(true);
|
2018-10-27 18:21:29 -04:00
|
|
|
// Make sure that MSK144 is not checked.
|
|
|
|
ui->actionMSK144->setChecked(false);
|
2018-10-18 13:24:07 -04:00
|
|
|
MessageBox::warning_message (this, tr ("Improper mode"),
|
2020-05-03 11:23:38 -04:00
|
|
|
"MSK144 not available if Fox, Hound, Field Day, RTTY, or WW Digi contest is selected.");
|
2018-10-18 13:24:07 -04:00
|
|
|
return;
|
|
|
|
}
|
2017-07-16 17:42:09 -04:00
|
|
|
m_mode="MSK144";
|
2016-10-20 15:25:48 -04:00
|
|
|
m_modeTx="MSK144";
|
|
|
|
ui->actionMSK144->setChecked(true);
|
|
|
|
switch_mode (Modes::MSK144);
|
|
|
|
m_nsps=6;
|
|
|
|
m_FFTSize = 7 * 512;
|
2016-06-16 21:27:00 -04:00
|
|
|
Q_EMIT FFTSize (m_FFTSize);
|
2016-10-20 15:25:48 -04:00
|
|
|
setup_status_bar (true);
|
2015-04-22 13:48:03 -04:00
|
|
|
m_toneSpacing=0.0;
|
2016-10-20 15:25:48 -04:00
|
|
|
WSPR_config(false);
|
2015-04-22 13:48:03 -04:00
|
|
|
VHF_features_enabled(true);
|
2017-06-19 22:48:30 -04:00
|
|
|
m_bFastMode=true;
|
2015-11-17 20:28:12 -05:00
|
|
|
m_bFast9=false;
|
2020-07-11 20:38:36 -04:00
|
|
|
ui->sbTR->values ({5, 10, 15, 30});
|
|
|
|
on_sbTR_valueChanged (ui->sbTR->value());
|
2017-06-19 22:48:30 -04:00
|
|
|
m_wideGraph->hide();
|
2020-05-25 09:35:31 -04:00
|
|
|
m_fastGraph->showNormal();
|
2016-10-20 15:25:48 -04:00
|
|
|
ui->TxFreqSpinBox->setValue(1500);
|
|
|
|
ui->RxFreqSpinBox->setValue(1500);
|
|
|
|
ui->RxFreqSpinBox->setMinimum(1400);
|
|
|
|
ui->RxFreqSpinBox->setMaximum(1600);
|
|
|
|
ui->RxFreqSpinBox->setSingleStep(10);
|
2020-10-03 19:46:59 -04:00
|
|
|
ui->lh_decodes_headings_label->setText(" UTC dB T Freq " + tr ("Message"));
|
|
|
|
ui->rh_decodes_headings_label->setText(" UTC dB T Freq " + tr ("Message"));
|
2018-02-12 11:59:31 -05:00
|
|
|
m_modulator->setTRPeriod(m_TRperiod); // TODO - not thread safe
|
|
|
|
m_detector->setTRPeriod(m_TRperiod); // TODO - not thread safe
|
|
|
|
m_fastGraph->setTRPeriod(m_TRperiod);
|
2020-10-03 19:46:59 -04:00
|
|
|
ui->lh_decodes_title_label->setText(tr ("Band Activity"));
|
|
|
|
ui->rh_decodes_title_label->setText(tr ("Tx Messages"));
|
2016-10-20 15:25:48 -04:00
|
|
|
ui->actionMSK144->setChecked(true);
|
|
|
|
ui->rptSpinBox->setMinimum(-8);
|
|
|
|
ui->rptSpinBox->setMaximum(24);
|
|
|
|
ui->rptSpinBox->setValue(0);
|
|
|
|
ui->rptSpinBox->setSingleStep(1);
|
2017-05-27 16:04:44 -04:00
|
|
|
ui->sbFtol->values ({20, 50, 100, 200});
|
2020-09-16 17:02:40 -04:00
|
|
|
displayWidgets(nWidgets("101111110100000000010001000010000000"));
|
2017-07-24 15:27:23 -04:00
|
|
|
fast_config(m_bFastMode);
|
2016-12-16 14:36:21 -05:00
|
|
|
statusChanged();
|
2018-07-31 13:18:57 -04:00
|
|
|
|
|
|
|
QString t0="";
|
2018-10-30 17:06:01 -04:00
|
|
|
if(SpecOp::NA_VHF==m_config.special_op_id()) t0+="NA VHF";
|
|
|
|
if(SpecOp::EU_VHF==m_config.special_op_id()) t0+="EU VHF";
|
2018-07-31 13:18:57 -04:00
|
|
|
if(t0=="") {
|
|
|
|
ui->labDXped->setVisible(false);
|
|
|
|
} else {
|
|
|
|
ui->labDXped->setVisible(true);
|
|
|
|
ui->labDXped->setText(t0);
|
2021-03-03 09:33:55 -05:00
|
|
|
on_contest_log_action_triggered();
|
2018-07-31 13:18:57 -04:00
|
|
|
}
|
2012-09-24 15:11:31 -04:00
|
|
|
}
|
2012-09-25 16:26:12 -04:00
|
|
|
|
2016-10-20 11:43:03 -04:00
|
|
|
void MainWindow::on_actionWSPR_triggered()
|
2015-05-27 09:08:28 -04:00
|
|
|
{
|
2016-10-14 10:15:34 -04:00
|
|
|
m_mode="WSPR";
|
2016-04-06 13:11:58 -04:00
|
|
|
WSPR_config(true);
|
2015-05-28 19:22:17 -04:00
|
|
|
switch_mode (Modes::WSPR);
|
2017-07-08 14:44:42 -04:00
|
|
|
m_modeTx="WSPR";
|
2019-05-22 12:44:28 -04:00
|
|
|
m_TRperiod=120.0;
|
2018-02-12 11:59:31 -05:00
|
|
|
m_modulator->setTRPeriod(m_TRperiod); // TODO - not thread safe
|
|
|
|
m_detector->setTRPeriod(m_TRperiod); // TODO - not thread safe
|
2015-05-27 09:08:28 -04:00
|
|
|
m_nsps=6912; //For symspec only
|
2016-06-16 21:27:00 -04:00
|
|
|
m_FFTSize = m_nsps / 2;
|
|
|
|
Q_EMIT FFTSize (m_FFTSize);
|
2015-05-27 09:08:28 -04:00
|
|
|
m_hsymStop=396;
|
|
|
|
m_toneSpacing=12000.0/8192.0;
|
2016-07-01 20:25:38 -04:00
|
|
|
setup_status_bar (false);
|
2016-10-20 11:43:03 -04:00
|
|
|
ui->actionWSPR->setChecked(true);
|
2015-05-27 09:08:28 -04:00
|
|
|
VHF_features_enabled(false);
|
2020-09-13 09:38:39 -04:00
|
|
|
ui->WSPRfreqSpinBox->setMinimum(1400);
|
|
|
|
ui->WSPRfreqSpinBox->setMaximum(1600);
|
2015-05-27 09:08:28 -04:00
|
|
|
m_wideGraph->setPeriod(m_TRperiod,m_nsps);
|
|
|
|
m_wideGraph->setMode(m_mode);
|
|
|
|
m_wideGraph->setModeTx(m_modeTx);
|
2015-11-17 20:28:12 -05:00
|
|
|
m_bFastMode=false;
|
|
|
|
m_bFast9=false;
|
2015-08-10 10:18:57 -04:00
|
|
|
ui->TxFreqSpinBox->setValue(ui->WSPRfreqSpinBox->value());
|
2020-09-16 17:02:40 -04:00
|
|
|
displayWidgets(nWidgets("000000000000000001010000000000000000"));
|
2017-07-24 15:27:23 -04:00
|
|
|
fast_config(false);
|
2016-12-16 14:36:21 -05:00
|
|
|
statusChanged();
|
2015-05-27 09:08:28 -04:00
|
|
|
}
|
|
|
|
|
2015-06-04 12:42:38 -04:00
|
|
|
void MainWindow::on_actionEcho_triggered()
|
|
|
|
{
|
2015-06-11 11:32:55 -04:00
|
|
|
on_actionJT4_triggered();
|
2015-06-04 12:42:38 -04:00
|
|
|
m_mode="Echo";
|
2015-06-05 20:02:02 -04:00
|
|
|
ui->actionEcho->setChecked(true);
|
2019-05-22 12:44:28 -04:00
|
|
|
m_TRperiod=3.0;
|
2018-02-12 11:59:31 -05:00
|
|
|
m_modulator->setTRPeriod(m_TRperiod); // TODO - not thread safe
|
|
|
|
m_detector->setTRPeriod(m_TRperiod); // TODO - not thread safe
|
2016-10-12 12:33:18 -04:00
|
|
|
m_nsps=6912; //For symspec only
|
2016-06-16 21:27:00 -04:00
|
|
|
m_FFTSize = m_nsps / 2;
|
|
|
|
Q_EMIT FFTSize (m_FFTSize);
|
2017-12-22 20:04:12 -05:00
|
|
|
m_hsymStop=9;
|
2015-06-05 20:02:02 -04:00
|
|
|
m_toneSpacing=1.0;
|
2015-06-04 12:42:38 -04:00
|
|
|
switch_mode(Modes::Echo);
|
2015-06-04 13:16:55 -04:00
|
|
|
m_modeTx="Echo";
|
2016-07-01 20:25:38 -04:00
|
|
|
setup_status_bar (true);
|
2015-06-09 10:42:53 -04:00
|
|
|
m_wideGraph->setMode(m_mode);
|
|
|
|
m_wideGraph->setModeTx(m_modeTx);
|
|
|
|
ui->TxFreqSpinBox->setValue(1500);
|
|
|
|
ui->TxFreqSpinBox->setEnabled (false);
|
2015-06-04 12:42:38 -04:00
|
|
|
if(!m_echoGraph->isVisible()) m_echoGraph->show();
|
2016-04-06 13:11:58 -04:00
|
|
|
if (!ui->actionAstronomical_data->isChecked ()) {
|
|
|
|
ui->actionAstronomical_data->setChecked (true);
|
|
|
|
}
|
2015-11-17 20:28:12 -05:00
|
|
|
m_bFastMode=false;
|
|
|
|
m_bFast9=false;
|
2016-10-12 12:33:18 -04:00
|
|
|
WSPR_config(true);
|
2020-10-03 19:46:59 -04:00
|
|
|
ui->lh_decodes_headings_label->setText(" UTC N Level Sig DF Width Q");
|
2020-09-16 17:02:40 -04:00
|
|
|
displayWidgets(nWidgets("000000000000000000000010000000000000"));
|
2017-07-24 15:27:23 -04:00
|
|
|
fast_config(false);
|
2016-12-16 14:36:21 -05:00
|
|
|
statusChanged();
|
2015-06-04 12:42:38 -04:00
|
|
|
}
|
|
|
|
|
2017-01-03 16:37:38 -05:00
|
|
|
void MainWindow::on_actionFreqCal_triggered()
|
|
|
|
{
|
2017-01-04 14:07:35 -05:00
|
|
|
on_actionJT9_triggered();
|
2017-01-03 16:37:38 -05:00
|
|
|
m_mode="FreqCal";
|
|
|
|
ui->actionFreqCal->setChecked(true);
|
2017-01-04 14:07:35 -05:00
|
|
|
switch_mode(Modes::FreqCal);
|
|
|
|
m_wideGraph->setMode(m_mode);
|
2020-07-11 20:38:36 -04:00
|
|
|
ui->sbTR->values ({5, 10, 15, 30});
|
|
|
|
on_sbTR_valueChanged (ui->sbTR->value());
|
2018-02-12 11:59:31 -05:00
|
|
|
m_modulator->setTRPeriod(m_TRperiod); // TODO - not thread safe
|
|
|
|
m_detector->setTRPeriod(m_TRperiod); // TODO - not thread safe
|
2017-01-03 16:37:38 -05:00
|
|
|
m_nsps=6912; //For symspec only
|
|
|
|
m_FFTSize = m_nsps / 2;
|
|
|
|
Q_EMIT FFTSize (m_FFTSize);
|
2017-01-12 13:21:58 -05:00
|
|
|
m_hsymStop=((int(m_TRperiod/0.288))/8)*8;
|
2017-01-09 08:50:02 -05:00
|
|
|
m_frequency_list_fcal_iter = m_config.frequencies ()->begin ();
|
2017-01-05 13:35:26 -05:00
|
|
|
ui->RxFreqSpinBox->setValue(1500);
|
2017-01-03 16:37:38 -05:00
|
|
|
setup_status_bar (true);
|
2017-01-05 13:35:26 -05:00
|
|
|
// 18:15:47 0 1 1500 1550.349 0.100 3.5 10.2
|
2020-10-03 19:46:59 -04:00
|
|
|
ui->lh_decodes_headings_label->setText(" UTC Freq CAL Offset fMeas DF Level S/N");
|
Improved frequency calibration
Measure check box added to FreqCal mode, check to record to fmt.all
with current calibration correction disabled, uncheck to see the
impact of the current calibration parameters.
The fmt.all file is now optionally renamed to fmt.bak when a
calibration solution is accepted. This allows users to preserve an
fmt.all file that they might have edited for best fit.
A calibration procedure might proceed thus:-
1) select FreqCal mode,
2) step through suggested calibration test frequencies deleting those
that have no usable signal,
3) enable "Menu->Tools->Execute frequency calibration cycle" and check
that suitable signals are present,
4) select a suitable FTol and T/R period,
5) check "Measure" and let the cycle complete a few times to gather
data,
6) uncheck "Measure" to complete the data capture, optionally tidy the
fmt.all file with your favourite editor,
7) push "Menu->Tools->Solve for calibration parameters" and accept if
you like what you see,
8) sit back and admire your accurately frequency calibrated station.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@8167 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2017-10-13 18:34:21 -04:00
|
|
|
ui->measure_check_box->setChecked (false);
|
2020-09-16 17:02:40 -04:00
|
|
|
displayWidgets(nWidgets("001101000000000000000000000001000000"));
|
2017-07-24 15:27:23 -04:00
|
|
|
statusChanged();
|
2017-01-03 16:37:38 -05:00
|
|
|
}
|
2015-11-17 20:28:12 -05:00
|
|
|
|
2015-05-28 19:22:17 -04:00
|
|
|
void MainWindow::switch_mode (Mode mode)
|
|
|
|
{
|
2016-10-21 14:07:12 -04:00
|
|
|
m_fastGraph->setMode(m_mode);
|
2017-07-07 19:11:41 -04:00
|
|
|
m_config.frequencies ()->filter (m_config.region (), mode);
|
2016-04-06 13:11:58 -04:00
|
|
|
auto const& row = m_config.frequencies ()->best_working_frequency (m_freqNominal);
|
2020-09-02 16:08:25 -04:00
|
|
|
ui->bandComboBox->setCurrentIndex (row);
|
2015-11-17 20:28:12 -05:00
|
|
|
if (row >= 0) {
|
|
|
|
on_bandComboBox_activated (row);
|
|
|
|
}
|
2016-07-13 16:05:56 -04:00
|
|
|
ui->rptSpinBox->setSingleStep(1);
|
|
|
|
ui->rptSpinBox->setMinimum(-50);
|
|
|
|
ui->rptSpinBox->setMaximum(49);
|
2020-09-11 09:13:11 -04:00
|
|
|
ui->sbFtol->values ({1, 2, 5, 10, 20, 50, 100, 200, 300, 400, 500, 1000});
|
2020-09-10 13:33:33 -04:00
|
|
|
ui->sbFST4W_FTol->values({1, 2, 5, 10, 20, 50, 100});
|
2016-10-01 20:23:09 -04:00
|
|
|
if(m_mode=="MSK144") {
|
|
|
|
ui->RxFreqSpinBox->setMinimum(1400);
|
|
|
|
ui->RxFreqSpinBox->setMaximum(1600);
|
|
|
|
ui->RxFreqSpinBox->setSingleStep(25);
|
|
|
|
} else {
|
|
|
|
ui->RxFreqSpinBox->setMinimum(200);
|
|
|
|
ui->RxFreqSpinBox->setMaximum(5000);
|
|
|
|
ui->RxFreqSpinBox->setSingleStep(1);
|
|
|
|
}
|
2017-01-04 14:07:35 -05:00
|
|
|
bool b=m_mode=="FreqCal";
|
|
|
|
ui->tabWidget->setVisible(!b);
|
|
|
|
if(b) {
|
|
|
|
ui->DX_controls_widget->setVisible(false);
|
2020-10-03 19:46:59 -04:00
|
|
|
ui->rh_decodes_widget->setVisible (false);
|
|
|
|
ui->lh_decodes_title_label->setVisible(false);
|
2017-01-04 14:07:35 -05:00
|
|
|
}
|
2015-05-28 19:22:17 -04:00
|
|
|
}
|
2015-05-27 09:08:28 -04:00
|
|
|
|
|
|
|
void MainWindow::WSPR_config(bool b)
|
|
|
|
{
|
2020-10-03 19:46:59 -04:00
|
|
|
ui->rh_decodes_widget->setVisible(!b);
|
2015-06-25 18:41:13 -04:00
|
|
|
ui->controls_stack_widget->setCurrentIndex (b && m_mode != "Echo" ? 1 : 0);
|
|
|
|
ui->QSO_controls_widget->setVisible (!b);
|
|
|
|
ui->DX_controls_widget->setVisible (!b);
|
|
|
|
ui->WSPR_controls_widget->setVisible (b);
|
2020-10-03 19:46:59 -04:00
|
|
|
ui->lh_decodes_title_label->setVisible(!b and ui->cbMenus->isChecked());
|
2015-05-27 09:08:28 -04:00
|
|
|
ui->logQSOButton->setVisible(!b);
|
|
|
|
ui->DecodeButton->setEnabled(!b);
|
2020-09-05 10:34:55 -04:00
|
|
|
bool bFST4W=(m_mode=="FST4W");
|
|
|
|
ui->sbTxPercent->setEnabled(!bFST4W or (tr("Random") == ui->RoundRobin->currentText()));
|
2020-06-16 15:56:15 -04:00
|
|
|
ui->band_hopping_group_box->setVisible(true);
|
2020-09-05 10:34:55 -04:00
|
|
|
ui->RoundRobin->setVisible(bFST4W);
|
|
|
|
ui->sbFST4W_RxFreq->setVisible(bFST4W);
|
|
|
|
ui->sbFST4W_FTol->setVisible(bFST4W);
|
2020-07-03 14:17:13 -04:00
|
|
|
ui->RoundRobin->lineEdit()->setAlignment(Qt::AlignCenter);
|
2020-07-23 13:51:05 -04:00
|
|
|
if(b and m_mode!="Echo" and m_mode!="FST4W") {
|
2016-11-02 08:38:18 -04:00
|
|
|
QString t="UTC dB DT Freq Drift Call Grid dBm ";
|
|
|
|
if(m_config.miles()) t += " mi";
|
|
|
|
if(!m_config.miles()) t += " km";
|
2020-10-03 19:46:59 -04:00
|
|
|
ui->lh_decodes_headings_label->setText(t);
|
2016-04-20 15:33:33 -04:00
|
|
|
if (m_config.is_transceiver_online ()) {
|
2020-09-08 07:54:19 -04:00
|
|
|
m_config.transceiver_tx_frequency (0); // turn off split
|
2016-04-06 13:11:58 -04:00
|
|
|
}
|
2015-06-11 18:42:41 -04:00
|
|
|
m_bSimplex = true;
|
2020-07-11 20:38:36 -04:00
|
|
|
} else
|
|
|
|
{
|
|
|
|
m_bSimplex = false;
|
|
|
|
}
|
2015-07-03 13:33:20 -04:00
|
|
|
enable_DXCC_entity (m_config.DXCC ()); // sets text window proportions and (re)inits the logbook
|
2015-05-27 09:08:28 -04:00
|
|
|
}
|
|
|
|
|
2015-11-17 20:28:12 -05:00
|
|
|
void MainWindow::fast_config(bool b)
|
|
|
|
{
|
|
|
|
m_bFastMode=b;
|
|
|
|
ui->TxFreqSpinBox->setEnabled(!b);
|
2017-07-24 15:27:23 -04:00
|
|
|
ui->sbTR->setVisible(b);
|
2016-09-13 13:52:45 -04:00
|
|
|
if(b and (m_bFast9 or m_mode=="MSK144" or m_mode=="ISCAT")) {
|
2015-11-17 20:28:12 -05:00
|
|
|
m_wideGraph->hide();
|
2020-05-25 09:35:31 -04:00
|
|
|
m_fastGraph->showNormal();
|
2015-11-17 20:28:12 -05:00
|
|
|
} else {
|
2020-05-25 09:35:31 -04:00
|
|
|
m_wideGraph->showNormal();
|
2015-11-17 20:28:12 -05:00
|
|
|
m_fastGraph->hide();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-10-05 15:14:45 -04:00
|
|
|
void MainWindow::on_TxFreqSpinBox_valueChanged(int n)
|
|
|
|
{
|
2013-08-10 11:29:55 -04:00
|
|
|
m_wideGraph->setTxFreq(n);
|
2018-02-10 21:29:27 -05:00
|
|
|
// if (ui->cbHoldTxFreq->isChecked ()) ui->RxFreqSpinBox->setValue(n);
|
2016-09-13 13:52:45 -04:00
|
|
|
if(m_mode!="MSK144") {
|
2016-09-06 11:36:17 -04:00
|
|
|
Q_EMIT transmitFrequency (n - m_XIT);
|
|
|
|
}
|
2016-05-24 06:08:35 -04:00
|
|
|
statusUpdate ();
|
2012-10-05 15:14:45 -04:00
|
|
|
}
|
2012-10-20 16:52:29 -04:00
|
|
|
|
2013-07-08 09:17:22 -04:00
|
|
|
void MainWindow::on_RxFreqSpinBox_valueChanged(int n)
|
|
|
|
{
|
2013-08-10 11:29:55 -04:00
|
|
|
m_wideGraph->setRxFreq(n);
|
Improved frequency calibration
Measure check box added to FreqCal mode, check to record to fmt.all
with current calibration correction disabled, uncheck to see the
impact of the current calibration parameters.
The fmt.all file is now optionally renamed to fmt.bak when a
calibration solution is accepted. This allows users to preserve an
fmt.all file that they might have edited for best fit.
A calibration procedure might proceed thus:-
1) select FreqCal mode,
2) step through suggested calibration test frequencies deleting those
that have no usable signal,
3) enable "Menu->Tools->Execute frequency calibration cycle" and check
that suitable signals are present,
4) select a suitable FTol and T/R period,
5) check "Measure" and let the cycle complete a few times to gather
data,
6) uncheck "Measure" to complete the data capture, optionally tidy the
fmt.all file with your favourite editor,
7) push "Menu->Tools->Solve for calibration parameters" and accept if
you like what you see,
8) sit back and admire your accurately frequency calibrated station.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@8167 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2017-10-13 18:34:21 -04:00
|
|
|
if (m_mode == "FreqCal") {
|
|
|
|
setRig ();
|
2017-09-27 08:39:50 -04:00
|
|
|
}
|
|
|
|
statusUpdate ();
|
2013-07-08 09:17:22 -04:00
|
|
|
}
|
|
|
|
|
2020-09-16 17:02:40 -04:00
|
|
|
void MainWindow::on_sbF_Low_valueChanged(int n)
|
|
|
|
{
|
|
|
|
m_wideGraph->setFST4_FreqRange(n,ui->sbF_High->value());
|
|
|
|
chk_FST4_freq_range();
|
|
|
|
}
|
|
|
|
|
|
|
|
void MainWindow::on_sbF_High_valueChanged(int n)
|
|
|
|
{
|
|
|
|
m_wideGraph->setFST4_FreqRange(ui->sbF_Low->value(),n);
|
|
|
|
chk_FST4_freq_range();
|
|
|
|
}
|
|
|
|
|
|
|
|
void MainWindow::chk_FST4_freq_range()
|
|
|
|
{
|
2020-09-18 13:33:30 -04:00
|
|
|
if(!m_bOK_to_chk) return;
|
2020-09-16 20:16:32 -04:00
|
|
|
if(ui->sbF_Low->value() < m_wideGraph->nStartFreq()) ui->sbF_Low->setValue(m_wideGraph->nStartFreq());
|
|
|
|
if(ui->sbF_High->value() > m_wideGraph->Fmax()) {
|
|
|
|
int n=m_wideGraph->Fmax()/100;
|
|
|
|
ui->sbF_High->setValue(100*n);
|
|
|
|
}
|
2020-09-16 17:02:40 -04:00
|
|
|
int maxDiff=2000;
|
|
|
|
if(m_TRperiod==120) maxDiff=1000;
|
|
|
|
if(m_TRperiod==300) maxDiff=400;
|
|
|
|
if(m_TRperiod>=900) maxDiff=200;
|
|
|
|
int diff=ui->sbF_High->value() - ui->sbF_Low->value();
|
|
|
|
|
|
|
|
if(diff<100 or diff>maxDiff) {
|
2020-10-01 07:58:09 -04:00
|
|
|
ui->sbF_Low->setStyleSheet("QSpinBox { color: white; background-color: red; }");
|
|
|
|
ui->sbF_High->setStyleSheet("QSpinBox { color: white; background-color: red; }");
|
2020-09-16 17:02:40 -04:00
|
|
|
} else {
|
|
|
|
ui->sbF_Low->setStyleSheet("");
|
|
|
|
ui->sbF_High->setStyleSheet("");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-01-06 08:53:06 -05:00
|
|
|
void MainWindow::on_actionQuickDecode_toggled (bool checked)
|
2012-10-31 14:33:56 -04:00
|
|
|
{
|
2017-01-06 08:53:06 -05:00
|
|
|
m_ndepth ^= (-checked ^ m_ndepth) & 0x00000001;
|
2012-10-31 14:33:56 -04:00
|
|
|
}
|
|
|
|
|
2017-01-06 08:53:06 -05:00
|
|
|
void MainWindow::on_actionMediumDecode_toggled (bool checked)
|
2012-10-31 14:33:56 -04:00
|
|
|
{
|
2017-01-06 08:53:06 -05:00
|
|
|
m_ndepth ^= (-checked ^ m_ndepth) & 0x00000002;
|
2012-10-31 14:33:56 -04:00
|
|
|
}
|
|
|
|
|
2017-01-06 08:53:06 -05:00
|
|
|
void MainWindow::on_actionDeepestDecode_toggled (bool checked)
|
2012-10-31 14:33:56 -04:00
|
|
|
{
|
2017-01-06 08:53:06 -05:00
|
|
|
m_ndepth ^= (-checked ^ m_ndepth) & 0x00000003;
|
2012-10-31 14:33:56 -04:00
|
|
|
}
|
2012-11-01 15:54:40 -04:00
|
|
|
|
2017-01-06 08:53:06 -05:00
|
|
|
void MainWindow::on_actionInclude_averaging_toggled (bool checked)
|
2015-04-22 13:48:03 -04:00
|
|
|
{
|
2017-01-06 08:53:06 -05:00
|
|
|
m_ndepth ^= (-checked ^ m_ndepth) & 0x00000010;
|
2015-04-22 13:48:03 -04:00
|
|
|
}
|
|
|
|
|
2020-06-30 17:14:58 -04:00
|
|
|
|
|
|
|
|
2017-01-06 08:53:06 -05:00
|
|
|
void MainWindow::on_actionInclude_correlation_toggled (bool checked)
|
2015-04-22 13:48:03 -04:00
|
|
|
{
|
2017-01-06 08:53:06 -05:00
|
|
|
m_ndepth ^= (-checked ^ m_ndepth) & 0x00000020;
|
2015-04-22 13:48:03 -04:00
|
|
|
}
|
|
|
|
|
2017-01-06 08:53:06 -05:00
|
|
|
void MainWindow::on_actionEnable_AP_DXcall_toggled (bool checked)
|
2016-11-27 10:50:47 -05:00
|
|
|
{
|
2017-01-06 08:53:06 -05:00
|
|
|
m_ndepth ^= (-checked ^ m_ndepth) & 0x00000040;
|
2016-11-27 10:50:47 -05:00
|
|
|
}
|
|
|
|
|
2013-03-18 12:14:18 -04:00
|
|
|
void MainWindow::on_actionErase_ALL_TXT_triggered() //Erase ALL.TXT
|
|
|
|
{
|
2016-07-03 16:31:19 -04:00
|
|
|
int ret = MessageBox::query_message (this, tr ("Confirm Erase"),
|
|
|
|
tr ("Are you sure you want to erase file ALL.TXT?"));
|
|
|
|
if(ret==MessageBox::Yes) {
|
2017-07-07 19:11:41 -04:00
|
|
|
QFile f {m_config.writeable_data_dir ().absoluteFilePath ("ALL.TXT")};
|
2013-03-18 12:14:18 -04:00
|
|
|
f.remove();
|
2013-03-18 16:22:51 -04:00
|
|
|
m_RxLog=1;
|
2013-03-18 12:14:18 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-11-11 23:44:03 -05:00
|
|
|
void MainWindow::on_reset_cabrillo_log_action_triggered ()
|
2018-08-01 15:52:35 -04:00
|
|
|
{
|
2018-11-22 20:18:39 -05:00
|
|
|
if (MessageBox::Yes == MessageBox::query_message (this, tr ("Confirm Reset"),
|
|
|
|
tr ("Are you sure you want to erase your contest log?"),
|
|
|
|
tr ("Doing this will remove all QSO records for the current contest. "
|
|
|
|
"They will be kept in the ADIF log file but will not be available "
|
|
|
|
"for export in your Cabrillo log.")))
|
2018-11-11 23:44:03 -05:00
|
|
|
{
|
2019-02-28 11:21:06 -05:00
|
|
|
if(m_config.RTTY_Exchange()!="SCC") ui->sbSerialNumber->setValue(1);
|
2019-05-29 18:35:18 -04:00
|
|
|
m_logBook.contest_log ()->reset ();
|
2018-11-11 23:44:03 -05:00
|
|
|
}
|
2017-12-22 09:51:22 -05:00
|
|
|
}
|
|
|
|
|
2018-10-03 16:25:36 -04:00
|
|
|
void MainWindow::on_actionExport_Cabrillo_log_triggered()
|
|
|
|
{
|
2019-05-29 18:35:18 -04:00
|
|
|
if (QDialog::Accepted == ExportCabrillo {m_settings, &m_config, m_logBook.contest_log ()}.exec())
|
2018-11-11 23:44:03 -05:00
|
|
|
{
|
|
|
|
MessageBox::information_message (this, tr ("Cabrillo Log saved"));
|
|
|
|
}
|
2018-10-03 16:25:36 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-03-18 12:14:18 -04:00
|
|
|
void MainWindow::on_actionErase_wsjtx_log_adi_triggered()
|
|
|
|
{
|
2016-07-03 16:31:19 -04:00
|
|
|
int ret = MessageBox::query_message (this, tr ("Confirm Erase"),
|
|
|
|
tr ("Are you sure you want to erase file wsjtx_log.adi?"));
|
|
|
|
if(ret==MessageBox::Yes) {
|
2017-07-07 19:11:41 -04:00
|
|
|
QFile f {m_config.writeable_data_dir ().absoluteFilePath ("wsjtx_log.adi")};
|
2013-03-18 12:14:18 -04:00
|
|
|
f.remove();
|
|
|
|
}
|
|
|
|
}
|
2013-03-18 18:47:24 -04:00
|
|
|
|
2019-01-08 15:41:59 -05:00
|
|
|
void MainWindow::on_actionErase_WSPR_hashtable_triggered()
|
|
|
|
{
|
|
|
|
int ret = MessageBox::query_message(this, tr ("Confirm Erase"),
|
|
|
|
tr ("Are you sure you want to erase the WSPR hashtable?"));
|
|
|
|
if(ret==MessageBox::Yes) {
|
|
|
|
QFile f {m_config.writeable_data_dir().absoluteFilePath("hashtable.txt")};
|
|
|
|
f.remove();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2014-10-04 07:47:03 -04:00
|
|
|
void MainWindow::on_actionOpen_log_directory_triggered ()
|
|
|
|
{
|
2017-07-07 19:11:41 -04:00
|
|
|
QDesktopServices::openUrl (QUrl::fromLocalFile (m_config.writeable_data_dir ().absolutePath ()));
|
2014-10-04 07:47:03 -04:00
|
|
|
}
|
|
|
|
|
2015-05-28 19:22:17 -04:00
|
|
|
void MainWindow::on_bandComboBox_currentIndexChanged (int index)
|
2013-03-23 14:24:27 -04:00
|
|
|
{
|
2015-05-28 19:22:17 -04:00
|
|
|
auto const& frequencies = m_config.frequencies ();
|
2017-08-09 12:06:17 -04:00
|
|
|
auto const& source_index = frequencies->mapToSource (frequencies->index (index, FrequencyList_v2::frequency_column));
|
2016-04-06 13:11:58 -04:00
|
|
|
Frequency frequency {m_freqNominal};
|
2015-05-28 19:22:17 -04:00
|
|
|
if (source_index.isValid ())
|
|
|
|
{
|
|
|
|
frequency = frequencies->frequency_list ()[source_index.row ()].frequency_;
|
|
|
|
}
|
|
|
|
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
// Lookup band
|
2015-05-28 19:22:17 -04:00
|
|
|
auto const& band = m_config.bands ()->find (frequency);
|
2020-09-08 10:24:55 -04:00
|
|
|
ui->bandComboBox->setCurrentText (band.size () ? band : m_config.bands ()->oob ());
|
|
|
|
displayDialFrequency ();
|
|
|
|
}
|
|
|
|
|
|
|
|
void MainWindow::on_bandComboBox_editTextChanged (QString const& text)
|
|
|
|
{
|
|
|
|
if (text.size () && m_config.bands ()->oob () != text)
|
2015-05-28 19:22:17 -04:00
|
|
|
{
|
|
|
|
ui->bandComboBox->lineEdit ()->setStyleSheet ({});
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
ui->bandComboBox->lineEdit ()->setStyleSheet ("QLineEdit {color: yellow; background-color : red;}");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void MainWindow::on_bandComboBox_activated (int index)
|
|
|
|
{
|
|
|
|
auto const& frequencies = m_config.frequencies ();
|
2017-08-09 12:06:17 -04:00
|
|
|
auto const& source_index = frequencies->mapToSource (frequencies->index (index, FrequencyList_v2::frequency_column));
|
2016-04-06 13:11:58 -04:00
|
|
|
Frequency frequency {m_freqNominal};
|
2015-05-28 19:22:17 -04:00
|
|
|
if (source_index.isValid ())
|
|
|
|
{
|
|
|
|
frequency = frequencies->frequency_list ()[source_index.row ()].frequency_;
|
|
|
|
}
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
m_bandEdited = true;
|
2015-05-28 19:22:17 -04:00
|
|
|
band_changed (frequency);
|
2015-05-31 07:51:31 -04:00
|
|
|
m_wideGraph->setRxBand (m_config.bands ()->find (frequency));
|
2013-03-26 12:23:40 -04:00
|
|
|
}
|
2013-04-03 11:35:11 -04:00
|
|
|
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
void MainWindow::band_changed (Frequency f)
|
2013-04-03 11:35:11 -04:00
|
|
|
{
|
2016-10-25 16:24:09 -04:00
|
|
|
// Set the attenuation value if options are checked
|
|
|
|
QString curBand = ui->bandComboBox->currentText();
|
|
|
|
if (m_config.pwrBandTxMemory() && !m_tune) {
|
2016-10-25 18:49:20 -04:00
|
|
|
if (m_pwrBandTxMemory.contains(curBand)) {
|
|
|
|
ui->outAttenuation->setValue(m_pwrBandTxMemory[curBand].toInt());
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
m_pwrBandTxMemory[curBand] = ui->outAttenuation->value();
|
|
|
|
}
|
2016-10-25 16:24:09 -04:00
|
|
|
}
|
|
|
|
|
2015-05-27 09:08:28 -04:00
|
|
|
if (m_bandEdited) {
|
2020-07-02 09:39:11 -04:00
|
|
|
if (m_mode!="WSPR") { // band hopping preserves auto Tx
|
2016-04-06 13:11:58 -04:00
|
|
|
if (f + m_wideGraph->nStartFreq () > m_freqNominal + ui->TxFreqSpinBox->value ()
|
|
|
|
|| f + m_wideGraph->nStartFreq () + m_wideGraph->fSpan () <=
|
|
|
|
m_freqNominal + ui->TxFreqSpinBox->value ()) {
|
2016-04-11 16:53:54 -04:00
|
|
|
// qDebug () << "start f:" << m_wideGraph->nStartFreq () << "span:" << m_wideGraph->fSpan () << "DF:" << ui->TxFreqSpinBox->value ();
|
2016-04-06 13:11:58 -04:00
|
|
|
// disable auto Tx if "blind" QSY outside of waterfall
|
|
|
|
ui->stopTxButton->click (); // halt any transmission
|
|
|
|
auto_tx_mode (false); // disable auto Tx
|
2018-07-30 11:48:18 -04:00
|
|
|
// m_send_RR73 = false; // force user to reassess on new band
|
2016-04-06 13:11:58 -04:00
|
|
|
}
|
2015-12-24 14:42:36 -05:00
|
|
|
}
|
2016-04-06 13:11:58 -04:00
|
|
|
m_lastBand.clear ();
|
2015-05-27 09:08:28 -04:00
|
|
|
m_bandEdited = false;
|
2020-08-15 18:32:10 -04:00
|
|
|
if (m_config.spot_to_psk_reporter ())
|
|
|
|
{
|
|
|
|
// Upload any queued spots before changing band
|
|
|
|
m_psk_Reporter.sendReport();
|
|
|
|
}
|
2016-10-20 09:16:58 -04:00
|
|
|
if (!m_transmitting) monitor (true);
|
2017-01-12 16:03:30 -05:00
|
|
|
if ("FreqCal" == m_mode)
|
|
|
|
{
|
|
|
|
m_frequency_list_fcal_iter = m_config.frequencies ()->find (f);
|
|
|
|
}
|
Improved frequency calibration
Measure check box added to FreqCal mode, check to record to fmt.all
with current calibration correction disabled, uncheck to see the
impact of the current calibration parameters.
The fmt.all file is now optionally renamed to fmt.bak when a
calibration solution is accepted. This allows users to preserve an
fmt.all file that they might have edited for best fit.
A calibration procedure might proceed thus:-
1) select FreqCal mode,
2) step through suggested calibration test frequencies deleting those
that have no usable signal,
3) enable "Menu->Tools->Execute frequency calibration cycle" and check
that suitable signals are present,
4) select a suitable FTol and T/R period,
5) check "Measure" and let the cycle complete a few times to gather
data,
6) uncheck "Measure" to complete the data capture, optionally tidy the
fmt.all file with your favourite editor,
7) push "Menu->Tools->Solve for calibration parameters" and accept if
you like what you see,
8) sit back and admire your accurately frequency calibrated station.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@8167 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2017-10-13 18:34:21 -04:00
|
|
|
setRig (f);
|
|
|
|
setXIT (ui->TxFreqSpinBox->value ());
|
2015-05-27 09:08:28 -04:00
|
|
|
}
|
2013-04-03 11:35:11 -04:00
|
|
|
}
|
2013-04-03 12:44:31 -04:00
|
|
|
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
void MainWindow::enable_DXCC_entity (bool on)
|
2013-07-31 07:29:42 -04:00
|
|
|
{
|
2020-07-23 13:51:05 -04:00
|
|
|
if (on and m_mode!="WSPR" and m_mode!="FST4W" and m_mode!="Echo") {
|
2018-10-24 19:00:19 -04:00
|
|
|
//m_logBook.init(); // re-read the log and cty.dat files
|
2017-12-25 16:16:02 -05:00
|
|
|
// ui->gridLayout->setColumnStretch(0,55); // adjust proportions of text displays
|
|
|
|
// ui->gridLayout->setColumnStretch(1,45);
|
2015-07-01 13:38:18 -04:00
|
|
|
} else {
|
2017-12-25 16:16:02 -05:00
|
|
|
// ui->gridLayout->setColumnStretch(0,0);
|
|
|
|
// ui->gridLayout->setColumnStretch(1,0);
|
2015-07-01 13:38:18 -04:00
|
|
|
}
|
2015-07-03 13:33:20 -04:00
|
|
|
updateGeometry ();
|
2013-04-03 17:32:21 -04:00
|
|
|
}
|
2013-04-07 21:50:49 -04:00
|
|
|
|
2013-04-08 14:31:21 -04:00
|
|
|
void MainWindow::on_rptSpinBox_valueChanged(int n)
|
|
|
|
{
|
2016-07-13 16:05:56 -04:00
|
|
|
int step=ui->rptSpinBox->singleStep();
|
|
|
|
if(n%step !=0) {
|
|
|
|
n++;
|
|
|
|
ui->rptSpinBox->setValue(n);
|
|
|
|
}
|
2013-04-08 14:31:21 -04:00
|
|
|
m_rpt=QString::number(n);
|
2013-04-23 20:45:01 -04:00
|
|
|
int ntx0=m_ntx;
|
2013-04-08 14:31:21 -04:00
|
|
|
genStdMsgs(m_rpt);
|
2013-04-23 20:45:01 -04:00
|
|
|
m_ntx=ntx0;
|
|
|
|
if(m_ntx==1) ui->txrb1->setChecked(true);
|
|
|
|
if(m_ntx==2) ui->txrb2->setChecked(true);
|
|
|
|
if(m_ntx==3) ui->txrb3->setChecked(true);
|
|
|
|
if(m_ntx==4) ui->txrb4->setChecked(true);
|
|
|
|
if(m_ntx==5) ui->txrb5->setChecked(true);
|
|
|
|
if(m_ntx==6) ui->txrb6->setChecked(true);
|
2013-05-08 11:23:02 -04:00
|
|
|
statusChanged();
|
2013-04-23 20:45:01 -04:00
|
|
|
}
|
2013-04-11 12:51:57 -04:00
|
|
|
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
void MainWindow::on_tuneButton_clicked (bool checked)
|
2013-04-11 12:51:57 -04:00
|
|
|
{
|
2016-10-25 16:24:09 -04:00
|
|
|
static bool lastChecked = false;
|
|
|
|
if (lastChecked == checked) return;
|
|
|
|
lastChecked = checked;
|
|
|
|
QString curBand = ui->bandComboBox->currentText();
|
|
|
|
if (checked && m_tune==false) { // we're starting tuning so remember Tx and change pwr to Tune value
|
|
|
|
if (m_config.pwrBandTuneMemory ()) {
|
|
|
|
m_pwrBandTxMemory[curBand] = ui->outAttenuation->value(); // remember our Tx pwr
|
|
|
|
m_PwrBandSetOK = false;
|
2016-10-25 17:15:12 -04:00
|
|
|
if (m_pwrBandTuneMemory.contains(curBand)) {
|
|
|
|
ui->outAttenuation->setValue(m_pwrBandTuneMemory[curBand].toInt()); // set to Tune pwr
|
|
|
|
}
|
2016-10-25 16:24:09 -04:00
|
|
|
m_PwrBandSetOK = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else { // we're turning off so remember our Tune pwr setting and reset to Tx pwr
|
|
|
|
if (m_config.pwrBandTuneMemory() || m_config.pwrBandTxMemory()) {
|
2018-09-26 15:27:24 -04:00
|
|
|
stopTx();
|
2016-10-25 16:24:09 -04:00
|
|
|
m_pwrBandTuneMemory[curBand] = ui->outAttenuation->value(); // remember our Tune pwr
|
|
|
|
m_PwrBandSetOK = false;
|
|
|
|
ui->outAttenuation->setValue(m_pwrBandTxMemory[curBand].toInt()); // set to Tx pwr
|
|
|
|
m_PwrBandSetOK = true;
|
|
|
|
}
|
|
|
|
}
|
2015-05-27 09:08:28 -04:00
|
|
|
if (m_tune) {
|
2016-06-10 11:54:16 -04:00
|
|
|
tuneButtonTimer.start(250);
|
2015-05-27 09:08:28 -04:00
|
|
|
} else {
|
|
|
|
m_sentFirst73=false;
|
|
|
|
itone[0]=0;
|
|
|
|
on_monitorButton_clicked (true);
|
2015-06-11 09:52:55 -04:00
|
|
|
m_tune=true;
|
2015-05-27 09:08:28 -04:00
|
|
|
}
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
Q_EMIT tune (checked);
|
2013-04-11 12:51:57 -04:00
|
|
|
}
|
2013-04-12 13:57:20 -04:00
|
|
|
|
2014-04-11 18:50:44 -04:00
|
|
|
void MainWindow::stop_tuning ()
|
2013-04-14 10:11:20 -04:00
|
|
|
{
|
2015-11-17 20:28:12 -05:00
|
|
|
on_tuneButton_clicked(false);
|
2014-04-11 18:50:44 -04:00
|
|
|
ui->tuneButton->setChecked (false);
|
2015-06-11 09:52:55 -04:00
|
|
|
m_bTxTime=false;
|
|
|
|
m_tune=false;
|
2013-04-14 10:11:20 -04:00
|
|
|
}
|
2013-04-17 11:53:43 -04:00
|
|
|
|
2015-05-27 09:08:28 -04:00
|
|
|
void MainWindow::stopTuneATU()
|
|
|
|
{
|
|
|
|
on_tuneButton_clicked(false);
|
|
|
|
m_bTxTime=false;
|
|
|
|
}
|
|
|
|
|
2013-04-17 11:53:43 -04:00
|
|
|
void MainWindow::on_stopTxButton_clicked() //Stop Tx
|
|
|
|
{
|
2015-04-22 13:48:03 -04:00
|
|
|
if (m_tune) stop_tuning ();
|
2015-05-27 09:08:28 -04:00
|
|
|
if (m_auto and !m_tuneup) auto_tx_mode (false);
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
m_btxok=false;
|
2017-07-24 15:27:23 -04:00
|
|
|
m_bCallingCQ = false;
|
|
|
|
m_bAutoReply = false; // ready for next
|
2017-07-25 21:38:44 -04:00
|
|
|
ui->cbFirst->setStyleSheet ("");
|
2013-04-22 20:52:51 -04:00
|
|
|
}
|
2013-04-24 11:00:30 -04:00
|
|
|
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
void MainWindow::rigOpen ()
|
2013-04-24 11:00:30 -04:00
|
|
|
{
|
2015-06-25 18:41:13 -04:00
|
|
|
update_dynamic_property (ui->readFreq, "state", "warning");
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
ui->readFreq->setText ("");
|
2015-06-25 18:41:13 -04:00
|
|
|
ui->readFreq->setEnabled (true);
|
2016-04-20 15:33:33 -04:00
|
|
|
m_config.transceiver_online ();
|
2020-09-08 07:54:19 -04:00
|
|
|
m_config.sync_transceiver (true, true);
|
2013-04-24 11:00:30 -04:00
|
|
|
}
|
2013-04-24 12:05:04 -04:00
|
|
|
|
|
|
|
void MainWindow::on_pbR2T_clicked()
|
|
|
|
{
|
2017-09-30 13:48:46 -04:00
|
|
|
ui->TxFreqSpinBox->setValue(ui->RxFreqSpinBox->value ());
|
2013-04-24 12:05:04 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void MainWindow::on_pbT2R_clicked()
|
|
|
|
{
|
2014-09-24 13:25:19 -04:00
|
|
|
if (ui->RxFreqSpinBox->isEnabled ())
|
|
|
|
{
|
|
|
|
ui->RxFreqSpinBox->setValue (ui->TxFreqSpinBox->value ());
|
|
|
|
}
|
2013-04-24 12:05:04 -04:00
|
|
|
}
|
2013-04-29 19:53:23 -04:00
|
|
|
|
2013-05-03 20:12:27 -04:00
|
|
|
|
|
|
|
void MainWindow::on_readFreq_clicked()
|
|
|
|
{
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
if (m_transmitting) return;
|
|
|
|
|
2016-04-20 15:33:33 -04:00
|
|
|
if (m_config.transceiver_online ())
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
{
|
2020-09-08 07:54:19 -04:00
|
|
|
m_config.sync_transceiver (true, true);
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
}
|
2013-05-03 20:12:27 -04:00
|
|
|
}
|
2013-05-07 12:35:50 -04:00
|
|
|
|
2013-07-08 09:17:22 -04:00
|
|
|
void MainWindow::on_pbTxMode_clicked()
|
|
|
|
{
|
2018-11-24 09:09:50 -05:00
|
|
|
if(m_mode=="JT9+JT65") {
|
|
|
|
if(m_modeTx=="JT9") {
|
|
|
|
m_modeTx="JT65";
|
|
|
|
ui->pbTxMode->setText("Tx JT65 #");
|
|
|
|
} else {
|
|
|
|
m_modeTx="JT9";
|
|
|
|
ui->pbTxMode->setText("Tx JT9 @");
|
|
|
|
}
|
|
|
|
m_wideGraph->setModeTx(m_modeTx);
|
|
|
|
statusChanged();
|
2013-07-08 09:17:22 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-04-06 13:11:58 -04:00
|
|
|
void MainWindow::setXIT(int n, Frequency base)
|
2013-07-08 09:17:22 -04:00
|
|
|
{
|
2016-04-06 13:11:58 -04:00
|
|
|
if (m_transmitting && !m_config.tx_QSY_allowed ()) return;
|
2016-11-26 20:34:43 -05:00
|
|
|
// If "CQ nnn ..." feature is active, set the proper Tx frequency
|
2016-11-28 11:20:57 -05:00
|
|
|
if(m_config.split_mode () && ui->cbCQTx->isEnabled () && ui->cbCQTx->isVisible () &&
|
|
|
|
ui->cbCQTx->isChecked())
|
2016-11-26 20:34:43 -05:00
|
|
|
{
|
2017-05-12 16:46:19 -04:00
|
|
|
if (6 == m_ntx || (7 == m_ntx && m_gen_message_is_cq))
|
2016-11-26 20:34:43 -05:00
|
|
|
{
|
|
|
|
// All conditions are met, use calling frequency
|
|
|
|
base = m_freqNominal / 1000000 * 1000000 + 1000 * ui->sbCQTxFreq->value () + m_XIT;
|
|
|
|
}
|
|
|
|
}
|
2016-04-06 13:11:58 -04:00
|
|
|
if (!base) base = m_freqNominal;
|
2013-07-31 20:49:58 -04:00
|
|
|
m_XIT = 0;
|
2015-11-17 20:28:12 -05:00
|
|
|
if (!m_bSimplex) {
|
|
|
|
// m_bSimplex is false, so we can use split mode if requested
|
2020-07-24 10:58:10 -04:00
|
|
|
if (m_config.split_mode () && (!m_config.enable_VHF_features () || m_mode == "FT8" ||
|
|
|
|
m_mode=="FST4")) {
|
2016-04-11 19:29:29 -04:00
|
|
|
// Don't use XIT for VHF & up
|
2015-11-17 20:28:12 -05:00
|
|
|
m_XIT=(n/500)*500 - 1500;
|
|
|
|
}
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
|
2016-04-06 13:11:58 -04:00
|
|
|
if ((m_monitoring || m_transmitting)
|
2016-04-20 15:33:33 -04:00
|
|
|
&& m_config.is_transceiver_online ()
|
2016-04-06 13:11:58 -04:00
|
|
|
&& m_config.split_mode ())
|
|
|
|
{
|
|
|
|
// All conditions are met, reset the transceiver Tx dial
|
|
|
|
// frequency
|
|
|
|
m_freqTxNominal = base + m_XIT;
|
|
|
|
if (m_astroWidget) m_astroWidget->nominal_frequency (m_freqNominal, m_freqTxNominal);
|
2020-09-08 07:54:19 -04:00
|
|
|
m_config.transceiver_tx_frequency (m_freqTxNominal + m_astroCorrection.tx);
|
2015-11-17 20:28:12 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
//Now set the audio Tx freq
|
2014-09-24 13:25:19 -04:00
|
|
|
Q_EMIT transmitFrequency (ui->TxFreqSpinBox->value () - m_XIT);
|
2013-07-08 09:17:22 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void MainWindow::setFreq4(int rxFreq, int txFreq)
|
|
|
|
{
|
2017-10-01 08:35:43 -04:00
|
|
|
if (ui->RxFreqSpinBox->isEnabled ()) ui->RxFreqSpinBox->setValue(rxFreq);
|
2020-07-23 13:51:05 -04:00
|
|
|
if(m_mode=="WSPR" or m_mode=="FST4W") {
|
2015-06-05 09:42:45 -04:00
|
|
|
ui->WSPRfreqSpinBox->setValue(txFreq);
|
|
|
|
} else {
|
|
|
|
if (ui->TxFreqSpinBox->isEnabled ()) {
|
2014-09-24 13:25:19 -04:00
|
|
|
ui->TxFreqSpinBox->setValue(txFreq);
|
2020-09-29 13:00:57 -04:00
|
|
|
if ("FT8" == m_mode || "FT4" == m_mode || m_mode=="FST4")
|
2019-08-15 10:20:45 -04:00
|
|
|
{
|
|
|
|
// we need to regenerate the current transmit waveform for
|
|
|
|
// GFSK modulated modes
|
2019-09-07 16:23:39 -04:00
|
|
|
if (m_transmitting) m_restart = true;
|
2019-08-15 10:20:45 -04:00
|
|
|
}
|
2014-09-24 13:25:19 -04:00
|
|
|
}
|
2016-04-11 19:29:29 -04:00
|
|
|
else if (m_config.enable_VHF_features ()
|
2016-04-06 13:11:58 -04:00
|
|
|
&& (Qt::ControlModifier & QApplication::keyboardModifiers ())) {
|
2016-04-11 19:29:29 -04:00
|
|
|
// for VHF & up we adjust Tx dial frequency to equalize Tx to Rx
|
|
|
|
// when user CTRL+clicks on waterfall
|
2016-04-06 13:11:58 -04:00
|
|
|
auto temp = ui->TxFreqSpinBox->value ();
|
|
|
|
ui->RxFreqSpinBox->setValue (temp);
|
2016-11-26 20:34:43 -05:00
|
|
|
setRig (m_freqNominal + txFreq - temp);
|
2016-04-06 13:11:58 -04:00
|
|
|
setXIT (ui->TxFreqSpinBox->value ());
|
|
|
|
}
|
2015-06-05 09:42:45 -04:00
|
|
|
}
|
2013-07-08 09:17:22 -04:00
|
|
|
}
|
2013-05-28 15:34:18 -04:00
|
|
|
|
2016-04-06 13:11:58 -04:00
|
|
|
void MainWindow::handle_transceiver_update (Transceiver::TransceiverState const& s)
|
2013-07-11 16:41:46 -04:00
|
|
|
{
|
2016-04-06 13:11:58 -04:00
|
|
|
Transceiver::TransceiverState old_state {m_rigState};
|
|
|
|
//transmitDisplay (s.ptt ());
|
2020-08-14 21:57:23 -04:00
|
|
|
if (s.ptt () // && !m_rigState.ptt ()
|
|
|
|
) { // safe to start audio
|
2019-04-02 11:39:28 -04:00
|
|
|
// (caveat - DX Lab Suite Commander)
|
|
|
|
if (m_tx_when_ready && g_iptt) { // waiting to Tx and still needed
|
|
|
|
int ms_delay=1000*m_config.txDelay();
|
|
|
|
if(m_mode=="FT4") ms_delay=20;
|
|
|
|
ptt1Timer.start(ms_delay); //Start-of-transmission sequencer delay
|
2020-08-14 21:57:23 -04:00
|
|
|
m_tx_when_ready = false;
|
2017-06-30 20:19:58 -04:00
|
|
|
}
|
2019-04-02 11:39:28 -04:00
|
|
|
}
|
2016-04-06 13:11:58 -04:00
|
|
|
m_rigState = s;
|
2017-07-16 10:32:48 -04:00
|
|
|
auto old_freqNominal = m_freqNominal;
|
2017-08-03 07:23:07 -04:00
|
|
|
if (!old_freqNominal)
|
|
|
|
{
|
|
|
|
// always take initial rig frequency to avoid start up problems
|
|
|
|
// with bogus Tx frequencies
|
|
|
|
m_freqNominal = s.frequency ();
|
|
|
|
}
|
2016-04-06 13:11:58 -04:00
|
|
|
if (old_state.online () == false && s.online () == true)
|
|
|
|
{
|
|
|
|
// initializing
|
|
|
|
on_monitorButton_clicked (!m_config.monitor_off_at_startup ());
|
|
|
|
}
|
|
|
|
if (s.frequency () != old_state.frequency () || s.split () != m_splitMode)
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
{
|
|
|
|
m_splitMode = s.split ();
|
2017-08-03 07:23:07 -04:00
|
|
|
if (!s.ptt ())
|
2016-04-06 13:11:58 -04:00
|
|
|
{
|
2017-08-03 07:23:07 -04:00
|
|
|
m_freqNominal = s.frequency () - m_astroCorrection.rx;
|
|
|
|
if (old_freqNominal != m_freqNominal)
|
2016-04-06 13:11:58 -04:00
|
|
|
{
|
|
|
|
m_freqTxNominal = m_freqNominal;
|
2016-11-26 20:34:43 -05:00
|
|
|
genCQMsg ();
|
2016-04-06 13:11:58 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
if (m_monitoring)
|
|
|
|
{
|
|
|
|
m_lastMonitoredFrequency = m_freqNominal;
|
|
|
|
}
|
2016-11-26 20:34:43 -05:00
|
|
|
if (m_lastDialFreq != m_freqNominal &&
|
|
|
|
(m_mode != "MSK144"
|
|
|
|
|| !(ui->cbCQTx->isEnabled () && ui->cbCQTx->isVisible () && ui->cbCQTx->isChecked()))) {
|
2016-06-03 11:45:54 -04:00
|
|
|
m_lastDialFreq = m_freqNominal;
|
|
|
|
m_secBandChanged=QDateTime::currentMSecsSinceEpoch()/1000;
|
2020-08-15 19:38:19 -04:00
|
|
|
pskSetLocal ();
|
2016-06-03 11:45:54 -04:00
|
|
|
statusChanged();
|
|
|
|
m_wideGraph->setDialFreq(m_freqNominal / 1.e6);
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
m_freqTxNominal = s.split () ? s.tx_frequency () - m_astroCorrection.tx : s.frequency ();
|
|
|
|
}
|
2016-04-06 13:11:58 -04:00
|
|
|
if (m_astroWidget) m_astroWidget->nominal_frequency (m_freqNominal, m_freqTxNominal);
|
2016-06-03 11:45:54 -04:00
|
|
|
}
|
2016-04-06 13:11:58 -04:00
|
|
|
// ensure frequency display is correct
|
|
|
|
if (m_astroWidget && old_state.ptt () != s.ptt ()) setRig ();
|
|
|
|
|
|
|
|
displayDialFrequency ();
|
2015-06-25 18:41:13 -04:00
|
|
|
update_dynamic_property (ui->readFreq, "state", "ok");
|
|
|
|
ui->readFreq->setEnabled (false);
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
ui->readFreq->setText (s.split () ? "S" : "");
|
|
|
|
}
|
|
|
|
|
2016-04-06 13:11:58 -04:00
|
|
|
void MainWindow::handle_transceiver_failure (QString const& reason)
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
{
|
2015-06-25 18:41:13 -04:00
|
|
|
update_dynamic_property (ui->readFreq, "state", "error");
|
|
|
|
ui->readFreq->setEnabled (true);
|
2014-12-06 15:23:29 -05:00
|
|
|
on_stopTxButton_clicked ();
|
2016-07-03 16:31:19 -04:00
|
|
|
rigFailure (reason);
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
}
|
|
|
|
|
2016-07-03 16:31:19 -04:00
|
|
|
void MainWindow::rigFailure (QString const& reason)
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
{
|
2016-04-30 20:40:51 -04:00
|
|
|
if (m_first_error)
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
{
|
2014-10-04 10:45:09 -04:00
|
|
|
// one automatic retry
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
QTimer::singleShot (0, this, SLOT (rigOpen ()));
|
2016-04-30 20:40:51 -04:00
|
|
|
m_first_error = false;
|
2014-10-04 10:45:09 -04:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2016-08-12 12:12:52 -04:00
|
|
|
if (m_splash && m_splash->isVisible ()) m_splash->hide ();
|
2021-01-16 18:35:53 -05:00
|
|
|
m_rigErrorMessageBox.setDetailedText (reason + "\n\nTimestamp: "
|
2021-01-27 16:14:11 -05:00
|
|
|
#if QT_VERSION >= QT_VERSION_CHECK (5, 8, 0)
|
|
|
|
+ QDateTime::currentDateTimeUtc ().toString (Qt::ISODateWithMs)
|
|
|
|
#else
|
|
|
|
+ QDateTime::currentDateTimeUtc ().toString ("yyyy-MM-ddTHH:mm:ss.zzzZ")
|
|
|
|
#endif
|
|
|
|
);
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
|
2014-10-04 10:45:09 -04:00
|
|
|
// don't call slot functions directly to avoid recursion
|
2016-09-10 21:09:50 -04:00
|
|
|
m_rigErrorMessageBox.exec ();
|
|
|
|
auto const clicked_button = m_rigErrorMessageBox.clickedButton ();
|
|
|
|
if (clicked_button == m_configurations_button)
|
2014-10-04 10:45:09 -04:00
|
|
|
{
|
2016-09-10 21:09:50 -04:00
|
|
|
ui->menuConfig->exec (QCursor::pos ());
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
switch (m_rigErrorMessageBox.standardButton (clicked_button))
|
|
|
|
{
|
|
|
|
case MessageBox::Ok:
|
2017-07-25 21:38:37 -04:00
|
|
|
m_config.select_tab (1);
|
2016-09-10 21:09:50 -04:00
|
|
|
QTimer::singleShot (0, this, SLOT (on_actionSettings_triggered ()));
|
|
|
|
break;
|
2014-10-04 10:45:09 -04:00
|
|
|
|
2016-09-10 21:09:50 -04:00
|
|
|
case MessageBox::Retry:
|
|
|
|
QTimer::singleShot (0, this, SLOT (rigOpen ()));
|
|
|
|
break;
|
2014-10-04 10:45:09 -04:00
|
|
|
|
2016-09-10 21:09:50 -04:00
|
|
|
case MessageBox::Cancel:
|
|
|
|
QTimer::singleShot (0, this, SLOT (close ()));
|
|
|
|
break;
|
|
|
|
|
|
|
|
default: break; // squashing compile warnings
|
|
|
|
}
|
2014-10-04 10:45:09 -04:00
|
|
|
}
|
2016-04-30 20:40:51 -04:00
|
|
|
m_first_error = true; // reset
|
2013-07-23 13:32:59 -04:00
|
|
|
}
|
|
|
|
}
|
2013-08-05 09:57:55 -04:00
|
|
|
|
|
|
|
void MainWindow::transmit (double snr)
|
|
|
|
{
|
2015-04-22 13:48:03 -04:00
|
|
|
double toneSpacing=0.0;
|
|
|
|
if (m_modeTx == "JT65") {
|
|
|
|
if(m_nSubMode==0) toneSpacing=11025.0/4096.0;
|
|
|
|
if(m_nSubMode==1) toneSpacing=2*11025.0/4096.0;
|
|
|
|
if(m_nSubMode==2) toneSpacing=4*11025.0/4096.0;
|
2020-06-29 14:47:46 -04:00
|
|
|
Q_EMIT sendMessage (m_mode, NUM_JT65_SYMBOLS,
|
2015-04-22 13:48:03 -04:00
|
|
|
4096.0*12000.0/11025.0, ui->TxFreqSpinBox->value () - m_XIT,
|
2015-07-13 07:00:55 -04:00
|
|
|
toneSpacing, m_soundOutput, m_config.audio_output_channel (),
|
2015-11-17 20:28:12 -05:00
|
|
|
true, false, snr, m_TRperiod);
|
2015-04-22 13:48:03 -04:00
|
|
|
}
|
2016-06-08 17:20:58 -04:00
|
|
|
|
2017-06-19 16:38:03 -04:00
|
|
|
if (m_modeTx == "FT8") {
|
2019-02-22 13:39:39 -05:00
|
|
|
// toneSpacing=12000.0/1920.0;
|
|
|
|
toneSpacing=-3;
|
2017-09-18 11:42:14 -04:00
|
|
|
if(m_config.x2ToneSpacing()) toneSpacing=2*12000.0/1920.0;
|
2018-02-02 10:18:39 -05:00
|
|
|
if(m_config.x4ToneSpacing()) toneSpacing=4*12000.0/1920.0;
|
2018-10-30 17:06:01 -04:00
|
|
|
if(SpecOp::FOX==m_config.special_op_id() and !m_tune) toneSpacing=-1;
|
2020-06-29 14:47:46 -04:00
|
|
|
Q_EMIT sendMessage (m_mode, NUM_FT8_SYMBOLS,
|
2017-07-06 12:27:22 -04:00
|
|
|
1920.0, ui->TxFreqSpinBox->value () - m_XIT,
|
2017-06-19 16:38:03 -04:00
|
|
|
toneSpacing, m_soundOutput, m_config.audio_output_channel (),
|
|
|
|
true, false, snr, m_TRperiod);
|
|
|
|
}
|
|
|
|
|
2019-01-28 10:19:46 -05:00
|
|
|
if (m_modeTx == "FT4") {
|
2019-04-03 13:15:23 -04:00
|
|
|
m_dateTimeSentTx3=QDateTime::currentDateTimeUtc();
|
2019-02-21 12:10:27 -05:00
|
|
|
toneSpacing=-2.0; //Transmit a pre-computed, filtered waveform.
|
2020-06-29 14:47:46 -04:00
|
|
|
Q_EMIT sendMessage (m_mode, NUM_FT4_SYMBOLS,
|
2019-05-22 18:02:15 -04:00
|
|
|
576.0, ui->TxFreqSpinBox->value() - m_XIT,
|
2019-04-01 14:23:10 -04:00
|
|
|
toneSpacing, m_soundOutput, m_config.audio_output_channel(),
|
|
|
|
true, false, snr, m_TRperiod);
|
2019-01-18 16:22:25 -05:00
|
|
|
}
|
|
|
|
|
2020-07-23 13:51:05 -04:00
|
|
|
if (m_modeTx == "FST4" or m_modeTx == "FST4W") {
|
2020-06-19 15:02:05 -04:00
|
|
|
m_dateTimeSentTx3=QDateTime::currentDateTimeUtc();
|
|
|
|
toneSpacing=-2.0; //Transmit a pre-computed, filtered waveform.
|
2020-06-29 17:33:46 -04:00
|
|
|
int nsps=720;
|
2020-06-19 15:02:05 -04:00
|
|
|
if(m_TRperiod==30) nsps=1680;
|
2020-06-25 17:18:48 -04:00
|
|
|
if(m_TRperiod==60) nsps=3888;
|
|
|
|
if(m_TRperiod==120) nsps=8200;
|
2020-06-27 16:24:11 -04:00
|
|
|
if(m_TRperiod==300) nsps=21504;
|
2020-07-17 18:44:14 -04:00
|
|
|
if(m_TRperiod==900) nsps=66560;
|
|
|
|
if(m_TRperiod==1800) nsps=134400;
|
2020-09-30 10:01:57 -04:00
|
|
|
int hmod=1;
|
|
|
|
if(m_config.x2ToneSpacing()) hmod=2;
|
|
|
|
if(m_config.x4ToneSpacing()) hmod=4;
|
2020-06-19 15:02:05 -04:00
|
|
|
double dfreq=hmod*12000.0/nsps;
|
2020-07-21 14:56:20 -04:00
|
|
|
double f0=ui->WSPRfreqSpinBox->value() - m_XIT;
|
2020-09-14 09:55:33 -04:00
|
|
|
if(m_mode=="FST4") f0=ui->TxFreqSpinBox->value() - m_XIT;
|
2020-09-30 10:01:57 -04:00
|
|
|
if(!m_tune) f0 += 1.5*dfreq;
|
2020-07-23 13:51:05 -04:00
|
|
|
Q_EMIT sendMessage (m_mode, NUM_FST4_SYMBOLS,double(nsps),f0,toneSpacing,
|
2020-06-19 15:02:05 -04:00
|
|
|
m_soundOutput,m_config.audio_output_channel(),
|
|
|
|
true, false, snr, m_TRperiod);
|
|
|
|
}
|
|
|
|
|
2016-07-02 08:15:41 -04:00
|
|
|
if (m_modeTx == "QRA64") {
|
2016-06-29 15:12:46 -04:00
|
|
|
if(m_nSubMode==0) toneSpacing=12000.0/6912.0;
|
|
|
|
if(m_nSubMode==1) toneSpacing=2*12000.0/6912.0;
|
|
|
|
if(m_nSubMode==2) toneSpacing=4*12000.0/6912.0;
|
2016-07-23 09:22:34 -04:00
|
|
|
if(m_nSubMode==3) toneSpacing=8*12000.0/6912.0;
|
|
|
|
if(m_nSubMode==4) toneSpacing=16*12000.0/6912.0;
|
2020-06-29 14:47:46 -04:00
|
|
|
Q_EMIT sendMessage (m_mode, NUM_QRA64_SYMBOLS,
|
2016-06-29 15:12:46 -04:00
|
|
|
6912.0, ui->TxFreqSpinBox->value () - m_XIT,
|
2016-06-08 17:20:58 -04:00
|
|
|
toneSpacing, m_soundOutput, m_config.audio_output_channel (),
|
|
|
|
true, false, snr, m_TRperiod);
|
|
|
|
}
|
|
|
|
|
2015-05-27 09:08:28 -04:00
|
|
|
if (m_modeTx == "JT9") {
|
2015-11-17 20:28:12 -05:00
|
|
|
int nsub=pow(2,m_nSubMode);
|
|
|
|
int nsps[]={480,240,120,60};
|
|
|
|
double sps=m_nsps;
|
|
|
|
m_toneSpacing=nsub*12000.0/6912.0;
|
2017-09-18 11:47:29 -04:00
|
|
|
if(m_config.x2ToneSpacing()) m_toneSpacing=2.0*m_toneSpacing;
|
2018-02-02 10:18:39 -05:00
|
|
|
if(m_config.x4ToneSpacing()) m_toneSpacing=4.0*m_toneSpacing;
|
2015-11-17 20:28:12 -05:00
|
|
|
bool fastmode=false;
|
|
|
|
if(m_bFast9 and (m_nSubMode>=4)) {
|
|
|
|
fastmode=true;
|
|
|
|
sps=nsps[m_nSubMode-4];
|
|
|
|
m_toneSpacing=12000.0/sps;
|
|
|
|
}
|
2020-06-29 14:47:46 -04:00
|
|
|
Q_EMIT sendMessage (m_mode, NUM_JT9_SYMBOLS, sps,
|
2015-11-17 20:28:12 -05:00
|
|
|
ui->TxFreqSpinBox->value() - m_XIT, m_toneSpacing,
|
|
|
|
m_soundOutput, m_config.audio_output_channel (),
|
|
|
|
true, fastmode, snr, m_TRperiod);
|
|
|
|
}
|
|
|
|
|
2016-09-13 13:52:45 -04:00
|
|
|
if (m_modeTx == "MSK144") {
|
2015-11-17 20:28:12 -05:00
|
|
|
m_nsps=6;
|
2017-06-07 15:58:25 -04:00
|
|
|
double f0=1000.0;
|
|
|
|
if(!m_bFastMode) {
|
|
|
|
m_nsps=192;
|
|
|
|
f0=ui->TxFreqSpinBox->value () - m_XIT - 0.5*m_toneSpacing;
|
|
|
|
}
|
2017-06-19 22:48:30 -04:00
|
|
|
m_toneSpacing=6000.0/m_nsps;
|
2016-06-16 21:27:00 -04:00
|
|
|
m_FFTSize = 7 * 512;
|
|
|
|
Q_EMIT FFTSize (m_FFTSize);
|
2016-06-03 11:45:54 -04:00
|
|
|
int nsym;
|
2016-09-13 13:52:45 -04:00
|
|
|
nsym=NUM_MSK144_SYMBOLS;
|
|
|
|
if(itone[40] < 0) nsym=40;
|
2020-06-29 14:47:46 -04:00
|
|
|
Q_EMIT sendMessage (m_mode, nsym, double(m_nsps), f0, m_toneSpacing,
|
2015-11-17 20:28:12 -05:00
|
|
|
m_soundOutput, m_config.audio_output_channel (),
|
|
|
|
true, true, snr, m_TRperiod);
|
2015-05-27 09:08:28 -04:00
|
|
|
}
|
2015-11-17 20:28:12 -05:00
|
|
|
|
2015-04-22 13:48:03 -04:00
|
|
|
if (m_modeTx == "JT4") {
|
|
|
|
if(m_nSubMode==0) toneSpacing=4.375;
|
|
|
|
if(m_nSubMode==1) toneSpacing=2*4.375;
|
|
|
|
if(m_nSubMode==2) toneSpacing=4*4.375;
|
|
|
|
if(m_nSubMode==3) toneSpacing=9*4.375;
|
|
|
|
if(m_nSubMode==4) toneSpacing=18*4.375;
|
|
|
|
if(m_nSubMode==5) toneSpacing=36*4.375;
|
|
|
|
if(m_nSubMode==6) toneSpacing=72*4.375;
|
2020-06-29 14:47:46 -04:00
|
|
|
Q_EMIT sendMessage (m_mode, NUM_JT4_SYMBOLS,
|
2015-04-22 13:48:03 -04:00
|
|
|
2520.0*12000.0/11025.0, ui->TxFreqSpinBox->value () - m_XIT,
|
2015-07-13 07:00:55 -04:00
|
|
|
toneSpacing, m_soundOutput, m_config.audio_output_channel (),
|
2015-11-17 20:28:12 -05:00
|
|
|
true, false, snr, m_TRperiod);
|
2015-04-22 13:48:03 -04:00
|
|
|
}
|
2017-05-11 15:56:18 -04:00
|
|
|
if (m_mode=="WSPR") {
|
2016-08-01 15:46:19 -04:00
|
|
|
int nToneSpacing=1;
|
|
|
|
if(m_config.x2ToneSpacing()) nToneSpacing=2;
|
2018-02-02 10:18:39 -05:00
|
|
|
if(m_config.x4ToneSpacing()) nToneSpacing=4;
|
2020-06-29 14:47:46 -04:00
|
|
|
Q_EMIT sendMessage (m_mode, NUM_WSPR_SYMBOLS, 8192.0,
|
2016-08-01 15:46:19 -04:00
|
|
|
ui->TxFreqSpinBox->value() - 1.5 * 12000 / 8192,
|
|
|
|
m_toneSpacing*nToneSpacing, m_soundOutput,
|
|
|
|
m_config.audio_output_channel(),true, false, snr,
|
2017-05-11 15:56:18 -04:00
|
|
|
m_TRperiod);
|
|
|
|
}
|
2020-06-29 14:47:46 -04:00
|
|
|
|
2015-06-05 20:02:02 -04:00
|
|
|
if(m_mode=="Echo") {
|
2015-11-17 20:28:12 -05:00
|
|
|
//??? should use "fastMode = true" here ???
|
2020-06-29 14:47:46 -04:00
|
|
|
Q_EMIT sendMessage (m_mode, 27, 1024.0, 1500.0, 0.0, m_soundOutput,
|
2015-11-17 20:28:12 -05:00
|
|
|
m_config.audio_output_channel(),
|
|
|
|
false, false, snr, m_TRperiod);
|
|
|
|
}
|
|
|
|
|
|
|
|
if(m_mode=="ISCAT") {
|
|
|
|
double sps,f0;
|
|
|
|
if(m_nSubMode==0) {
|
|
|
|
sps=512.0*12000.0/11025.0;
|
|
|
|
toneSpacing=11025.0/512.0;
|
|
|
|
f0=47*toneSpacing;
|
|
|
|
} else {
|
|
|
|
sps=256.0*12000.0/11025.0;
|
|
|
|
toneSpacing=11025.0/256.0;
|
|
|
|
f0=13*toneSpacing;
|
|
|
|
}
|
2020-06-29 14:47:46 -04:00
|
|
|
Q_EMIT sendMessage (m_mode, NUM_ISCAT_SYMBOLS, sps, f0, toneSpacing, m_soundOutput,
|
2015-11-17 20:28:12 -05:00
|
|
|
m_config.audio_output_channel(),
|
|
|
|
true, true, snr, m_TRperiod);
|
|
|
|
}
|
|
|
|
|
|
|
|
// In auto-sequencing mode, stop after 5 transmissions of "73" message.
|
2016-11-26 20:34:43 -05:00
|
|
|
if (m_bFastMode || m_bFast9) {
|
|
|
|
if (ui->cbAutoSeq->isVisible () && ui->cbAutoSeq->isChecked ()) {
|
2016-10-17 13:58:05 -04:00
|
|
|
if(m_ntx==5) {
|
|
|
|
m_nTx73 += 1;
|
|
|
|
} else {
|
|
|
|
m_nTx73=0;
|
|
|
|
}
|
2015-11-17 20:28:12 -05:00
|
|
|
}
|
2015-06-05 20:02:02 -04:00
|
|
|
}
|
2013-08-10 11:29:55 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void MainWindow::on_outAttenuation_valueChanged (int a)
|
|
|
|
{
|
2015-12-16 15:55:19 -05:00
|
|
|
QString tt_str;
|
|
|
|
qreal dBAttn {a / 10.}; // slider interpreted as dB / 100
|
2016-10-26 15:13:18 -04:00
|
|
|
if (m_tune && m_config.pwrBandTuneMemory()) {
|
2018-04-03 09:33:08 -04:00
|
|
|
tt_str = tr ("Tune digital gain ");
|
2016-10-26 15:13:18 -04:00
|
|
|
} else {
|
2018-04-03 09:33:08 -04:00
|
|
|
tt_str = tr ("Transmit digital gain ");
|
2016-10-26 15:13:18 -04:00
|
|
|
}
|
2016-10-25 16:24:09 -04:00
|
|
|
tt_str += (a ? QString::number (-dBAttn, 'f', 1) : "0") + "dB";
|
2016-10-26 15:13:18 -04:00
|
|
|
if (!m_block_pwr_tooltip) {
|
|
|
|
QToolTip::showText (QCursor::pos (), tt_str, ui->outAttenuation);
|
|
|
|
}
|
2016-10-25 16:24:09 -04:00
|
|
|
QString curBand = ui->bandComboBox->currentText();
|
2016-10-26 15:13:18 -04:00
|
|
|
if (m_PwrBandSetOK && !m_tune && m_config.pwrBandTxMemory ()) {
|
|
|
|
m_pwrBandTxMemory[curBand] = a; // remember our Tx pwr
|
|
|
|
}
|
|
|
|
if (m_PwrBandSetOK && m_tune && m_config.pwrBandTuneMemory()) {
|
|
|
|
m_pwrBandTuneMemory[curBand] = a; // remember our Tune pwr
|
|
|
|
}
|
2013-08-10 11:29:55 -04:00
|
|
|
Q_EMIT outAttenuationChanged (dBAttn);
|
2013-07-23 13:32:59 -04:00
|
|
|
}
|
2014-01-27 16:28:54 -05:00
|
|
|
|
|
|
|
void MainWindow::on_actionShort_list_of_add_on_prefixes_and_suffixes_triggered()
|
|
|
|
{
|
2016-10-26 15:13:18 -04:00
|
|
|
if (!m_prefixes) {
|
2020-07-29 13:44:34 -04:00
|
|
|
m_prefixes.reset (new HelpTextWindow {tr ("Prefixes")
|
|
|
|
, R"(Type 1 Prefixes:
|
|
|
|
|
|
|
|
1A 1S 3A 3B6 3B8 3B9 3C 3C0 3D2 3D2C 3D2R 3DA 3V 3W 3X
|
|
|
|
3Y 3YB 3YP 4J 4L 4S 4U1I 4U1U 4W 4X 5A 5B 5H 5N 5R
|
|
|
|
5T 5U 5V 5W 5X 5Z 6W 6Y 7O 7P 7Q 7X 8P 8Q 8R
|
|
|
|
9A 9G 9H 9J 9K 9L 9M2 9M6 9N 9Q 9U 9V 9X 9Y A2
|
|
|
|
A3 A4 A5 A6 A7 A9 AP BS7 BV BV9 BY C2 C3 C5 C6
|
|
|
|
C9 CE CE0X CE0Y CE0Z CE9 CM CN CP CT CT3 CU CX CY0 CY9
|
|
|
|
D2 D4 D6 DL DU E3 E4 EA EA6 EA8 EA9 EI EK EL EP
|
|
|
|
ER ES ET EU EX EY EZ F FG FH FJ FK FKC FM FO
|
|
|
|
FOA FOC FOM FP FR FRG FRJ FRT FT5W FT5X FT5Z FW FY M MD
|
|
|
|
MI MJ MM MU MW H4 H40 HA HB HB0 HC HC8 HH HI HK
|
|
|
|
HK0A HK0M HL HM HP HR HS HV HZ I IS IS0 J2 J3 J5
|
|
|
|
J6 J7 J8 JA JDM JDO JT JW JX JY K KG4 KH0 KH1 KH2
|
|
|
|
KH3 KH4 KH5 KH5K KH6 KH7 KH8 KH9 KL KP1 KP2 KP4 KP5 LA LU
|
|
|
|
LX LY LZ OA OD OE OH OH0 OJ0 OK OM ON OX OY OZ
|
|
|
|
P2 P4 PA PJ2 PJ7 PY PY0F PT0S PY0T PZ R1F R1M S0 S2 S5
|
|
|
|
S7 S9 SM SP ST SU SV SVA SV5 SV9 T2 T30 T31 T32 T33
|
|
|
|
T5 T7 T8 T9 TA TF TG TI TI9 TJ TK TL TN TR TT
|
|
|
|
TU TY TZ UA UA2 UA9 UK UN UR V2 V3 V4 V5 V6 V7
|
|
|
|
V8 VE VK VK0H VK0M VK9C VK9L VK9M VK9N VK9W VK9X VP2E VP2M VP2V VP5
|
|
|
|
VP6 VP6D VP8 VP8G VP8H VP8O VP8S VP9 VQ9 VR VU VU4 VU7 XE XF4
|
|
|
|
XT XU XW XX9 XZ YA YB YI YJ YK YL YN YO YS YU
|
|
|
|
YV YV0 Z2 Z3 ZA ZB ZC4 ZD7 ZD8 ZD9 ZF ZK1N ZK1S ZK2 ZK3
|
|
|
|
ZL ZL7 ZL8 ZL9 ZP ZS ZS8 KC4 E5
|
|
|
|
|
|
|
|
Type 1 Suffixes: /0 /1 /2 /3 /4 /5 /6 /7 /8 /9 /A /P)", {"Courier", 10}});
|
2016-10-26 15:13:18 -04:00
|
|
|
}
|
2014-05-15 07:41:18 -04:00
|
|
|
m_prefixes->showNormal();
|
2015-06-11 13:01:12 -04:00
|
|
|
m_prefixes->raise ();
|
2014-01-27 16:28:54 -05:00
|
|
|
}
|
2014-01-31 11:45:12 -05:00
|
|
|
|
2020-11-12 08:30:48 -05:00
|
|
|
bool MainWindow::shortList(QString callsign) const
|
2014-01-31 14:01:33 -05:00
|
|
|
{
|
|
|
|
int n=callsign.length();
|
|
|
|
int i1=callsign.indexOf("/");
|
|
|
|
Q_ASSERT(i1>0 and i1<n);
|
|
|
|
QString t1=callsign.mid(0,i1);
|
|
|
|
QString t2=callsign.mid(i1+1,n-i1-1);
|
|
|
|
bool b=(m_pfx.contains(t1) or m_sfx.contains(t2));
|
2014-01-31 14:13:14 -05:00
|
|
|
return b;
|
2014-01-31 11:45:12 -05:00
|
|
|
}
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
|
|
|
|
void MainWindow::pskSetLocal ()
|
|
|
|
{
|
2020-08-15 18:32:10 -04:00
|
|
|
if (!m_config.spot_to_psk_reporter ()) return;
|
|
|
|
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
// find the station row, if any, that matches the band we are on
|
|
|
|
auto stations = m_config.stations ();
|
2015-05-31 07:51:40 -04:00
|
|
|
auto matches = stations->match (stations->index (0, StationList::band_column)
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
, Qt::DisplayRole
|
|
|
|
, ui->bandComboBox->currentText ()
|
|
|
|
, 1
|
|
|
|
, Qt::MatchExactly);
|
|
|
|
QString antenna_description;
|
2015-05-27 09:08:28 -04:00
|
|
|
if (!matches.isEmpty ()) {
|
2015-05-31 07:51:40 -04:00
|
|
|
antenna_description = stations->index (matches.first ().row ()
|
|
|
|
, StationList::description_column).data ().toString ();
|
2015-05-27 09:08:28 -04:00
|
|
|
}
|
2017-06-09 07:56:51 -04:00
|
|
|
// qDebug() << "To PSKreporter: local station details";
|
2020-06-20 20:36:30 -04:00
|
|
|
m_psk_Reporter.setLocalStation(m_config.my_callsign (), m_config.my_grid (), antenna_description);
|
Added support for use of "Standard" locations for writable files.
This allows writable files to be located in the "correct"
location for each platform rather than in the directory of
the executable which, in general, is not recommended or
allowed in some cases.
A preprocessor macro WSJT_STANDARD_FILE_LOCATIONS is used to
switch be tween old and new functionality, currently it is on
by default. It can be turned off by defining it to a false
value (0) or more simply with cmake-gui setting the option
with the same name. JTAlert can only work with the old
non-standard file locations until Laurie VK3AMA chooses to
support the new file locations.
Even if the above is not enabled; the QSettings file is
written to a user specific location so it will be shared by
all instances of the program (i.e. across upgrades). See
below for multiple concurrent instance support changes.
Added a command line parser module for Fortran.
Added 'lib/options.f90' to facilitate more complex argument
passing to jt9 to cover explicit file locations.
Changed the way multiple concurrent instances are handled.
This is to allow the program to be run multiple times from
the same installation directory.
A new wsjtx command line optional argument is available "-r"
or "--rig" which enables multiple concurrent instance
support. The parameter of the new option is a unique name
signifying a rig or equivalent. The name is used as the
shared memory segment key and in window titles. The name is
also used to access unique settings files and writable data
files like ALL.TXT and log files. No attempt has been made
to share these files between concurrent instances.
If "-r" or "--rig" is used without a parameter it still
enables multiple concurrent instance support for that
instance. All instances must use a unique parameter, one of
which may be empty.
The rig name is appended the
QCoreApplication::applicationName() for convenient usage like
window titles.
Set non Qt locale to "C".
This ensures that C library functions give consistent results
whatever the system locale is set to. QApplication follows
the system locale as before. Thus using QApplication and its
descendants like widgets and QString for all user visible
formating will give correct l10n and using C/C++ library will
give consistent formatting across locales.
Added top level C++ exception handling to main.cpp.
Because the new transceiver framework uses exceptions
internally, the main function now handles any exceptions that
aren't caught.
Retired devsetup, replaced with Configuration.
Configuration is a class that encapsulates most of the
configuration behavior. Because rig configuration is so
closely coupled with rig operation, Configuration serves as a
proxy for access to the rig control functions. See
Configuration.hpp for more details of the Configuration
interface.
Menu changes.
Various checkable menu actions moved from main menu to the
Configuration dialog. The whole settings menu has been
retired with the single "Settings..." action moved to the
file menu for consistency on Mac where it appears as
"Preferences" in line with Mac guidelines.
New data models for data used by the application.
ADIF amateur band parameters, free text message macros, spot
working frequencies and, station information (station
descriptions and transverter offsets per band) each implement
the QAbstractItemModel interface allowing them to be used
directly with Qt view widgets (Bands.hpp, FrequencyList.hpp
and, StationList.hpp). Configuration manages maintenance of
an instance of all but the former of the above models. The
ADIF band model is owned by Configuration but requires no
user maintenance as it is immutable.
Band combo box gets more functionality.
This widget is now an editable QComboBox with some extra
input capabilities.
The popup list is still the list of spot working frequencies,
now showing the actual frequency decorated with the band
name. This allows multiple spot frequencies on a band if
required.
The line edit allows direct frequency entry in mega-Hertz
with a completer built in to suggest the available spot
working frequencies. It also allows band name entry where
the first available spot working frequency is selected.
Recognized band names are those that are defined by the ADIF
specification and can be found in in the implementation of
the ADIF bands model (Bands.cpp).
If an out of band frequency is chosen, the line edit shows a
warning red background and the text "OOB". Out of band is
only defined by the ADIF band limits which in general are
wider than any entities regulations.
Qt 5.2 now supports default audio i/p and o/p devices.
These devices are placeholders for whatever the user defines
as the default device. Because of this they need special
treatment as the actual device used is chosen at open time
behind the scenes.
Close-down behavior is simplified.
The close-down semantics were broken such that some objects
were not being shut down cleanly, this required amendments to
facilitate correct close down of threads.
User font selection added to Configuration UI.
Buttons to set the application font and the font for the band
and Rx frequency activity widgets have been added to the
Configuration UI to replace the file based font size control.
Free text macros now selected directly.
The free text line edit widgets are now editable combo boxes
that have the current free text macro definitions as their
popup list. The old context menu to do this has been
retired.
Astronomical data window dynamically formatted and has font a chooser.
This window is now autonomous, has its own font chooser and,
dynamically resizes to cover the contents.
Double click to Tx enabled now has its own widget in the status bar.
QDir used for portable path and file name handling throughout.
The "Monitor", "Decode", "Enable Tx" and, "Tune" buttons are now
checkable.
Being checkable allows these buttons control their own state
and rendering.
Calls to PSK Reporter interface simplified.
In mainwindow.cpp the calls to this interface are
rationalized to just 3 locations.
Manipulation of ALL.TXT simplified.
Moved, where possible, to common functions.
Elevated frequency types to be Qt types.
Frequency and FrequencyDelta defined as Qt types in their
meta-type system (Radio.hpp). They are integral types for
maximum accuracy.
Re-factored rig control calls in mainwindow.cpp.
The new Configuration proxy access to rig control required
many changes (mostly simplifications) to the MainWindow rig
control code. Some common code has been gathered in member
functions like qsy(), monitor(), band_changed() and
auto_tx_mode().
Rig control enhancements.
The rig control for clients interface is declared as an
abstract interface (See Transceiver.hpp). Concrete
implementations of this interface are provided for the Hamlib
rig control library, DX Lab Suite Commander via a TCP/IP
command channel, Ham Radio Deluxe also via a TCP/IP command
channel and, OmniRig via its Windows COM server interface.
Concrete Transceiver implementations are expected to be moved
to a separate thread after construction since many operations
are blocking and not suitable for running in a GUI thread.
To facilitate this all instantiation of concrete Transceiver
instances are handled by Configuration using a factory class
(TransceiverFactory) for configuration parameter based
instantiation.
Various common functionality shared by different rig
interface implementations are factored out into helper base
classes that implement or delegate parts of the Transceiver
interface. They are TransceiverBase which caches state to
minimize expensive rig commands, it also maps the Transceiver
interface into a more convenient form for implementation
(template methods). PollingTransceiver that provides a state
polling mechanism that only reports actual changes.
EmulateSplitTransceiver that provides split operation by
QSYing on PTT state changes.
EmulateSplitTransceiver can be used with any implementation
as it follows the GoF Decorator pattern and can wrap any
Transceiver implementation.
OmniRigTransceiver is derived directly from TransceiverBase
since it doesn't require polling due to its asynchronous
nature. OmniRigTransceiver is only built on Windows as it is
a COM server client. To build it you must first install the
OmniRig client on the development machine
(http://www.dxatlas.com/omnirig/).
DXLabSuiteCommanderTransceiver derives from
PollingTransceiver since it is a synchronous communications
channel. No third party library is required for this
interface.
HRDTransceiver also derives from PollingTransceiver. The HRD
interface library has been reverse engineered to provide
functionality with all available versions of HRD. No third
party libraries are required.
HamlibTransceiver likewise derives from PollingTransceiver
since the Hamlib asynchronous interface is non-functional.
Although this class will interface with the release version
of Hamlib (1.2.15.3); for correct operation on most rigs it
needs to run with the latest master branch code of Hamlib.
During development many changes to Hamlib have been submitted
and accepted, hence this requirement. Hamlib source can be
obtained from git://git.code.sf.net/p/hamlib/code and at the
time of writing he master branch was at SHA 6e4432.
The Hamlib interface directly calls the "C" interface and the
modified rigclass.{h,cpp} files have been retired.
There is a rig type selection of "None" which may be used for
non-CAT rigs, this is actually a connection to the dummy
Hamlib device.
PollingTransvceiver derives from TransceiverBase and
TransceiverBase derives from the Transceiver interface.
Each interface implementation offers some possibility of PTT
control via a different serial port than the CAT port. We
also support PTT control directly via a second serial port.
This is done by delegating to a dummy Hamlib instance which
is only used for PTT control. This means that
DXLabSuiteCommanderTransceiver, HRDTransceiver and
OmniRigTransceiver always wrap a dummy HamlibTransceiver
instance. The factory class TransceiverFactory manages all
these constructional complexities.
Serial port selection combo boxes are now editable with a
manually entered value being saved to the settings file.
This allows a non-standard port device to be used without
having to edit the settings file manually.
For TCP/IP network CAT interfaces; the network address and
port may be specified allowing the target device to be
located on a different machine from the one running wsjtx if
required. The default used when the address field is left
blank is the correct one for normal usage on the local host.
Selecting a polling interval of zero is no longer possible,
this is because the rig control capability can no longer
support one way connection. This is in line with most other
CAT control software.
In the Configuration dialog there are options to select split
mode control by the software and mode control by the
software. For the former "None", "Rig" and "Fake it" are
available, for the latter "None", "USB" and, "Data" are
available. Because tone generation is implicitly linked to
split mode operation; it is no longer possible to have the
software in split mode and the rig not or vice versa. This
may mean some rigs cannot be used in split mode and therefore
not in dual JT65+JT9 until issues with CAT control with that
rig are resolved. Single mode with VOX keying and no CAT
control are still possible so even the most basic transceiver
setup is supported as before.
Configuration now supports a frequency offset suitable for
transverter operation. The station details model
(StationList.hpp) includes a column to store an offset for
each band if required.
CMake build script improvements.
The CMakeLists.txt from the 'lib' directory has been retired
with its contents merged into the top level CMakeLists.txt.
Install target support has been greatly improved with the
Release build configuration now building a fully standalone
installation on Mac and Windows. The Debug configuration
still builds an installation that has environment
dependencies for external libraries, which is desirable for
testing and debugging.
Package target support is largely complete for Mac, Windows
and, Linux, it should be possible to build release installers
directly from CMake/CPack.
Cmake FindXXXX.cmake modules have been added to improve the
location of fftw-3 and Hamlib packages.
Version numbers are now stored in Versions.cmake and work in
concert with automatic svn revision lookup during build. The
version string becomes 'rlocal'± if there are any uncommitted
changes in the build source tree.
Moved resource like files to Qt resources.
Because location of resource files (when they cannot go into
the installation directory because of packaging rules) is
hard to standardize. I have used the Qt resource system for
all ancillary data files. Some like kvasd.dat are dumped out
to the temp (working directory) because they are accessed by
an external program, others like the audio samples are copied
out so they appear in the data directory under the default
save directory.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3929 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2014-03-26 09:21:00 -04:00
|
|
|
}
|
2014-09-24 13:25:19 -04:00
|
|
|
|
|
|
|
void MainWindow::transmitDisplay (bool transmitting)
|
|
|
|
{
|
2015-04-22 13:48:03 -04:00
|
|
|
if (transmitting == m_transmitting) {
|
|
|
|
if (transmitting) {
|
2017-03-06 09:34:25 -05:00
|
|
|
ui->signal_meter_widget->setValue(0,0);
|
2015-04-22 13:48:03 -04:00
|
|
|
if (m_monitoring) monitor (false);
|
|
|
|
m_btxok=true;
|
|
|
|
}
|
2014-09-24 13:25:55 -04:00
|
|
|
|
2015-05-27 09:08:28 -04:00
|
|
|
auto QSY_allowed = !transmitting or m_config.tx_QSY_allowed () or
|
2016-04-06 13:11:58 -04:00
|
|
|
!m_config.split_mode ();
|
2017-09-30 13:48:46 -04:00
|
|
|
if (ui->cbHoldTxFreq->isChecked ()) {
|
2020-09-22 11:25:59 -04:00
|
|
|
ui->TxFreqSpinBox->setEnabled (QSY_allowed);
|
2015-04-22 13:48:03 -04:00
|
|
|
ui->pbT2R->setEnabled (QSY_allowed);
|
|
|
|
}
|
2014-09-24 13:25:19 -04:00
|
|
|
|
2020-07-23 13:51:05 -04:00
|
|
|
if (m_mode!="WSPR" and m_mode!="FST4W") {
|
2016-04-11 19:29:21 -04:00
|
|
|
if(m_config.enable_VHF_features ()) {
|
2017-09-30 13:48:46 -04:00
|
|
|
ui->TxFreqSpinBox->setEnabled (true);
|
2016-04-11 19:29:21 -04:00
|
|
|
} else {
|
2017-10-01 08:35:43 -04:00
|
|
|
ui->TxFreqSpinBox->setEnabled (QSY_allowed and !m_bFastMode);
|
2016-04-11 19:29:21 -04:00
|
|
|
ui->pbR2T->setEnabled (QSY_allowed);
|
2017-09-30 13:48:46 -04:00
|
|
|
ui->cbHoldTxFreq->setEnabled (QSY_allowed);
|
2016-04-11 19:29:21 -04:00
|
|
|
}
|
2015-05-27 09:08:28 -04:00
|
|
|
}
|
|
|
|
|
2016-04-06 13:11:58 -04:00
|
|
|
// the following are always disallowed in transmit
|
2015-04-22 13:48:03 -04:00
|
|
|
ui->menuMode->setEnabled (!transmitting);
|
2016-04-06 13:11:58 -04:00
|
|
|
//ui->bandComboBox->setEnabled (!transmitting);
|
|
|
|
if (!transmitting) {
|
2016-06-08 17:20:58 -04:00
|
|
|
if (m_mode == "JT9+JT65") {
|
2016-04-06 13:11:58 -04:00
|
|
|
// allow mode switch in Rx when in dual mode
|
|
|
|
ui->pbTxMode->setEnabled (true);
|
2015-04-22 13:48:03 -04:00
|
|
|
}
|
2016-04-06 13:11:58 -04:00
|
|
|
} else {
|
|
|
|
ui->pbTxMode->setEnabled (false);
|
|
|
|
}
|
2015-04-22 13:48:03 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-05-27 16:04:44 -04:00
|
|
|
void MainWindow::on_sbFtol_valueChanged(int value)
|
2015-04-22 13:48:03 -04:00
|
|
|
{
|
2017-05-27 16:04:44 -04:00
|
|
|
m_wideGraph->setTol (value);
|
2019-06-25 09:35:58 -04:00
|
|
|
statusUpdate ();
|
2015-04-22 13:48:03 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void::MainWindow::VHF_features_enabled(bool b)
|
|
|
|
{
|
2016-10-12 14:21:45 -04:00
|
|
|
if(m_mode!="JT4" and m_mode!="JT65") b=false;
|
2017-01-06 08:53:06 -05:00
|
|
|
if(b and (ui->actionInclude_averaging->isChecked() or
|
2015-04-22 13:48:03 -04:00
|
|
|
ui->actionInclude_correlation->isChecked())) {
|
2017-01-06 08:53:06 -05:00
|
|
|
ui->actionDeepestDecode->setChecked (true);
|
2015-04-22 13:48:03 -04:00
|
|
|
}
|
2017-07-26 06:56:12 -04:00
|
|
|
ui->actionInclude_averaging->setVisible (b);
|
|
|
|
ui->actionInclude_correlation->setVisible (b);
|
2015-04-22 13:48:03 -04:00
|
|
|
ui->actionMessage_averaging->setEnabled(b);
|
2017-07-26 06:56:12 -04:00
|
|
|
ui->actionEnable_AP_DXcall->setVisible (m_mode=="QRA64");
|
2018-02-25 09:01:13 -05:00
|
|
|
ui->actionEnable_AP_JT65->setVisible (b && m_mode=="JT65");
|
2020-04-08 10:56:11 -04:00
|
|
|
|
2018-10-30 17:06:01 -04:00
|
|
|
if(!b && m_msgAvgWidget and (SpecOp::FOX != m_config.special_op_id()) and !m_config.autoLog()) {
|
2020-04-08 10:56:11 -04:00
|
|
|
if(m_msgAvgWidget->isVisible() and m_mode!="JT4" and m_mode!="JT9" and m_mode!="JT65") {
|
|
|
|
m_msgAvgWidget->close();
|
|
|
|
}
|
2015-04-22 13:48:03 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-05-27 16:04:44 -04:00
|
|
|
void MainWindow::on_sbTR_valueChanged(int value)
|
2015-04-22 13:48:03 -04:00
|
|
|
{
|
2020-09-21 14:35:16 -04:00
|
|
|
// if(!m_bFastMode and n>m_nSubMode) m_MinW=m_nSubMode;
|
2020-07-23 13:51:05 -04:00
|
|
|
if(m_bFastMode or m_mode=="FreqCal" or m_mode=="FST4" or m_mode=="FST4W") {
|
2017-05-27 16:04:44 -04:00
|
|
|
m_TRperiod = value;
|
2020-07-23 13:51:05 -04:00
|
|
|
if (m_mode == "FST4" || m_mode == "FST4W")
|
2020-07-11 20:38:36 -04:00
|
|
|
{
|
|
|
|
if (m_TRperiod < 60)
|
|
|
|
{
|
2020-10-03 19:46:59 -04:00
|
|
|
ui->lh_decodes_headings_label->setText(" UTC dB DT Freq " + tr ("Message"));
|
2020-07-23 13:51:05 -04:00
|
|
|
if (m_mode != "FST4W")
|
2020-07-11 20:38:36 -04:00
|
|
|
{
|
2020-10-03 19:46:59 -04:00
|
|
|
ui->rh_decodes_headings_label->setText(" UTC dB DT Freq " + tr ("Message"));
|
2020-07-11 20:38:36 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2020-10-03 19:46:59 -04:00
|
|
|
ui->lh_decodes_headings_label->setText("UTC dB DT Freq " + tr ("Message"));
|
2020-07-23 13:51:05 -04:00
|
|
|
if (m_mode != "FST4W")
|
2020-07-11 20:38:36 -04:00
|
|
|
{
|
2020-10-03 19:46:59 -04:00
|
|
|
ui->rh_decodes_headings_label->setText("UTC dB DT Freq " + tr ("Message"));
|
2020-07-11 20:38:36 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2018-02-12 11:59:31 -05:00
|
|
|
m_fastGraph->setTRPeriod (value);
|
|
|
|
m_modulator->setTRPeriod (value); // TODO - not thread safe
|
|
|
|
m_detector->setTRPeriod (value); // TODO - not thread safe
|
2017-05-27 16:04:44 -04:00
|
|
|
m_wideGraph->setPeriod (value, m_nsps);
|
|
|
|
progressBar.setMaximum (value);
|
2015-11-17 20:28:12 -05:00
|
|
|
}
|
2020-09-18 13:33:30 -04:00
|
|
|
if(m_mode=="FST4") chk_FST4_freq_range();
|
2015-11-17 20:28:12 -05:00
|
|
|
if(m_transmitting) {
|
|
|
|
on_stopTxButton_clicked();
|
|
|
|
}
|
2019-06-25 09:35:58 -04:00
|
|
|
statusUpdate ();
|
2015-04-22 13:48:03 -04:00
|
|
|
}
|
|
|
|
|
2020-07-23 13:51:05 -04:00
|
|
|
void MainWindow::on_sbTR_FST4W_valueChanged(int value)
|
2020-07-01 12:01:47 -04:00
|
|
|
{
|
|
|
|
on_sbTR_valueChanged(value);
|
|
|
|
}
|
|
|
|
|
2016-12-16 14:36:21 -05:00
|
|
|
QChar MainWindow::current_submode () const
|
|
|
|
{
|
|
|
|
QChar submode {0};
|
|
|
|
if (m_mode.contains (QRegularExpression {R"(^(JT65|JT9|JT4|ISCAT|QRA64)$)"})
|
|
|
|
&& (m_config.enable_VHF_features () || "JT4" == m_mode || "ISCAT" == m_mode))
|
|
|
|
{
|
|
|
|
submode = m_nSubMode + 65;
|
|
|
|
}
|
|
|
|
return submode;
|
|
|
|
}
|
|
|
|
|
2015-04-22 13:48:03 -04:00
|
|
|
void MainWindow::on_sbSubmode_valueChanged(int n)
|
|
|
|
{
|
|
|
|
m_nSubMode=n;
|
|
|
|
m_wideGraph->setSubMode(m_nSubMode);
|
2016-12-16 14:36:21 -05:00
|
|
|
auto submode = current_submode ();
|
2017-02-28 14:13:49 -05:00
|
|
|
if (submode != QChar::Null)
|
2016-12-16 14:36:21 -05:00
|
|
|
{
|
|
|
|
mode_label.setText (m_mode + " " + submode);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
mode_label.setText (m_mode);
|
|
|
|
}
|
2015-11-17 20:28:12 -05:00
|
|
|
if(m_mode=="ISCAT") {
|
|
|
|
if(m_nSubMode==0) ui->TxFreqSpinBox->setValue(1012);
|
|
|
|
if(m_nSubMode==1) ui->TxFreqSpinBox->setValue(560);
|
|
|
|
}
|
|
|
|
if(m_mode=="JT9") {
|
|
|
|
if(m_nSubMode<4) {
|
|
|
|
ui->cbFast9->setChecked(false);
|
|
|
|
on_cbFast9_clicked(false);
|
2016-10-20 15:25:48 -04:00
|
|
|
ui->cbFast9->setEnabled(false);
|
2015-11-17 20:28:12 -05:00
|
|
|
ui->sbTR->setVisible(false);
|
2019-05-22 12:44:28 -04:00
|
|
|
m_TRperiod=60.0;
|
2015-11-17 20:28:12 -05:00
|
|
|
} else {
|
2016-10-20 15:25:48 -04:00
|
|
|
ui->cbFast9->setEnabled(true);
|
2015-11-17 20:28:12 -05:00
|
|
|
}
|
|
|
|
ui->sbTR->setVisible(m_bFast9);
|
|
|
|
if(m_bFast9) ui->TxFreqSpinBox->setValue(700);
|
|
|
|
}
|
2018-02-21 11:34:02 -05:00
|
|
|
if(m_transmitting and m_bFast9 and m_nSubMode>=4) transmit (99.0);
|
2016-12-16 14:36:21 -05:00
|
|
|
statusUpdate ();
|
2015-04-22 13:48:03 -04:00
|
|
|
}
|
|
|
|
|
2015-11-17 20:28:12 -05:00
|
|
|
void MainWindow::on_cbFast9_clicked(bool b)
|
|
|
|
{
|
|
|
|
if(m_mode=="JT9") {
|
|
|
|
m_bFast9=b;
|
2016-11-28 14:34:52 -05:00
|
|
|
// ui->cbAutoSeq->setVisible(b);
|
2015-11-17 20:28:12 -05:00
|
|
|
on_actionJT9_triggered();
|
|
|
|
}
|
|
|
|
|
2017-06-09 07:56:51 -04:00
|
|
|
if(b) {
|
2017-05-27 16:04:44 -04:00
|
|
|
m_TRperiod = ui->sbTR->value ();
|
2015-11-17 20:28:12 -05:00
|
|
|
} else {
|
2019-05-22 12:44:28 -04:00
|
|
|
m_TRperiod=60.0;
|
2015-11-17 20:28:12 -05:00
|
|
|
}
|
2019-05-22 12:44:28 -04:00
|
|
|
progressBar.setMaximum(int(m_TRperiod));
|
2015-11-17 20:28:12 -05:00
|
|
|
m_wideGraph->setPeriod(m_TRperiod,m_nsps);
|
|
|
|
fast_config(b);
|
2016-12-16 14:36:21 -05:00
|
|
|
statusChanged ();
|
2015-11-17 20:28:12 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2015-04-22 13:48:03 -04:00
|
|
|
void MainWindow::on_cbShMsgs_toggled(bool b)
|
|
|
|
{
|
|
|
|
ui->cbTx6->setEnabled(b);
|
|
|
|
m_bShMsgs=b;
|
2017-01-06 14:01:29 -05:00
|
|
|
if(b) ui->cbSWL->setChecked(false);
|
2016-07-06 11:06:47 -04:00
|
|
|
if(m_bShMsgs and (m_mode=="MSK144")) ui->rptSpinBox->setValue(1);
|
2018-07-10 08:50:45 -04:00
|
|
|
int it0=itone[0];
|
2015-04-22 13:48:03 -04:00
|
|
|
int ntx=m_ntx;
|
2017-07-24 15:27:23 -04:00
|
|
|
m_lastCallsign.clear (); // ensure Tx5 gets updated
|
2015-04-22 13:48:03 -04:00
|
|
|
genStdMsgs(m_rpt);
|
2018-07-10 08:50:45 -04:00
|
|
|
itone[0]=it0;
|
2015-04-22 13:48:03 -04:00
|
|
|
if(ntx==1) ui->txrb1->setChecked(true);
|
|
|
|
if(ntx==2) ui->txrb2->setChecked(true);
|
|
|
|
if(ntx==3) ui->txrb3->setChecked(true);
|
|
|
|
if(ntx==4) ui->txrb4->setChecked(true);
|
|
|
|
if(ntx==5) ui->txrb5->setChecked(true);
|
|
|
|
if(ntx==6) ui->txrb6->setChecked(true);
|
|
|
|
}
|
|
|
|
|
2017-01-06 14:01:29 -05:00
|
|
|
void MainWindow::on_cbSWL_toggled(bool b)
|
|
|
|
{
|
|
|
|
if(b) ui->cbShMsgs->setChecked(false);
|
|
|
|
}
|
|
|
|
|
2017-07-24 15:27:23 -04:00
|
|
|
void MainWindow::on_cbTx6_toggled(bool)
|
2015-04-22 13:48:03 -04:00
|
|
|
{
|
2017-07-24 15:27:23 -04:00
|
|
|
genCQMsg ();
|
2014-09-24 13:25:19 -04:00
|
|
|
}
|
2015-04-15 12:40:49 -04:00
|
|
|
|
|
|
|
// Takes a decoded CQ line and sets it up for reply
|
2017-09-22 11:36:24 -04:00
|
|
|
void MainWindow::replyToCQ (QTime time, qint32 snr, float delta_time, quint32 delta_frequency
|
|
|
|
, QString const& mode, QString const& message_text
|
|
|
|
, bool /*low_confidence*/, quint8 modifiers)
|
2015-04-15 12:40:49 -04:00
|
|
|
{
|
2018-03-18 16:53:24 -04:00
|
|
|
QString format_string {"%1 %2 %3 %4 %5 %6"};
|
2019-01-23 10:09:18 -05:00
|
|
|
auto const& time_string = time.toString ("~" == mode || "&" == mode
|
|
|
|
|| "+" == mode ? "hhmmss" : "hhmm");
|
2020-10-17 21:09:17 -04:00
|
|
|
auto text = message_text;
|
|
|
|
auto ap_pos = text.lastIndexOf (QRegularExpression {R"((?:\?\s)?a[0-9]$)"});
|
|
|
|
if (ap_pos >= 0)
|
|
|
|
{
|
|
|
|
// beware of decodes ending on shorter version of wanted call so
|
|
|
|
// add a space
|
|
|
|
text = text.left (ap_pos).trimmed () + ' ';
|
|
|
|
}
|
2018-09-28 11:12:09 -04:00
|
|
|
auto message_line = format_string
|
2018-03-18 16:53:24 -04:00
|
|
|
.arg (time_string)
|
|
|
|
.arg (snr, 3)
|
|
|
|
.arg (delta_time, 4, 'f', 1)
|
|
|
|
.arg (delta_frequency, 4)
|
|
|
|
.arg (mode, -2)
|
2020-10-17 21:09:17 -04:00
|
|
|
.arg (text);
|
2018-09-28 11:12:09 -04:00
|
|
|
QTextCursor start {ui->decodedTextBrowser->document ()};
|
|
|
|
start.movePosition (QTextCursor::End);
|
|
|
|
auto cursor = ui->decodedTextBrowser->document ()->find (message_line, start, QTextDocument::FindBackward);
|
|
|
|
if (cursor.isNull ())
|
2015-04-15 12:40:49 -04:00
|
|
|
{
|
2018-03-18 16:53:24 -04:00
|
|
|
// try again with with -0.0 delta time
|
2018-09-28 11:12:09 -04:00
|
|
|
cursor = ui->decodedTextBrowser->document ()->find (format_string
|
|
|
|
.arg (time_string)
|
|
|
|
.arg (snr, 3)
|
|
|
|
.arg ('-' + QString::number (delta_time, 'f', 1), 4)
|
|
|
|
.arg (delta_frequency, 4)
|
|
|
|
.arg (mode, -2)
|
2020-10-17 21:09:17 -04:00
|
|
|
.arg (text), start, QTextDocument::FindBackward);
|
2018-09-28 11:12:09 -04:00
|
|
|
}
|
|
|
|
if (!cursor.isNull ())
|
2018-03-18 16:53:24 -04:00
|
|
|
{
|
|
|
|
if (m_config.udpWindowToFront ())
|
2015-12-06 18:14:32 -05:00
|
|
|
{
|
2018-03-18 16:53:24 -04:00
|
|
|
show ();
|
|
|
|
raise ();
|
|
|
|
activateWindow ();
|
2015-12-06 18:14:32 -05:00
|
|
|
}
|
2018-03-18 16:53:24 -04:00
|
|
|
if (m_config.udpWindowRestore () && isMinimized ())
|
2015-04-15 12:40:49 -04:00
|
|
|
{
|
2018-03-18 16:53:24 -04:00
|
|
|
showNormal ();
|
|
|
|
raise ();
|
2015-04-15 12:40:49 -04:00
|
|
|
}
|
2020-10-17 21:09:17 -04:00
|
|
|
if (text.contains (QRegularExpression {R"(^(CQ |CQDX |QRZ ))"})) {
|
2018-03-18 16:53:24 -04:00
|
|
|
// a message we are willing to accept and auto reply to
|
|
|
|
m_bDoubleClicked = true;
|
|
|
|
}
|
2018-09-28 11:12:09 -04:00
|
|
|
DecodedText message {message_line};
|
2018-03-18 16:53:24 -04:00
|
|
|
Qt::KeyboardModifiers kbmod {modifiers << 24};
|
|
|
|
processMessage (message, kbmod);
|
|
|
|
tx_watchdog (false);
|
|
|
|
QApplication::alert (this);
|
2015-04-15 12:40:49 -04:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2018-09-28 11:12:09 -04:00
|
|
|
qDebug () << "process reply message ignored, decode not found:" << message_line;
|
2015-04-15 12:40:49 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-02-04 17:42:35 -05:00
|
|
|
void MainWindow::locationChange (QString const& location)
|
|
|
|
{
|
|
|
|
QString grid {location.trimmed ()};
|
|
|
|
int len;
|
|
|
|
|
|
|
|
// string 6 chars or fewer, interpret as a grid, or use with a 'GRID:' prefix
|
|
|
|
if (grid.size () > 6) {
|
|
|
|
if (grid.toUpper ().startsWith ("GRID:")) {
|
|
|
|
grid = grid.mid (5).trimmed ();
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
// TODO - support any other formats, e.g. latlong? Or have that conversion done external to wsjtx
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (MaidenheadLocatorValidator::Acceptable == MaidenheadLocatorValidator ().validate (grid, len)) {
|
|
|
|
qDebug() << "locationChange: Grid supplied is " << grid;
|
|
|
|
if (m_config.my_grid () != grid) {
|
|
|
|
m_config.set_location (grid);
|
|
|
|
genStdMsgs (m_rpt, false);
|
|
|
|
statusUpdate ();
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
qDebug() << "locationChange: Invalid grid " << grid;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-04-15 12:40:49 -04:00
|
|
|
void MainWindow::replayDecodes ()
|
|
|
|
{
|
|
|
|
// we accept this request even if the setting to accept UDP requests
|
|
|
|
// is not checked
|
2015-11-15 18:03:11 -05:00
|
|
|
|
|
|
|
// attempt to parse the decoded text
|
2018-09-28 11:12:09 -04:00
|
|
|
for (QTextBlock block = ui->decodedTextBrowser->document ()->firstBlock (); block.isValid (); block = block.next ())
|
2015-04-15 12:40:49 -04:00
|
|
|
{
|
2018-09-28 11:12:09 -04:00
|
|
|
auto message = block.text ();
|
|
|
|
message = message.left (message.indexOf (QChar::Nbsp)); // discard
|
|
|
|
// any
|
|
|
|
// appended info
|
2015-04-15 12:40:49 -04:00
|
|
|
if (message.size() >= 4 && message.left (4) != "----")
|
|
|
|
{
|
2020-06-13 11:04:41 -04:00
|
|
|
auto const& parts = message.split (' ', SkipEmptyParts);
|
2020-07-02 09:39:11 -04:00
|
|
|
if (parts.size () >= 5 && parts[3].contains ('.')) //
|
2015-04-15 12:40:49 -04:00
|
|
|
{
|
2015-11-15 18:03:11 -05:00
|
|
|
postWSPRDecode (false, parts);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2016-12-16 14:36:21 -05:00
|
|
|
// TODO - how to skip ISCAT decodes
|
2018-09-28 11:12:09 -04:00
|
|
|
postDecode (false, message);
|
2015-04-15 12:40:49 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2015-04-19 18:21:45 -04:00
|
|
|
statusChanged ();
|
2015-04-15 12:40:49 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void MainWindow::postDecode (bool is_new, QString const& message)
|
|
|
|
{
|
2015-11-15 18:03:11 -05:00
|
|
|
auto const& decode = message.trimmed ();
|
2020-06-13 11:04:41 -04:00
|
|
|
auto const& parts = decode.left (22).split (' ', SkipEmptyParts);
|
2017-09-16 18:20:59 -04:00
|
|
|
if (parts.size () >= 5)
|
2015-04-15 12:40:49 -04:00
|
|
|
{
|
2017-07-09 20:01:20 -04:00
|
|
|
auto has_seconds = parts[0].size () > 4;
|
2016-12-16 14:36:21 -05:00
|
|
|
m_messageClient->decode (is_new
|
2017-07-09 20:01:20 -04:00
|
|
|
, QTime::fromString (parts[0], has_seconds ? "hhmmss" : "hhmm")
|
2016-12-16 14:36:21 -05:00
|
|
|
, parts[1].toInt ()
|
2017-09-22 11:36:24 -04:00
|
|
|
, parts[2].toFloat (), parts[3].toUInt (), parts[4]
|
2018-11-12 14:10:12 -05:00
|
|
|
, decode.mid (has_seconds ? 24 : 22)
|
2017-09-16 18:20:59 -04:00
|
|
|
, QChar {'?'} == decode.mid (has_seconds ? 24 + 21 : 22 + 21, 1)
|
|
|
|
, m_diskData);
|
2015-04-15 12:40:49 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-11-15 18:03:11 -05:00
|
|
|
void MainWindow::postWSPRDecode (bool is_new, QStringList parts)
|
|
|
|
{
|
|
|
|
if (parts.size () < 8)
|
|
|
|
{
|
|
|
|
parts.insert (6, "");
|
|
|
|
}
|
|
|
|
m_messageClient->WSPR_decode (is_new, QTime::fromString (parts[0], "hhmm"), parts[1].toInt ()
|
|
|
|
, parts[2].toFloat (), Radio::frequency (parts[3].toFloat (), 6)
|
2017-09-16 18:20:59 -04:00
|
|
|
, parts[4].toInt (), parts[5], parts[6], parts[7].toInt ()
|
|
|
|
, m_diskData);
|
2015-11-15 18:03:11 -05:00
|
|
|
}
|
|
|
|
|
2015-04-15 12:40:49 -04:00
|
|
|
void MainWindow::networkError (QString const& e)
|
|
|
|
{
|
2016-08-12 12:12:52 -04:00
|
|
|
if (m_splash && m_splash->isVisible ()) m_splash->hide ();
|
2016-07-03 16:31:19 -04:00
|
|
|
if (MessageBox::Retry == MessageBox::warning_message (this, tr ("Network Error")
|
|
|
|
, tr ("Error: %1\nUDP server %2:%3")
|
|
|
|
.arg (e)
|
|
|
|
.arg (m_config.udp_server_name ())
|
|
|
|
.arg (m_config.udp_server_port ())
|
|
|
|
, QString {}
|
|
|
|
, MessageBox::Cancel | MessageBox::Retry
|
|
|
|
, MessageBox::Cancel))
|
2015-04-15 12:40:49 -04:00
|
|
|
{
|
|
|
|
// retry server lookup
|
2020-11-04 22:37:01 -05:00
|
|
|
m_messageClient->set_server (m_config.udp_server_name (), m_config.udp_interface_names ());
|
2015-04-15 12:40:49 -04:00
|
|
|
}
|
|
|
|
}
|
2015-05-27 09:08:28 -04:00
|
|
|
|
|
|
|
void MainWindow::on_syncSpinBox_valueChanged(int n)
|
|
|
|
{
|
|
|
|
m_minSync=n;
|
|
|
|
}
|
|
|
|
|
|
|
|
void MainWindow::p1ReadFromStdout() //p1readFromStdout
|
|
|
|
{
|
|
|
|
QString t1;
|
|
|
|
while(p1.canReadLine()) {
|
|
|
|
QString t(p1.readLine());
|
2018-11-16 09:30:40 -05:00
|
|
|
if(ui->cbNoOwnCall->isChecked()) {
|
|
|
|
if(t.contains(" " + m_config.my_callsign() + " ")) continue;
|
|
|
|
if(t.contains(" <" + m_config.my_callsign() + "> ")) continue;
|
|
|
|
}
|
2015-05-27 09:08:28 -04:00
|
|
|
if(t.indexOf("<DecodeFinished>") >= 0) {
|
2015-11-17 20:28:12 -05:00
|
|
|
m_bDecoded = m_nWSPRdecodes > 0;
|
2015-06-13 10:24:54 -04:00
|
|
|
if(!m_diskData) {
|
|
|
|
WSPR_history(m_dialFreqRxWSPR, m_nWSPRdecodes);
|
2015-11-17 20:28:12 -05:00
|
|
|
if(m_nWSPRdecodes==0 and ui->band_hopping_group_box->isChecked()) {
|
2020-05-19 07:15:58 -04:00
|
|
|
t = " " + tr ("Receiving") + " " + m_mode + " ----------------------- " +
|
2015-06-13 10:24:54 -04:00
|
|
|
m_config.bands ()->find (m_dialFreqRxWSPR);
|
2020-07-11 20:38:36 -04:00
|
|
|
t=beacon_start_time (-m_TRperiod / 2) + ' ' + t.rightJustified (66, '-');
|
2015-06-13 10:24:54 -04:00
|
|
|
ui->decodedTextBrowser->appendText(t);
|
|
|
|
}
|
2016-10-17 09:28:30 -04:00
|
|
|
killFileTimer.start (45*1000); //Kill in 45s (for slow modes)
|
2015-06-13 10:24:54 -04:00
|
|
|
}
|
2015-06-12 13:29:12 -04:00
|
|
|
m_nWSPRdecodes=0;
|
2015-05-27 09:08:28 -04:00
|
|
|
ui->DecodeButton->setChecked (false);
|
2020-07-25 21:58:04 -04:00
|
|
|
if (m_uploadWSPRSpots
|
|
|
|
&& m_config.is_transceiver_online ()) { // need working rig control
|
2020-06-13 11:04:41 -04:00
|
|
|
#if QT_VERSION >= QT_VERSION_CHECK (5, 15, 0)
|
|
|
|
uploadTimer.start(QRandomGenerator::global ()->bounded (0, 20000)); // Upload delay
|
|
|
|
#else
|
|
|
|
uploadTimer.start(20000 * qrand()/((double)RAND_MAX + 1.0)); // Upload delay
|
|
|
|
#endif
|
2015-05-27 09:08:28 -04:00
|
|
|
} else {
|
2020-07-25 21:58:04 -04:00
|
|
|
QFile f {QDir::toNativeSeparators (m_config.writeable_data_dir ().absoluteFilePath ("wspr_spots.txt"))};
|
|
|
|
if (f.exists ()) f.remove ();
|
2015-05-27 09:08:28 -04:00
|
|
|
}
|
|
|
|
m_RxLog=0;
|
|
|
|
m_startAnother=m_loopall;
|
2016-05-24 06:08:35 -04:00
|
|
|
m_decoderBusy = false;
|
|
|
|
statusUpdate ();
|
2015-05-27 09:08:28 -04:00
|
|
|
} else {
|
|
|
|
|
|
|
|
int n=t.length();
|
|
|
|
t=t.mid(0,n-2) + " ";
|
|
|
|
t.remove(QRegExp("\\s+$"));
|
|
|
|
QStringList rxFields = t.split(QRegExp("\\s+"));
|
|
|
|
QString rxLine;
|
|
|
|
QString grid="";
|
|
|
|
if ( rxFields.count() == 8 ) {
|
|
|
|
rxLine = QString("%1 %2 %3 %4 %5 %6 %7 %8")
|
|
|
|
.arg(rxFields.at(0), 4)
|
|
|
|
.arg(rxFields.at(1), 4)
|
|
|
|
.arg(rxFields.at(2), 5)
|
|
|
|
.arg(rxFields.at(3), 11)
|
|
|
|
.arg(rxFields.at(4), 4)
|
2017-08-09 06:47:00 -04:00
|
|
|
.arg(rxFields.at(5).leftJustified (12))
|
2015-05-27 09:08:28 -04:00
|
|
|
.arg(rxFields.at(6), -6)
|
|
|
|
.arg(rxFields.at(7), 3);
|
2015-11-15 18:03:11 -05:00
|
|
|
postWSPRDecode (true, rxFields);
|
2015-05-27 09:08:28 -04:00
|
|
|
grid = rxFields.at(6);
|
|
|
|
} else if ( rxFields.count() == 7 ) { // Type 2 message
|
|
|
|
rxLine = QString("%1 %2 %3 %4 %5 %6 %7 %8")
|
|
|
|
.arg(rxFields.at(0), 4)
|
|
|
|
.arg(rxFields.at(1), 4)
|
|
|
|
.arg(rxFields.at(2), 5)
|
|
|
|
.arg(rxFields.at(3), 11)
|
|
|
|
.arg(rxFields.at(4), 4)
|
2017-08-09 06:47:00 -04:00
|
|
|
.arg(rxFields.at(5).leftJustified (12))
|
2015-05-27 09:08:28 -04:00
|
|
|
.arg("", -6)
|
|
|
|
.arg(rxFields.at(6), 3);
|
2015-11-15 18:03:11 -05:00
|
|
|
postWSPRDecode (true, rxFields);
|
2015-05-27 09:08:28 -04:00
|
|
|
} else {
|
|
|
|
rxLine = t;
|
|
|
|
}
|
|
|
|
if(grid!="") {
|
|
|
|
double utch=0.0;
|
|
|
|
int nAz,nEl,nDmiles,nDkm,nHotAz,nHotABetter;
|
2019-04-30 10:13:26 -04:00
|
|
|
azdist_(const_cast <char *> ((m_config.my_grid () + " ").left (6).toLatin1 ().constData ()),
|
|
|
|
const_cast <char *> ((grid + " ").left (6).toLatin1 ().constData ()),&utch,
|
2015-05-27 09:08:28 -04:00
|
|
|
&nAz,&nEl,&nDmiles,&nDkm,&nHotAz,&nHotABetter,6,6);
|
|
|
|
QString t1;
|
|
|
|
if(m_config.miles()) {
|
2020-05-06 21:56:57 -04:00
|
|
|
t1 = t1.asprintf("%7d",nDmiles);
|
2015-05-27 09:08:28 -04:00
|
|
|
} else {
|
2020-05-06 21:56:57 -04:00
|
|
|
t1 = t1.asprintf("%7d",nDkm);
|
2015-05-27 09:08:28 -04:00
|
|
|
}
|
|
|
|
rxLine += t1;
|
|
|
|
}
|
|
|
|
|
2020-05-11 20:39:46 -04:00
|
|
|
if (rxLine.left (4) != m_tBlankLine) {
|
|
|
|
ui->decodedTextBrowser->new_period ();
|
|
|
|
if (m_config.insert_blank ()) {
|
|
|
|
QString band;
|
|
|
|
Frequency f=1000000.0*rxFields.at(3).toDouble()+0.5;
|
|
|
|
band = ' ' + m_config.bands ()->find (f);
|
|
|
|
ui->decodedTextBrowser->appendText(band.rightJustified (71, '-'));
|
|
|
|
}
|
2020-05-11 11:30:02 -04:00
|
|
|
m_tBlankLine = rxLine.left(4);
|
2015-05-27 09:08:28 -04:00
|
|
|
}
|
2015-06-12 13:29:12 -04:00
|
|
|
m_nWSPRdecodes += 1;
|
2015-06-09 10:30:23 -04:00
|
|
|
ui->decodedTextBrowser->appendText(rxLine);
|
2015-05-27 09:08:28 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-07-11 20:38:36 -04:00
|
|
|
QString MainWindow::beacon_start_time (int n)
|
2015-06-13 10:24:54 -04:00
|
|
|
{
|
2020-08-07 16:28:52 -04:00
|
|
|
auto bt = qt_truncate_date_time_to (QDateTime::currentDateTimeUtc ().addSecs (n), m_TRperiod * 1.e3);
|
|
|
|
if (m_TRperiod < 60.)
|
2020-07-11 20:38:36 -04:00
|
|
|
{
|
2020-07-27 14:51:56 -04:00
|
|
|
return bt.toString ("HHmmss");
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
return bt.toString ("HHmm");
|
2020-07-11 20:38:36 -04:00
|
|
|
}
|
2015-06-13 10:24:54 -04:00
|
|
|
}
|
|
|
|
|
2015-06-12 17:46:54 -04:00
|
|
|
void MainWindow::WSPR_history(Frequency dialFreq, int ndecodes)
|
2015-06-12 13:29:12 -04:00
|
|
|
{
|
|
|
|
QDateTime t=QDateTime::currentDateTimeUtc().addSecs(-60);
|
|
|
|
QString t1=t.toString("yyMMdd");
|
2020-07-11 20:38:36 -04:00
|
|
|
QString t2=beacon_start_time (-m_TRperiod / 2);
|
2015-06-12 13:29:12 -04:00
|
|
|
QString t3;
|
2020-05-06 21:56:57 -04:00
|
|
|
t3 = t3.asprintf("%13.6f",0.000001*dialFreq);
|
2015-06-12 13:29:12 -04:00
|
|
|
if(ndecodes<0) {
|
|
|
|
t1=t1 + " " + t2 + t3 + " T";
|
|
|
|
} else {
|
|
|
|
QString t4;
|
2020-05-06 21:56:57 -04:00
|
|
|
t4 = t4.asprintf("%4d",ndecodes);
|
2015-06-12 13:29:12 -04:00
|
|
|
t1=t1 + " " + t2 + t3 + " R" + t4;
|
|
|
|
}
|
2017-07-07 19:11:41 -04:00
|
|
|
QFile f {m_config.writeable_data_dir ().absoluteFilePath ("WSPR_history.txt")};
|
2015-06-12 13:29:12 -04:00
|
|
|
if (f.open(QIODevice::WriteOnly | QIODevice::Text | QIODevice::Append)) {
|
|
|
|
QTextStream out(&f);
|
2020-06-13 11:04:41 -04:00
|
|
|
out << t1
|
|
|
|
#if QT_VERSION >= QT_VERSION_CHECK (5, 15, 0)
|
|
|
|
<< Qt::endl
|
|
|
|
#else
|
|
|
|
<< endl
|
|
|
|
#endif
|
|
|
|
;
|
2015-06-12 13:29:12 -04:00
|
|
|
f.close();
|
|
|
|
} else {
|
2016-07-03 16:31:19 -04:00
|
|
|
MessageBox::warning_message (this, tr ("File Error")
|
|
|
|
, tr ("Cannot open \"%1\" for append: %2")
|
|
|
|
.arg (f.fileName ()).arg (f.errorString ()));
|
2015-06-12 13:29:12 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-07-25 21:58:04 -04:00
|
|
|
void MainWindow::uploadWSPRSpots (bool direct_post, QString const& decode_text)
|
2015-05-27 09:08:28 -04:00
|
|
|
{
|
2020-07-25 21:58:04 -04:00
|
|
|
// do not spot if disabled, replays, or if rig control not working
|
|
|
|
if(!m_uploadWSPRSpots || m_diskData || !m_config.is_transceiver_online ()) return;
|
2020-10-04 17:41:52 -04:00
|
|
|
if(m_uploading && !decode_text.size ()) {
|
2015-05-27 09:08:28 -04:00
|
|
|
qDebug() << "Previous upload has not completed, spots were lost";
|
2015-06-09 10:30:23 -04:00
|
|
|
wsprNet->abortOutstandingRequests ();
|
|
|
|
m_uploading = false;
|
2015-05-27 09:08:28 -04:00
|
|
|
}
|
2020-10-04 17:41:52 -04:00
|
|
|
QString rfreq = QString("%1").arg((m_dialFreqRxWSPR + m_wideGraph->rxFreq ()) / 1e6, 0, 'f', 6);
|
2020-07-25 21:58:04 -04:00
|
|
|
QString tfreq = QString("%1").arg((m_dialFreqRxWSPR +
|
|
|
|
ui->TxFreqSpinBox->value()) / 1e6, 0, 'f', 6);
|
2020-08-14 21:57:23 -04:00
|
|
|
auto pct = QString::number (ui->autoButton->isChecked () ? ui->sbTxPercent->value () : 0);
|
2020-10-04 17:41:52 -04:00
|
|
|
if (direct_post)
|
|
|
|
{
|
|
|
|
// queues one FST4W spot
|
|
|
|
wsprNet->post (m_config.my_callsign (), m_config.my_grid (), rfreq, tfreq,
|
|
|
|
m_mode, m_TRperiod, pct,
|
|
|
|
QString::number (m_dBm), version (), decode_text);
|
|
|
|
}
|
|
|
|
else
|
2020-07-25 21:58:04 -04:00
|
|
|
{
|
2020-10-04 17:41:52 -04:00
|
|
|
// queues spots for each decode in wspr_spots.txt
|
2020-07-25 21:58:04 -04:00
|
|
|
wsprNet->upload (m_config.my_callsign (), m_config.my_grid (), rfreq, tfreq,
|
2020-08-14 21:57:23 -04:00
|
|
|
m_mode, m_TRperiod, pct,
|
2020-07-25 21:58:04 -04:00
|
|
|
QString::number (m_dBm), version (),
|
|
|
|
m_config.writeable_data_dir ().absoluteFilePath ("wspr_spots.txt"));
|
|
|
|
}
|
2020-10-04 17:41:52 -04:00
|
|
|
// trigger upload of any queued spots
|
2020-07-25 21:58:04 -04:00
|
|
|
if (!decode_text.size ())
|
|
|
|
{
|
|
|
|
m_uploading = true;
|
|
|
|
}
|
2015-05-27 09:08:28 -04:00
|
|
|
}
|
|
|
|
|
2020-10-04 17:41:52 -04:00
|
|
|
void MainWindow::uploadResponse(QString const& response)
|
2015-05-27 09:08:28 -04:00
|
|
|
{
|
|
|
|
if (response == "done") {
|
|
|
|
m_uploading=false;
|
2015-06-09 10:30:23 -04:00
|
|
|
} else {
|
2016-02-02 13:28:12 -05:00
|
|
|
if (response.startsWith ("Upload Failed")) {
|
|
|
|
m_uploading=false;
|
|
|
|
}
|
2015-06-09 10:30:23 -04:00
|
|
|
qDebug () << "WSPRnet.org status:" << response;
|
2015-05-27 09:08:28 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-06-03 12:43:27 -04:00
|
|
|
void MainWindow::on_TxPowerComboBox_currentIndexChanged(int index)
|
2015-05-27 09:08:28 -04:00
|
|
|
{
|
2020-06-03 12:43:27 -04:00
|
|
|
m_dBm = ui->TxPowerComboBox->itemData (index).toInt ();
|
2015-05-27 09:08:28 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void MainWindow::on_cbUploadWSPR_Spots_toggled(bool b)
|
|
|
|
{
|
2020-07-25 21:58:04 -04:00
|
|
|
m_uploadWSPRSpots=b;
|
2015-05-27 09:08:28 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void MainWindow::on_WSPRfreqSpinBox_valueChanged(int n)
|
|
|
|
{
|
|
|
|
ui->TxFreqSpinBox->setValue(n);
|
|
|
|
}
|
|
|
|
|
2020-09-05 10:34:55 -04:00
|
|
|
void MainWindow::on_sbFST4W_RxFreq_valueChanged(int n)
|
|
|
|
{
|
|
|
|
m_wideGraph->setRxFreq(n);
|
|
|
|
statusUpdate ();
|
|
|
|
}
|
|
|
|
|
|
|
|
void MainWindow::on_sbFST4W_FTol_valueChanged(int n)
|
|
|
|
{
|
2020-09-10 13:33:33 -04:00
|
|
|
ui->sbFST4W_RxFreq->setSingleStep(n);
|
2020-09-05 10:34:55 -04:00
|
|
|
m_wideGraph->setTol(n);
|
|
|
|
statusUpdate ();
|
|
|
|
}
|
|
|
|
|
2015-05-27 09:08:28 -04:00
|
|
|
void MainWindow::on_pbTxNext_clicked(bool b)
|
|
|
|
{
|
2020-08-14 21:57:23 -04:00
|
|
|
if (b && !ui->autoButton->isChecked ())
|
|
|
|
{
|
|
|
|
ui->autoButton->click (); // make sure Tx is possible
|
|
|
|
}
|
2015-05-27 09:08:28 -04:00
|
|
|
}
|
|
|
|
|
2015-06-06 09:40:10 -04:00
|
|
|
void MainWindow::WSPR_scheduling ()
|
2015-05-27 09:08:28 -04:00
|
|
|
{
|
2020-08-14 21:57:23 -04:00
|
|
|
if (ui->pbTxNext->isEnabled () && ui->pbTxNext->isChecked ())
|
|
|
|
{
|
|
|
|
// Tx Next button overrides all scheduling
|
|
|
|
m_WSPR_tx_next = true;
|
|
|
|
return;
|
|
|
|
}
|
2020-07-03 09:48:01 -04:00
|
|
|
QString t=ui->RoundRobin->currentText();
|
2020-08-08 16:25:32 -04:00
|
|
|
if(m_mode=="FST4W" and t != tr ("Random")) {
|
2020-07-31 07:39:08 -04:00
|
|
|
bool ok;
|
|
|
|
int i=t.left (1).toInt (&ok) - 1;
|
|
|
|
if (!ok) return;
|
|
|
|
int n=t.right (1).toInt (&ok);
|
|
|
|
if (!ok || 0 == n) return;
|
2020-07-03 09:48:01 -04:00
|
|
|
|
|
|
|
qint64 ms = QDateTime::currentMSecsSinceEpoch() % 86400000;
|
|
|
|
int nsec=ms/1000;
|
|
|
|
int ntr=m_TRperiod;
|
2020-07-29 11:58:28 -04:00
|
|
|
int j=((nsec+ntr-1) % (n*ntr))/ntr;
|
2020-08-14 21:57:23 -04:00
|
|
|
m_WSPR_tx_next = i == j;
|
2020-07-03 09:48:01 -04:00
|
|
|
return;
|
|
|
|
}
|
2015-07-07 15:02:25 -04:00
|
|
|
m_WSPR_tx_next = false;
|
2020-08-14 21:57:23 -04:00
|
|
|
if (!ui->sbTxPercent->isEnabled () || !ui->sbTxPercent->value ())
|
|
|
|
{
|
|
|
|
return; // don't schedule if %age disabled or zero
|
|
|
|
}
|
2016-04-20 16:22:23 -04:00
|
|
|
if (m_config.is_transceiver_online () // need working rig control for hopping
|
2020-07-27 10:01:09 -04:00
|
|
|
&& !m_config.is_dummy_rig ()
|
2016-04-20 15:33:33 -04:00
|
|
|
&& ui->band_hopping_group_box->isChecked ()) {
|
2015-07-11 18:49:56 -04:00
|
|
|
auto hop_data = m_WSPR_band_hopping.next_hop (m_auto);
|
2016-04-06 13:11:58 -04:00
|
|
|
qDebug () << "hop data: period:" << hop_data.period_name_
|
|
|
|
<< "frequencies index:" << hop_data.frequencies_index_
|
|
|
|
<< "tune:" << hop_data.tune_required_
|
|
|
|
<< "tx:" << hop_data.tx_next_;
|
2015-07-07 15:02:25 -04:00
|
|
|
m_WSPR_tx_next = hop_data.tx_next_;
|
2015-06-03 21:45:40 -04:00
|
|
|
if (hop_data.frequencies_index_ >= 0) { // new band
|
|
|
|
ui->bandComboBox->setCurrentIndex (hop_data.frequencies_index_);
|
|
|
|
on_bandComboBox_activated (hop_data.frequencies_index_);
|
2020-06-26 16:35:29 -04:00
|
|
|
// Execute user's hardware controller
|
2020-07-26 19:51:12 -04:00
|
|
|
auto band = m_config.bands ()->find (m_freqNominal).remove ('m');
|
2020-06-26 16:35:29 -04:00
|
|
|
#if defined(Q_OS_WIN)
|
|
|
|
// On windows we use CMD.EXE to find and execute the
|
|
|
|
// user_hardware executable. This means that the first matching
|
|
|
|
// file extension on the PATHEXT environment variable found on
|
|
|
|
// the PATH environment variable path list. This give maximum
|
|
|
|
// flexibility for users to write user_hardware in their
|
|
|
|
// language of choice, and place the file anywhere on the PATH
|
|
|
|
// environment variable. Equivalent to typing user_hardware
|
|
|
|
// without any path or extension at the CMD.EXE prompt.
|
2020-07-26 19:51:12 -04:00
|
|
|
p3.start("CMD", QStringList {"/C", "user_hardware", band});
|
2020-06-26 16:35:29 -04:00
|
|
|
#else
|
|
|
|
// On non-Windows systems we expect the user_hardware executable
|
|
|
|
// to be anywhere in the paths specified in the PATH environment
|
|
|
|
// variable path list, and executable. Equivalent to typing
|
|
|
|
// user_hardware without any path at the shell prompt.
|
2020-07-27 07:19:47 -04:00
|
|
|
p3.start("/bin/sh", QStringList {"-c", "user_hardware " + band});
|
2020-06-26 16:35:29 -04:00
|
|
|
#endif
|
2015-05-31 07:51:40 -04:00
|
|
|
|
|
|
|
// Produce a short tuneup signal
|
|
|
|
m_tuneup = false;
|
2015-06-03 21:45:40 -04:00
|
|
|
if (hop_data.tune_required_) {
|
2015-06-06 09:28:20 -04:00
|
|
|
m_tuneup = true;
|
|
|
|
on_tuneButton_clicked (true);
|
2016-06-10 11:54:16 -04:00
|
|
|
tuneATU_Timer.start (2500);
|
2015-05-31 07:51:40 -04:00
|
|
|
}
|
|
|
|
}
|
2015-05-30 19:45:22 -04:00
|
|
|
|
2015-05-31 07:51:40 -04:00
|
|
|
// Display grayline status
|
2016-07-01 20:25:38 -04:00
|
|
|
band_hopping_label.setText (hop_data.period_name_);
|
2015-05-31 07:51:40 -04:00
|
|
|
}
|
2015-06-06 09:28:20 -04:00
|
|
|
else {
|
2020-07-23 13:51:05 -04:00
|
|
|
m_WSPR_tx_next = m_WSPR_band_hopping.next_is_tx(m_mode=="FST4W");
|
2015-06-06 09:28:20 -04:00
|
|
|
}
|
2015-05-27 09:08:28 -04:00
|
|
|
}
|
|
|
|
|
2016-04-06 13:11:58 -04:00
|
|
|
void MainWindow::astroUpdate ()
|
2015-06-11 20:26:44 -04:00
|
|
|
{
|
2016-04-06 13:11:58 -04:00
|
|
|
if (m_astroWidget)
|
|
|
|
{
|
2017-08-03 07:23:07 -04:00
|
|
|
// no Doppler correction while CTRL pressed allows manual tuning
|
|
|
|
if (Qt::ControlModifier & QApplication::queryKeyboardModifiers ()) return;
|
|
|
|
|
2016-04-06 13:11:58 -04:00
|
|
|
auto correction = m_astroWidget->astroUpdate(QDateTime::currentDateTimeUtc (),
|
|
|
|
m_config.my_grid(), m_hisGrid,
|
|
|
|
m_freqNominal,
|
|
|
|
"Echo" == m_mode, m_transmitting,
|
|
|
|
!m_config.tx_QSY_allowed (), m_TRperiod);
|
|
|
|
// no Doppler correction in Tx if rig can't do it
|
|
|
|
if (m_transmitting && !m_config.tx_QSY_allowed ()) return;
|
|
|
|
if (!m_astroWidget->doppler_tracking ()) return;
|
|
|
|
if ((m_monitoring || m_transmitting)
|
|
|
|
// no Doppler correction below 6m
|
|
|
|
&& m_freqNominal >= 50000000
|
|
|
|
&& m_config.split_mode ())
|
|
|
|
{
|
|
|
|
// adjust for rig resolution
|
2016-12-03 19:55:07 -05:00
|
|
|
if (m_config.transceiver_resolution () > 2)
|
2016-04-06 13:11:58 -04:00
|
|
|
{
|
|
|
|
correction.rx = (correction.rx + 50) / 100 * 100;
|
|
|
|
correction.tx = (correction.tx + 50) / 100 * 100;
|
|
|
|
}
|
2016-12-03 19:55:07 -05:00
|
|
|
else if (m_config.transceiver_resolution () > 1)
|
|
|
|
{
|
|
|
|
correction.rx = (correction.rx + 10) / 20 * 20;
|
|
|
|
correction.tx = (correction.tx + 10) / 20 * 20;
|
|
|
|
}
|
2016-04-06 13:11:58 -04:00
|
|
|
else if (m_config.transceiver_resolution () > 0)
|
|
|
|
{
|
|
|
|
correction.rx = (correction.rx + 5) / 10 * 10;
|
|
|
|
correction.tx = (correction.tx + 5) / 10 * 10;
|
|
|
|
}
|
2016-12-03 19:55:07 -05:00
|
|
|
else if (m_config.transceiver_resolution () < -2)
|
2016-04-06 13:11:58 -04:00
|
|
|
{
|
|
|
|
correction.rx = correction.rx / 100 * 100;
|
|
|
|
correction.tx = correction.tx / 100 * 100;
|
|
|
|
}
|
2016-12-03 19:55:07 -05:00
|
|
|
else if (m_config.transceiver_resolution () < -1)
|
|
|
|
{
|
|
|
|
correction.rx = correction.rx / 20 * 20;
|
|
|
|
correction.tx = correction.tx / 20 * 20;
|
|
|
|
}
|
2016-04-06 13:11:58 -04:00
|
|
|
else if (m_config.transceiver_resolution () < 0)
|
|
|
|
{
|
|
|
|
correction.rx = correction.rx / 10 * 10;
|
|
|
|
correction.tx = correction.tx / 10 * 10;
|
|
|
|
}
|
|
|
|
m_astroCorrection = correction;
|
2020-11-06 13:28:59 -05:00
|
|
|
if (m_reverse_Doppler)
|
|
|
|
{
|
|
|
|
m_astroCorrection.reverse ();
|
|
|
|
}
|
2016-04-06 13:11:58 -04:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
m_astroCorrection = {};
|
|
|
|
}
|
|
|
|
|
|
|
|
setRig ();
|
|
|
|
}
|
2015-06-11 20:26:44 -04:00
|
|
|
}
|
|
|
|
|
2016-11-26 20:34:43 -05:00
|
|
|
void MainWindow::setRig (Frequency f)
|
2015-11-17 20:28:12 -05:00
|
|
|
{
|
2016-11-26 20:34:43 -05:00
|
|
|
if (f)
|
|
|
|
{
|
|
|
|
m_freqNominal = f;
|
|
|
|
genCQMsg ();
|
|
|
|
m_freqTxNominal = m_freqNominal;
|
|
|
|
if (m_astroWidget) m_astroWidget->nominal_frequency (m_freqNominal, m_freqTxNominal);
|
|
|
|
}
|
Improved frequency calibration
Measure check box added to FreqCal mode, check to record to fmt.all
with current calibration correction disabled, uncheck to see the
impact of the current calibration parameters.
The fmt.all file is now optionally renamed to fmt.bak when a
calibration solution is accepted. This allows users to preserve an
fmt.all file that they might have edited for best fit.
A calibration procedure might proceed thus:-
1) select FreqCal mode,
2) step through suggested calibration test frequencies deleting those
that have no usable signal,
3) enable "Menu->Tools->Execute frequency calibration cycle" and check
that suitable signals are present,
4) select a suitable FTol and T/R period,
5) check "Measure" and let the cycle complete a few times to gather
data,
6) uncheck "Measure" to complete the data capture, optionally tidy the
fmt.all file with your favourite editor,
7) push "Menu->Tools->Solve for calibration parameters" and accept if
you like what you see,
8) sit back and admire your accurately frequency calibrated station.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@8167 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2017-10-13 18:34:21 -04:00
|
|
|
if (m_mode == "FreqCal"
|
|
|
|
&& m_frequency_list_fcal_iter != m_config.frequencies ()->end ()) {
|
|
|
|
m_freqNominal = m_frequency_list_fcal_iter->frequency_ - ui->RxFreqSpinBox->value ();
|
|
|
|
}
|
2016-04-06 13:11:58 -04:00
|
|
|
if(m_transmitting && !m_config.tx_QSY_allowed ()) return;
|
2016-11-26 20:34:43 -05:00
|
|
|
if ((m_monitoring || m_transmitting) && m_config.transceiver_online ())
|
2016-04-06 13:11:58 -04:00
|
|
|
{
|
2016-11-26 20:34:43 -05:00
|
|
|
if (m_transmitting && m_config.split_mode ())
|
2016-04-06 13:11:58 -04:00
|
|
|
{
|
2020-09-08 07:54:19 -04:00
|
|
|
m_config.transceiver_tx_frequency (m_freqTxNominal + m_astroCorrection.tx);
|
2016-04-06 13:11:58 -04:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2020-09-08 07:54:19 -04:00
|
|
|
m_config.transceiver_frequency (m_freqNominal + m_astroCorrection.rx);
|
2016-04-06 13:11:58 -04:00
|
|
|
}
|
2015-06-11 20:26:44 -04:00
|
|
|
}
|
|
|
|
}
|
2015-11-17 20:28:12 -05:00
|
|
|
|
|
|
|
void MainWindow::fastPick(int x0, int x1, int y)
|
|
|
|
{
|
2016-09-16 10:18:40 -04:00
|
|
|
float pixPerSecond=12000.0/512.0;
|
2019-05-22 12:44:28 -04:00
|
|
|
if(m_TRperiod<30.0) pixPerSecond=12000.0/256.0;
|
2016-07-14 13:06:52 -04:00
|
|
|
if(m_mode!="ISCAT" and m_mode!="MSK144") return;
|
2015-11-17 20:28:12 -05:00
|
|
|
if(!m_decoderBusy) {
|
2015-12-17 15:29:55 -05:00
|
|
|
dec_data.params.newdat=0;
|
|
|
|
dec_data.params.nagain=1;
|
2015-11-17 20:28:12 -05:00
|
|
|
m_nPick=1;
|
|
|
|
if(y > 120) m_nPick=2;
|
2016-09-16 10:18:40 -04:00
|
|
|
m_t0Pick=x0/pixPerSecond;
|
|
|
|
m_t1Pick=x1/pixPerSecond;
|
2016-09-17 09:34:40 -04:00
|
|
|
m_dataAvailable=true;
|
2015-11-17 20:28:12 -05:00
|
|
|
decode();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-01-05 13:35:26 -05:00
|
|
|
void MainWindow::on_actionMeasure_reference_spectrum_triggered()
|
2015-11-17 20:28:12 -05:00
|
|
|
{
|
2016-04-11 16:53:54 -04:00
|
|
|
if(!m_monitoring) on_monitorButton_clicked (true);
|
2016-04-08 11:23:32 -04:00
|
|
|
m_bRefSpec=true;
|
2015-11-17 20:28:12 -05:00
|
|
|
}
|
|
|
|
|
2017-01-15 16:43:40 -05:00
|
|
|
void MainWindow::on_actionMeasure_phase_response_triggered()
|
|
|
|
{
|
|
|
|
if(m_bTrain) {
|
|
|
|
m_bTrain=false;
|
2017-01-15 17:13:59 -05:00
|
|
|
MessageBox::information_message (this, tr ("Phase Training Disabled"));
|
2017-01-15 16:43:40 -05:00
|
|
|
} else {
|
|
|
|
m_bTrain=true;
|
2017-01-15 17:13:59 -05:00
|
|
|
MessageBox::information_message (this, tr ("Phase Training Enabled"));
|
2017-01-15 16:43:40 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-01-05 13:35:26 -05:00
|
|
|
void MainWindow::on_actionErase_reference_spectrum_triggered()
|
2016-12-24 15:05:28 -05:00
|
|
|
{
|
|
|
|
m_bClearRefSpec=true;
|
|
|
|
}
|
|
|
|
|
2017-01-12 13:21:58 -05:00
|
|
|
void MainWindow::freqCalStep()
|
|
|
|
{
|
2017-10-01 17:43:59 -04:00
|
|
|
if (m_frequency_list_fcal_iter == m_config.frequencies ()->end ()
|
|
|
|
|| ++m_frequency_list_fcal_iter == m_config.frequencies ()->end ()) {
|
2017-01-12 13:21:58 -05:00
|
|
|
m_frequency_list_fcal_iter = m_config.frequencies ()->begin ();
|
2017-01-12 16:03:30 -05:00
|
|
|
}
|
|
|
|
|
2017-01-09 08:50:02 -05:00
|
|
|
// allow for empty list
|
2017-01-12 13:21:58 -05:00
|
|
|
if (m_frequency_list_fcal_iter != m_config.frequencies ()->end ()) {
|
|
|
|
setRig (m_frequency_list_fcal_iter->frequency_ - ui->RxFreqSpinBox->value ());
|
|
|
|
}
|
2017-01-05 13:35:26 -05:00
|
|
|
}
|
|
|
|
|
2016-11-26 20:34:43 -05:00
|
|
|
void MainWindow::on_sbCQTxFreq_valueChanged(int)
|
2015-11-17 20:28:12 -05:00
|
|
|
{
|
2016-11-26 20:34:43 -05:00
|
|
|
setXIT (ui->TxFreqSpinBox->value ());
|
2015-11-17 20:28:12 -05:00
|
|
|
}
|
|
|
|
|
2016-11-26 20:34:43 -05:00
|
|
|
void MainWindow::on_cbCQTx_toggled(bool b)
|
2015-11-17 20:28:12 -05:00
|
|
|
{
|
2016-11-26 20:34:43 -05:00
|
|
|
ui->sbCQTxFreq->setEnabled(b);
|
|
|
|
genCQMsg();
|
2015-11-17 20:28:12 -05:00
|
|
|
if(b) {
|
|
|
|
ui->txrb6->setChecked(true);
|
|
|
|
m_ntx=6;
|
2017-07-24 15:27:23 -04:00
|
|
|
m_QSOProgress = CALLING;
|
2015-11-17 20:28:12 -05:00
|
|
|
}
|
2016-11-26 20:34:43 -05:00
|
|
|
setRig ();
|
|
|
|
setXIT (ui->TxFreqSpinBox->value ());
|
2015-11-17 20:28:12 -05:00
|
|
|
}
|
|
|
|
|
2016-05-24 06:08:35 -04:00
|
|
|
void MainWindow::statusUpdate () const
|
|
|
|
{
|
2019-06-25 09:35:58 -04:00
|
|
|
if (!ui || m_block_udp_status_updates) return;
|
2016-12-16 14:36:21 -05:00
|
|
|
auto submode = current_submode ();
|
2019-06-25 09:35:58 -04:00
|
|
|
auto ftol = ui->sbFtol->value ();
|
2020-10-13 11:46:38 -04:00
|
|
|
if ("FST4W" == m_mode)
|
|
|
|
{
|
|
|
|
ftol = ui->sbFST4W_FTol->value ();
|
|
|
|
}
|
|
|
|
else if (!(ui->sbFtol->isVisible () && ui->sbFtol->isEnabled ()))
|
2019-06-25 09:35:58 -04:00
|
|
|
{
|
|
|
|
ftol = quint32_max;
|
|
|
|
}
|
|
|
|
auto tr_period = ui->sbTR->value ();
|
2020-10-13 11:46:38 -04:00
|
|
|
auto rx_frequency = ui->RxFreqSpinBox->value ();
|
|
|
|
if ("FST4W" == m_mode)
|
|
|
|
{
|
|
|
|
tr_period = ui->sbTR_FST4W->value ();
|
|
|
|
rx_frequency = ui->sbFST4W_RxFreq->value ();
|
|
|
|
}
|
|
|
|
else if (!(ui->sbTR->isVisible () && ui->sbTR->isEnabled ()))
|
2019-06-25 09:35:58 -04:00
|
|
|
{
|
|
|
|
tr_period = quint32_max;
|
|
|
|
}
|
2016-07-09 14:35:25 -04:00
|
|
|
m_messageClient->status_update (m_freqNominal, m_mode, m_hisCall,
|
|
|
|
QString::number (ui->rptSpinBox->value ()),
|
|
|
|
m_modeTx, ui->autoButton->isChecked (),
|
|
|
|
m_transmitting, m_decoderBusy,
|
2020-10-13 11:46:38 -04:00
|
|
|
rx_frequency, ui->TxFreqSpinBox->value (),
|
2016-07-09 14:35:25 -04:00
|
|
|
m_config.my_callsign (), m_config.my_grid (),
|
2016-12-16 14:36:21 -05:00
|
|
|
m_hisGrid, m_tx_watchdog,
|
2018-12-02 18:19:08 -05:00
|
|
|
submode != QChar::Null ? QString {submode} : QString {}, m_bFastMode,
|
2019-06-12 20:44:28 -04:00
|
|
|
static_cast<quint8> (m_config.special_op_id ()),
|
2020-12-20 20:31:57 -05:00
|
|
|
ftol, tr_period, m_multi_settings->configuration_name (),
|
|
|
|
m_currentMessage);
|
2016-05-24 06:08:35 -04:00
|
|
|
}
|
2016-07-01 07:36:59 -04:00
|
|
|
|
|
|
|
void MainWindow::childEvent (QChildEvent * e)
|
|
|
|
{
|
|
|
|
if (e->child ()->isWidgetType ())
|
|
|
|
{
|
|
|
|
switch (e->type ())
|
|
|
|
{
|
|
|
|
case QEvent::ChildAdded: add_child_to_event_filter (e->child ()); break;
|
|
|
|
case QEvent::ChildRemoved: remove_child_from_event_filter (e->child ()); break;
|
|
|
|
default: break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
QMainWindow::childEvent (e);
|
|
|
|
}
|
|
|
|
|
|
|
|
// add widget and any child widgets to our event filter so that we can
|
|
|
|
// take action on key press ad mouse press events anywhere in the main window
|
|
|
|
void MainWindow::add_child_to_event_filter (QObject * target)
|
|
|
|
{
|
|
|
|
if (target && target->isWidgetType ())
|
|
|
|
{
|
|
|
|
target->installEventFilter (this);
|
|
|
|
}
|
|
|
|
auto const& children = target->children ();
|
|
|
|
for (auto iter = children.begin (); iter != children.end (); ++iter)
|
|
|
|
{
|
|
|
|
add_child_to_event_filter (*iter);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// recursively remove widget and any child widgets from our event filter
|
|
|
|
void MainWindow::remove_child_from_event_filter (QObject * target)
|
|
|
|
{
|
|
|
|
auto const& children = target->children ();
|
|
|
|
for (auto iter = children.begin (); iter != children.end (); ++iter)
|
|
|
|
{
|
|
|
|
remove_child_from_event_filter (*iter);
|
|
|
|
}
|
|
|
|
if (target && target->isWidgetType ())
|
|
|
|
{
|
|
|
|
target->removeEventFilter (this);
|
|
|
|
}
|
|
|
|
}
|
2016-07-09 14:35:25 -04:00
|
|
|
|
|
|
|
void MainWindow::tx_watchdog (bool triggered)
|
|
|
|
{
|
|
|
|
auto prior = m_tx_watchdog;
|
|
|
|
m_tx_watchdog = triggered;
|
|
|
|
if (triggered)
|
|
|
|
{
|
|
|
|
m_bTxTime=false;
|
|
|
|
if (m_tune) stop_tuning ();
|
|
|
|
if (m_auto) auto_tx_mode (false);
|
2020-08-08 08:20:52 -04:00
|
|
|
tx_status_label.setStyleSheet ("QLabel{color: #000000; background-color: #ff0000}");
|
2020-05-19 06:26:24 -04:00
|
|
|
tx_status_label.setText (tr ("Runaway Tx watchdog"));
|
2016-07-09 14:35:25 -04:00
|
|
|
QApplication::alert (this);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
m_idleMinutes = 0;
|
|
|
|
update_watchdog_label ();
|
|
|
|
}
|
|
|
|
if (prior != triggered) statusUpdate ();
|
|
|
|
}
|
|
|
|
|
|
|
|
void MainWindow::update_watchdog_label ()
|
|
|
|
{
|
2020-07-23 13:51:05 -04:00
|
|
|
if (m_config.watchdog () && m_mode!="WSPR" && m_mode!="FST4W")
|
2016-07-09 14:35:25 -04:00
|
|
|
{
|
2020-05-19 06:26:24 -04:00
|
|
|
watchdog_label.setText (tr ("WD:%1m").arg (m_config.watchdog () - m_idleMinutes));
|
2016-07-09 14:35:25 -04:00
|
|
|
watchdog_label.setVisible (true);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
watchdog_label.setText (QString {});
|
|
|
|
watchdog_label.setVisible (false);
|
|
|
|
}
|
|
|
|
}
|
2017-07-01 15:05:52 -04:00
|
|
|
|
|
|
|
void MainWindow::on_cbMenus_toggled(bool b)
|
|
|
|
{
|
2020-11-26 20:14:12 -05:00
|
|
|
select_geometry (!b ? 2 : ui->actionSWL_Mode->isChecked () ? 1 : 0);
|
2017-07-01 15:05:52 -04:00
|
|
|
}
|
2017-07-08 14:44:42 -04:00
|
|
|
|
2018-04-01 17:46:36 -04:00
|
|
|
void MainWindow::on_cbCQonly_toggled(bool)
|
2020-03-14 17:06:54 -04:00
|
|
|
{ //Fix this -- no decode here?
|
|
|
|
to_jt9(m_ihsym,1,-1); //Send m_ihsym to jt9[.exe] and start decoding
|
2018-04-01 17:46:36 -04:00
|
|
|
decodeBusy(true);
|
2017-12-16 13:16:02 -05:00
|
|
|
}
|
|
|
|
|
2017-07-09 15:25:28 -04:00
|
|
|
void MainWindow::on_cbFirst_toggled(bool b)
|
|
|
|
{
|
2017-07-25 21:39:11 -04:00
|
|
|
if (b) {
|
|
|
|
if (m_auto && CALLING == m_QSOProgress) {
|
|
|
|
ui->cbFirst->setStyleSheet ("QCheckBox{color:red}");
|
|
|
|
}
|
2017-08-03 10:48:59 -04:00
|
|
|
} else {
|
|
|
|
ui->cbFirst->setStyleSheet ("");
|
2017-07-25 21:39:11 -04:00
|
|
|
}
|
2017-07-09 15:25:28 -04:00
|
|
|
}
|
|
|
|
|
2017-07-10 09:43:03 -04:00
|
|
|
void MainWindow::on_cbAutoSeq_toggled(bool b)
|
|
|
|
{
|
|
|
|
if(!b) ui->cbFirst->setChecked(false);
|
2020-07-23 13:51:05 -04:00
|
|
|
ui->cbFirst->setVisible((m_mode=="FT8" or m_mode=="FT4" or m_mode=="FST4") and b);
|
2017-07-10 09:43:03 -04:00
|
|
|
}
|
|
|
|
|
Improved frequency calibration
Measure check box added to FreqCal mode, check to record to fmt.all
with current calibration correction disabled, uncheck to see the
impact of the current calibration parameters.
The fmt.all file is now optionally renamed to fmt.bak when a
calibration solution is accepted. This allows users to preserve an
fmt.all file that they might have edited for best fit.
A calibration procedure might proceed thus:-
1) select FreqCal mode,
2) step through suggested calibration test frequencies deleting those
that have no usable signal,
3) enable "Menu->Tools->Execute frequency calibration cycle" and check
that suitable signals are present,
4) select a suitable FTol and T/R period,
5) check "Measure" and let the cycle complete a few times to gather
data,
6) uncheck "Measure" to complete the data capture, optionally tidy the
fmt.all file with your favourite editor,
7) push "Menu->Tools->Solve for calibration parameters" and accept if
you like what you see,
8) sit back and admire your accurately frequency calibrated station.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@8167 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2017-10-13 18:34:21 -04:00
|
|
|
void MainWindow::on_measure_check_box_stateChanged (int state)
|
|
|
|
{
|
2017-10-14 14:22:47 -04:00
|
|
|
m_config.enable_calibration (Qt::Checked != state);
|
Improved frequency calibration
Measure check box added to FreqCal mode, check to record to fmt.all
with current calibration correction disabled, uncheck to see the
impact of the current calibration parameters.
The fmt.all file is now optionally renamed to fmt.bak when a
calibration solution is accepted. This allows users to preserve an
fmt.all file that they might have edited for best fit.
A calibration procedure might proceed thus:-
1) select FreqCal mode,
2) step through suggested calibration test frequencies deleting those
that have no usable signal,
3) enable "Menu->Tools->Execute frequency calibration cycle" and check
that suitable signals are present,
4) select a suitable FTol and T/R period,
5) check "Measure" and let the cycle complete a few times to gather
data,
6) uncheck "Measure" to complete the data capture, optionally tidy the
fmt.all file with your favourite editor,
7) push "Menu->Tools->Solve for calibration parameters" and accept if
you like what you see,
8) sit back and admire your accurately frequency calibrated station.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@8167 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2017-10-13 18:34:21 -04:00
|
|
|
}
|
|
|
|
|
2017-07-08 14:44:42 -04:00
|
|
|
void MainWindow::write_transmit_entry (QString const& file_name)
|
|
|
|
{
|
|
|
|
QFile f {m_config.writeable_data_dir ().absoluteFilePath (file_name)};
|
|
|
|
if (f.open(QIODevice::WriteOnly | QIODevice::Text | QIODevice::Append))
|
|
|
|
{
|
|
|
|
QTextStream out(&f);
|
|
|
|
auto time = QDateTime::currentDateTimeUtc ();
|
2019-05-22 12:44:28 -04:00
|
|
|
time = time.addSecs (-fmod(double(time.time().second()),m_TRperiod));
|
2017-07-08 14:44:42 -04:00
|
|
|
out << time.toString("yyMMdd_hhmmss")
|
|
|
|
<< " Transmitting " << qSetRealNumberPrecision (12) << (m_freqNominal / 1.e6)
|
|
|
|
<< " MHz " << m_modeTx
|
2020-06-13 11:04:41 -04:00
|
|
|
<< ": " << m_currentMessage
|
|
|
|
#if QT_VERSION >= QT_VERSION_CHECK (5, 15, 0)
|
|
|
|
<< Qt::endl
|
|
|
|
#else
|
|
|
|
<< endl
|
|
|
|
#endif
|
|
|
|
;
|
2017-07-08 14:44:42 -04:00
|
|
|
f.close();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
auto const& message = tr ("Cannot open \"%1\" for append: %2")
|
|
|
|
.arg (f.fileName ()).arg (f.errorString ());
|
|
|
|
QTimer::singleShot (0, [=] { // don't block guiUpdate
|
|
|
|
MessageBox::warning_message (this, tr ("Log File Error"), message);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
2017-11-02 14:45:19 -04:00
|
|
|
|
2018-02-20 11:44:11 -05:00
|
|
|
// -------------------------- Code for FT8 DXpedition Mode ---------------------------
|
2017-12-06 12:05:48 -05:00
|
|
|
|
2018-04-22 08:32:32 -04:00
|
|
|
void MainWindow::hound_reply ()
|
2018-04-21 15:10:16 -04:00
|
|
|
{
|
2018-04-22 08:32:32 -04:00
|
|
|
if (!m_tune) {
|
2018-05-10 11:09:57 -04:00
|
|
|
//Select TX3, set TxFreq to FoxFreq, and Force Auto ON.
|
2018-04-22 08:32:32 -04:00
|
|
|
ui->txrb3->setChecked (true);
|
|
|
|
m_nSentFoxRrpt = 1;
|
2018-05-10 11:09:57 -04:00
|
|
|
ui->rptSpinBox->setValue(m_rptSent.toInt());
|
2018-04-22 08:32:32 -04:00
|
|
|
if (!m_auto) auto_tx_mode(true);
|
|
|
|
ui->TxFreqSpinBox->setValue (m_nFoxFreq);
|
2018-04-21 15:10:16 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-12-07 12:09:03 -05:00
|
|
|
void MainWindow::on_sbNlist_valueChanged(int n)
|
2017-12-06 12:05:48 -05:00
|
|
|
{
|
2017-12-07 12:09:03 -05:00
|
|
|
m_Nlist=n;
|
2017-12-06 12:05:48 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
void MainWindow::on_sbNslots_valueChanged(int n)
|
|
|
|
{
|
|
|
|
m_Nslots=n;
|
2018-03-14 13:46:42 -04:00
|
|
|
QString t;
|
2020-05-06 21:56:57 -04:00
|
|
|
t = t.asprintf(" NSlots %d",m_Nslots);
|
2018-03-14 13:46:42 -04:00
|
|
|
writeFoxQSO(t);
|
2017-12-06 12:05:48 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
void MainWindow::on_sbMax_dB_valueChanged(int n)
|
|
|
|
{
|
|
|
|
m_max_dB=n;
|
2018-03-14 13:46:42 -04:00
|
|
|
QString t;
|
2020-05-06 21:56:57 -04:00
|
|
|
t = t.asprintf(" Max_dB %d",m_max_dB);
|
2018-03-14 13:46:42 -04:00
|
|
|
writeFoxQSO(t);
|
2017-12-06 12:05:48 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
void MainWindow::on_pbFoxReset_clicked()
|
|
|
|
{
|
2018-04-17 10:54:37 -04:00
|
|
|
auto button = MessageBox::query_message (this, tr ("Confirm Reset"),
|
|
|
|
tr ("Are you sure you want to clear the QSO queues?"));
|
|
|
|
if(button == MessageBox::Yes) {
|
2018-04-19 09:43:53 -04:00
|
|
|
QFile f(m_config.temp_dir().absoluteFilePath("houndcallers.txt"));
|
|
|
|
f.remove();
|
2018-04-18 14:25:11 -04:00
|
|
|
ui->decodedTextBrowser->setText("");
|
2018-04-17 10:54:37 -04:00
|
|
|
ui->textBrowser4->setText("");
|
|
|
|
m_houndQueue.clear();
|
|
|
|
m_foxQSO.clear();
|
2018-04-19 09:43:53 -04:00
|
|
|
m_foxQSOinProgress.clear();
|
2018-04-17 10:54:37 -04:00
|
|
|
writeFoxQSO(" Reset");
|
|
|
|
}
|
2017-12-06 12:05:48 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
void MainWindow::on_comboBoxHoundSort_activated(int index)
|
2017-11-02 14:45:19 -04:00
|
|
|
{
|
2017-12-06 12:05:48 -05:00
|
|
|
if(index!=-99) houndCallers(); //Silence compiler warning
|
|
|
|
}
|
|
|
|
|
|
|
|
//------------------------------------------------------------------------------
|
|
|
|
QString MainWindow::sortHoundCalls(QString t, int isort, int max_dB)
|
|
|
|
{
|
|
|
|
/* Called from "houndCallers()" to sort the list of calling stations by
|
|
|
|
* specified criteria.
|
2017-12-07 10:38:48 -05:00
|
|
|
*
|
2017-12-06 12:05:48 -05:00
|
|
|
* QString "t" contains a list of Hound callers read from file "houndcallers.txt".
|
2017-12-06 16:38:24 -05:00
|
|
|
* isort=0: random (shuffled order)
|
2017-12-07 10:38:48 -05:00
|
|
|
* 1: Call
|
|
|
|
* 2: Grid
|
2017-12-06 16:38:24 -05:00
|
|
|
* 3: SNR (reverse order)
|
2017-12-07 10:38:48 -05:00
|
|
|
* 4: Distance (reverse order)
|
2017-12-06 12:05:48 -05:00
|
|
|
*/
|
2017-12-07 10:38:48 -05:00
|
|
|
|
2017-11-02 14:45:19 -04:00
|
|
|
QMap<QString,QString> map;
|
|
|
|
QStringList lines,lines2;
|
2017-12-04 13:18:03 -05:00
|
|
|
QString msg,houndCall,t1;
|
2017-12-19 10:18:56 -05:00
|
|
|
QString ABC{"ABCDEFGHIJKLMNOPQRSTUVWXYZ _"};
|
2017-11-02 14:45:19 -04:00
|
|
|
QList<int> list;
|
2020-06-13 11:04:41 -04:00
|
|
|
int i,j,k,n,nlines;
|
2017-11-16 11:33:15 -05:00
|
|
|
bool bReverse=(isort >= 3);
|
2017-11-02 14:45:19 -04:00
|
|
|
|
|
|
|
isort=qAbs(isort);
|
|
|
|
// Save only the most recent transmission from each caller.
|
|
|
|
lines = t.split("\n");
|
|
|
|
nlines=lines.length()-1;
|
|
|
|
for(i=0; i<nlines; i++) {
|
2017-12-07 10:38:48 -05:00
|
|
|
msg=lines.at(i); //key = callsign
|
2017-12-22 12:25:16 -05:00
|
|
|
if(msg.mid(13,1)==" ") msg=msg.mid(0,13) + "...." + msg.mid(17);
|
2017-12-07 10:38:48 -05:00
|
|
|
houndCall=msg.split(" ").at(0); //value = "call grid snr freq dist age"
|
2017-12-04 13:18:03 -05:00
|
|
|
map[houndCall]=msg;
|
2017-11-02 14:45:19 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
j=0;
|
|
|
|
t="";
|
|
|
|
for(auto a: map.keys()) {
|
2020-06-13 11:04:41 -04:00
|
|
|
t1=map[a].split(" ",SkipEmptyParts).at(2);
|
2017-12-06 12:05:48 -05:00
|
|
|
int nsnr=t1.toInt(); // get snr
|
|
|
|
if(nsnr <= max_dB) { // keep only if snr in specified range
|
2017-11-02 14:45:19 -04:00
|
|
|
if(isort==1) t += map[a] + "\n";
|
|
|
|
if(isort==3 or isort==4) {
|
2017-12-06 12:05:48 -05:00
|
|
|
i=2; // sort Hound calls by snr
|
|
|
|
if(isort==4) i=4; // sort Hound calls by distance
|
2020-06-13 11:04:41 -04:00
|
|
|
t1=map[a].split(" ",SkipEmptyParts).at(i);
|
2017-12-06 12:05:48 -05:00
|
|
|
n=1000*(t1.toInt()+100) + j; // pack (snr or dist) and index j into n
|
2019-07-02 20:25:25 -04:00
|
|
|
list.insert(j,n); // add n to list at [j]
|
2017-11-02 14:45:19 -04:00
|
|
|
}
|
|
|
|
|
2017-12-06 12:05:48 -05:00
|
|
|
if(isort==2) { // sort Hound calls by grid
|
2020-06-13 11:04:41 -04:00
|
|
|
t1=map[a].split(" ",SkipEmptyParts).at(1);
|
2018-05-09 08:39:23 -04:00
|
|
|
if(t1=="....") t1="ZZ99";
|
2017-11-02 14:45:19 -04:00
|
|
|
int i1=ABC.indexOf(t1.mid(0,1));
|
|
|
|
int i2=ABC.indexOf(t1.mid(1,1));
|
|
|
|
n=100*(26*i1+i2)+t1.mid(2,2).toInt();
|
2017-12-06 12:05:48 -05:00
|
|
|
n=1000*n + j; // pack ngrid and index j into n
|
2019-07-02 20:25:25 -04:00
|
|
|
list.insert(j,n); // add n to list at [j]
|
2017-11-02 14:45:19 -04:00
|
|
|
}
|
|
|
|
|
2017-12-06 12:05:48 -05:00
|
|
|
lines2.insert(j,map[a]); // add map[a] to lines2 at [j]
|
2017-11-02 14:45:19 -04:00
|
|
|
j++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if(isort>1) {
|
|
|
|
if(bReverse) {
|
2018-11-25 17:13:15 -05:00
|
|
|
std::sort (list.begin (), list.end (), std::greater<int> ());
|
2017-11-02 14:45:19 -04:00
|
|
|
} else {
|
2018-11-25 17:13:15 -05:00
|
|
|
std::sort (list.begin (), list.end ());
|
2017-11-02 14:45:19 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if(isort>1) {
|
|
|
|
for(i=0; i<j; i++) {
|
|
|
|
k=list[i]%1000;
|
|
|
|
n=list[i]/1000 - 100;
|
|
|
|
t += lines2.at(k) + "\n";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-11-15 11:38:35 -05:00
|
|
|
int nn=lines2.length();
|
2017-12-06 12:05:48 -05:00
|
|
|
if(isort==0) { // shuffle Hound calls to random order
|
2017-11-15 11:38:35 -05:00
|
|
|
int a[nn];
|
|
|
|
for(i=0; i<nn; i++) {
|
|
|
|
a[i]=i;
|
|
|
|
}
|
|
|
|
for(i=nn-1; i>-1; i--) {
|
2020-06-13 11:04:41 -04:00
|
|
|
#if QT_VERSION >= QT_VERSION_CHECK (5, 15, 0)
|
|
|
|
j = (i + 1) * QRandomGenerator::global ()->generateDouble ();
|
|
|
|
#else
|
2017-11-15 11:38:35 -05:00
|
|
|
j=(i+1)*double(qrand())/RAND_MAX;
|
2020-06-13 11:04:41 -04:00
|
|
|
#endif
|
|
|
|
std::swap (a[j], a[i]);
|
|
|
|
t += lines2.at(a[i]) + "\n";
|
2017-11-15 11:38:35 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-11-03 14:27:46 -04:00
|
|
|
int i0=t.indexOf("\n") + 1;
|
2017-12-06 12:05:48 -05:00
|
|
|
m_nSortedHounds=0;
|
|
|
|
if(i0 > 0) {
|
2017-12-07 12:09:03 -05:00
|
|
|
m_nSortedHounds=qMin(t.length(),m_Nlist*i0)/i0; // Number of sorted & displayed Hounds
|
2017-12-06 12:05:48 -05:00
|
|
|
}
|
2017-12-07 12:09:03 -05:00
|
|
|
m_houndCallers=t.mid(0,m_Nlist*i0);
|
2017-12-06 12:05:48 -05:00
|
|
|
|
|
|
|
return m_houndCallers;
|
|
|
|
}
|
|
|
|
|
|
|
|
//------------------------------------------------------------------------------
|
|
|
|
void MainWindow::selectHound(QString line)
|
|
|
|
{
|
|
|
|
/* Called from doubleClickOnCall() in DXpedition Fox mode.
|
2018-02-20 11:44:11 -05:00
|
|
|
* QString "line" is a user-selected line from left text window.
|
2017-12-06 12:05:48 -05:00
|
|
|
* The line may be selected by double-clicking; alternatively, hitting
|
|
|
|
* <Enter> is equivalent to double-clicking on the top-most line.
|
|
|
|
*/
|
|
|
|
|
2018-02-22 09:28:59 -05:00
|
|
|
if(line.length()==0) return;
|
2020-06-13 11:04:41 -04:00
|
|
|
QString houndCall=line.split(" ",SkipEmptyParts).at(0);
|
2017-12-06 12:05:48 -05:00
|
|
|
|
|
|
|
// Don't add a call already enqueued or in QSO
|
|
|
|
if(ui->textBrowser4->toPlainText().indexOf(houndCall) >= 0) return;
|
|
|
|
|
2020-06-13 11:04:41 -04:00
|
|
|
QString houndGrid=line.split(" ",SkipEmptyParts).at(1); // Hound caller's grid
|
|
|
|
QString rpt=line.split(" ",SkipEmptyParts).at(2); // Hound SNR
|
2017-12-06 12:05:48 -05:00
|
|
|
|
|
|
|
m_houndCallers=m_houndCallers.remove(line+"\n"); // Remove t from sorted Hound list
|
|
|
|
m_nSortedHounds--;
|
|
|
|
ui->decodedTextBrowser->setText(m_houndCallers); // Populate left window with Hound callers
|
2018-05-09 10:22:19 -04:00
|
|
|
QString t1=houndCall + " ";
|
2017-12-06 12:05:48 -05:00
|
|
|
QString t2=rpt;
|
2018-04-09 15:30:12 -04:00
|
|
|
if(rpt.mid(0,1) != "-" and rpt.mid(0,1) != "+") t2="+" + rpt;
|
2017-12-06 12:05:48 -05:00
|
|
|
if(t2.length()==2) t2=t2.mid(0,1) + "0" + t2.mid(1,1);
|
2018-05-09 10:22:19 -04:00
|
|
|
t1=t1.mid(0,12) + t2;
|
2018-10-16 19:26:04 -04:00
|
|
|
ui->textBrowser4->displayFoxToBeCalled(t1); // Add hound call and rpt to tb4
|
|
|
|
t1=t1 + " " + houndGrid; // Append the grid
|
|
|
|
m_houndQueue.enqueue(t1); // Put this hound into the queue
|
2018-03-12 12:45:32 -04:00
|
|
|
writeFoxQSO(" Sel: " + t1);
|
2017-12-07 10:38:48 -05:00
|
|
|
QTextCursor cursor = ui->textBrowser4->textCursor();
|
2017-12-13 12:20:21 -05:00
|
|
|
cursor.setPosition(0); // Scroll to top of list
|
2017-12-07 10:38:48 -05:00
|
|
|
ui->textBrowser4->setTextCursor(cursor);
|
2017-12-06 12:05:48 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
//------------------------------------------------------------------------------
|
|
|
|
void MainWindow::houndCallers()
|
|
|
|
{
|
|
|
|
/* Called from decodeDone(), in DXpedition Fox mode. Reads decodes from file
|
|
|
|
* "houndcallers.txt", ignoring any that are not addressed to MyCall, are already
|
|
|
|
* in the stack, or with whom a QSO has been started. Others are considered to
|
|
|
|
* be Hounds eager for a QSO. We add caller information (Call, Grid, SNR, Freq,
|
|
|
|
* Distance, Age, and Continent) to a list, sort the list by specified criteria,
|
|
|
|
* and display the top N_Hounds entries in the left text window.
|
|
|
|
*/
|
|
|
|
QFile f(m_config.temp_dir().absoluteFilePath("houndcallers.txt"));
|
|
|
|
if(f.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
|
|
|
QTextStream s(&f);
|
|
|
|
QString t="";
|
|
|
|
QString line,houndCall,paddedHoundCall;
|
|
|
|
m_nHoundsCalling=0;
|
2017-12-20 11:19:48 -05:00
|
|
|
int nTotal=0; //Total number of decoded Hounds calling Fox in 4 most recent Rx sequences
|
2017-12-06 12:05:48 -05:00
|
|
|
|
|
|
|
// Read and process the file of Hound callers.
|
|
|
|
while(!s.atEnd()) {
|
|
|
|
line=s.readLine();
|
2017-12-20 11:19:48 -05:00
|
|
|
nTotal++;
|
2018-05-09 10:22:19 -04:00
|
|
|
int i0=line.indexOf(" ");
|
|
|
|
houndCall=line.mid(0,i0);
|
2017-12-06 12:05:48 -05:00
|
|
|
paddedHoundCall=houndCall + " ";
|
2017-12-13 12:20:21 -05:00
|
|
|
//Don't list a hound already in the queue
|
2017-12-07 10:38:48 -05:00
|
|
|
if(!ui->textBrowser4->toPlainText().contains(paddedHoundCall)) {
|
2018-03-12 12:45:32 -04:00
|
|
|
if(m_loggedByFox[houndCall].contains(m_lastBand)) continue; //already logged on this band
|
2017-12-21 15:55:38 -05:00
|
|
|
if(m_foxQSO.contains(houndCall)) continue; //still in the QSO map
|
2019-05-30 17:20:09 -04:00
|
|
|
auto const& entity = m_logBook.countries ()->lookup (houndCall);
|
2018-10-25 22:24:36 -04:00
|
|
|
auto const& continent = AD1CCty::continent (entity.continent);
|
2018-02-08 16:12:30 -05:00
|
|
|
|
|
|
|
//If we are using a directed CQ, ignore Hound calls that do not comply.
|
|
|
|
QString CQtext=ui->comboBoxCQ->currentText();
|
|
|
|
if(CQtext.length()==5 and (continent!=CQtext.mid(3,2))) continue;
|
|
|
|
int nCallArea=-1;
|
|
|
|
if(CQtext.length()==4) {
|
|
|
|
for(int i=houndCall.length()-1; i>0; i--) {
|
|
|
|
if(houndCall.mid(i,1).toInt() > 0) nCallArea=houndCall.mid(i,1).toInt();
|
|
|
|
if(houndCall.mid(i,1)=="0") nCallArea=0;
|
|
|
|
if(nCallArea>=0) break;
|
|
|
|
}
|
|
|
|
if(nCallArea!=CQtext.mid(3,1).toInt()) continue;
|
|
|
|
}
|
|
|
|
//This houndCall passes all tests, add it to the list.
|
2017-12-06 12:05:48 -05:00
|
|
|
t = t + line + " " + continent + "\n";
|
2017-12-20 11:19:48 -05:00
|
|
|
m_nHoundsCalling++; // Number of accepted Hounds to be sorted
|
2017-12-06 12:05:48 -05:00
|
|
|
}
|
|
|
|
}
|
2018-11-11 23:44:03 -05:00
|
|
|
if(m_foxLogWindow) m_foxLogWindow->callers (nTotal);
|
2017-12-20 11:19:48 -05:00
|
|
|
|
2017-12-06 12:05:48 -05:00
|
|
|
// Sort and display accumulated list of Hound callers
|
|
|
|
if(t.length()>30) {
|
|
|
|
m_isort=ui->comboBoxHoundSort->currentIndex();
|
|
|
|
QString t1=sortHoundCalls(t,m_isort,m_max_dB);
|
|
|
|
ui->decodedTextBrowser->setText(t1);
|
2017-12-01 15:54:35 -05:00
|
|
|
}
|
2017-12-06 12:05:48 -05:00
|
|
|
f.close();
|
2017-12-01 15:54:35 -05:00
|
|
|
}
|
2017-11-02 14:45:19 -04:00
|
|
|
}
|
2017-11-15 11:38:35 -05:00
|
|
|
|
2017-12-22 09:51:22 -05:00
|
|
|
void MainWindow::foxRxSequencer(QString msg, QString houndCall, QString rptRcvd)
|
2017-11-15 11:38:35 -05:00
|
|
|
{
|
2017-12-06 16:38:24 -05:00
|
|
|
/* Called from "readFromStdOut()" to process decoded messages of the form
|
2017-12-07 10:38:48 -05:00
|
|
|
* "myCall houndCall R+rpt".
|
|
|
|
*
|
|
|
|
* If houndCall matches a callsign in one of our active QSO slots, we
|
2018-02-20 11:44:11 -05:00
|
|
|
* prepare to send "houndCall RR73" to that caller.
|
2017-12-06 16:38:24 -05:00
|
|
|
*/
|
2018-02-20 11:44:11 -05:00
|
|
|
if(m_foxQSO.contains(houndCall)) {
|
2018-04-13 15:20:37 -04:00
|
|
|
m_foxQSO[houndCall].rcvd=rptRcvd.mid(1); //Save report Rcvd, for the log
|
|
|
|
m_foxQSO[houndCall].tFoxRrpt=m_tFoxTx; //Save time R+rpt was received
|
|
|
|
writeFoxQSO(" Rx: " + msg.trimmed());
|
2018-05-10 11:09:57 -04:00
|
|
|
} else {
|
|
|
|
for(QString hc: m_foxQSO.keys()) { //Check for a matching compound call
|
|
|
|
if(hc.contains("/"+houndCall) or hc.contains(houndCall+"/")) {
|
|
|
|
m_foxQSO[hc].rcvd=rptRcvd.mid(1); //Save report Rcvd, for the log
|
|
|
|
m_foxQSO[hc].tFoxRrpt=m_tFoxTx; //Save time R+rpt was received
|
|
|
|
writeFoxQSO(" Rx: " + msg.trimmed());
|
|
|
|
}
|
|
|
|
}
|
2018-02-20 11:44:11 -05:00
|
|
|
}
|
2017-11-30 13:45:51 -05:00
|
|
|
}
|
2017-12-04 13:18:03 -05:00
|
|
|
|
2017-12-06 12:05:48 -05:00
|
|
|
void MainWindow::foxTxSequencer()
|
|
|
|
{
|
2017-12-06 16:38:24 -05:00
|
|
|
/* Called from guiUpdate at the point where an FT8 Fox-mode transmission
|
2017-12-07 10:38:48 -05:00
|
|
|
* is to be started.
|
|
|
|
*
|
|
|
|
* Determine what the Tx message(s) will be for each active slot, call
|
2018-02-19 13:05:06 -05:00
|
|
|
* foxgen() to generate and accumulate the corresponding waveform.
|
2017-12-06 16:38:24 -05:00
|
|
|
*/
|
2017-12-07 10:38:48 -05:00
|
|
|
|
2017-12-21 15:55:38 -05:00
|
|
|
qint64 now=QDateTime::currentMSecsSinceEpoch()/1000;
|
2018-04-13 15:20:37 -04:00
|
|
|
QStringList list1; //Up to NSlots Hound calls to be sent RR73
|
|
|
|
QStringList list2; //Up to NSlots Hound calls to be sent a report
|
2017-12-21 15:55:38 -05:00
|
|
|
QString fm; //Fox message to be transmitted
|
2018-04-13 15:20:37 -04:00
|
|
|
QString hc,hc1,hc2; //Hound calls
|
2017-12-21 15:55:38 -05:00
|
|
|
QString t,rpt;
|
2018-04-13 15:20:37 -04:00
|
|
|
qint32 islot=0;
|
|
|
|
qint32 n1,n2,n3;
|
2017-12-21 15:55:38 -05:00
|
|
|
|
2018-04-13 15:20:37 -04:00
|
|
|
m_tFoxTx++; //Increment Fox Tx cycle counter
|
2017-12-21 15:55:38 -05:00
|
|
|
|
2018-04-13 15:20:37 -04:00
|
|
|
//Is it time for a stand-alone CQ?
|
2018-05-14 14:45:23 -04:00
|
|
|
if(m_tFoxTxSinceCQ >= m_foxCQtime and ui->cbMoreCQs->isChecked()) {
|
2018-03-13 13:32:52 -04:00
|
|
|
fm=ui->comboBoxCQ->currentText() + " " + m_config.my_callsign();
|
|
|
|
if(!fm.contains("/")) {
|
2018-04-13 15:20:37 -04:00
|
|
|
//If Fox is not a compound callsign, add grid to the CQ message.
|
2018-03-13 13:32:52 -04:00
|
|
|
fm += " " + m_config.my_grid().mid(0,4);
|
|
|
|
m_fullFoxCallTime=now;
|
|
|
|
}
|
2018-05-14 14:45:23 -04:00
|
|
|
m_tFoxTx0=m_tFoxTx; //Remember when we sent a CQ
|
2018-03-13 13:32:52 -04:00
|
|
|
islot++;
|
|
|
|
foxGenWaveform(islot-1,fm);
|
2018-04-13 15:20:37 -04:00
|
|
|
goto Transmit;
|
2018-03-13 13:32:52 -04:00
|
|
|
}
|
2018-05-09 13:18:08 -04:00
|
|
|
//Compile list1: up to NSLots Hound calls to be sent RR73
|
2018-04-13 15:20:37 -04:00
|
|
|
for(QString hc: m_foxQSO.keys()) { //Check all Hound calls: First priority
|
|
|
|
if(m_foxQSO[hc].tFoxRrpt<0) continue;
|
|
|
|
if(m_foxQSO[hc].tFoxRrpt - m_foxQSO[hc].tFoxTxRR73 > 3) {
|
|
|
|
//Has been a long time since we sent RR73
|
|
|
|
list1 << hc; //Add to list1
|
|
|
|
m_foxQSO[hc].tFoxTxRR73 = m_tFoxTx; //Time RR73 is sent
|
|
|
|
m_foxQSO[hc].nRR73++; //Increment RR73 counter
|
|
|
|
if(list1.size()==m_Nslots) goto list1Done;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
for(QString hc: m_foxQSO.keys()) { //Check all Hound calls: Second priority
|
|
|
|
if(m_foxQSO[hc].tFoxRrpt<0) continue;
|
|
|
|
if(m_foxQSO[hc].tFoxTxRR73 < 0) {
|
|
|
|
//Have not yet sent RR73
|
|
|
|
list1 << hc; //Add to list1
|
|
|
|
m_foxQSO[hc].tFoxTxRR73 = m_tFoxTx; //Time RR73 is sent
|
|
|
|
m_foxQSO[hc].nRR73++; //Increment RR73 counter
|
|
|
|
if(list1.size()==m_Nslots) goto list1Done;
|
2018-02-20 11:44:11 -05:00
|
|
|
}
|
2017-12-21 15:55:38 -05:00
|
|
|
}
|
|
|
|
|
2018-04-13 15:20:37 -04:00
|
|
|
for(QString hc: m_foxQSO.keys()) { //Check all Hound calls: Third priority
|
|
|
|
if(m_foxQSO[hc].tFoxRrpt<0) continue;
|
|
|
|
if(m_foxQSO[hc].tFoxTxRR73 <= m_foxQSO[hc].tFoxRrpt) {
|
|
|
|
//We received R+rpt more recently than we sent RR73
|
|
|
|
list1 << hc; //Add to list1
|
|
|
|
m_foxQSO[hc].tFoxTxRR73 = m_tFoxTx; //Time RR73 is sent
|
|
|
|
m_foxQSO[hc].nRR73++; //Increment RR73 counter
|
|
|
|
if(list1.size()==m_Nslots) goto list1Done;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
list1Done:
|
2018-05-09 13:18:08 -04:00
|
|
|
//Compile list2: Up to Nslots Hound calls to be sent a report.
|
2018-04-13 15:20:37 -04:00
|
|
|
for(int i=0; i<m_foxQSOinProgress.count(); i++) {
|
2018-05-09 13:18:08 -04:00
|
|
|
//First do those for QSOs in progress
|
2018-04-13 15:20:37 -04:00
|
|
|
hc=m_foxQSOinProgress.at(i);
|
|
|
|
if((m_foxQSO[hc].tFoxRrpt < 0) and (m_foxQSO[hc].ncall < m_maxStrikes)) {
|
|
|
|
//Sent him a report and have not received R+rpt: call him again
|
|
|
|
list2 << hc; //Add to list2
|
2018-05-09 13:18:08 -04:00
|
|
|
if(list2.size()==m_Nslots) goto list2Done;
|
2018-04-13 15:20:37 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
while(!m_houndQueue.isEmpty()) {
|
|
|
|
//Start QSO with a new Hound
|
2017-12-21 15:55:38 -05:00
|
|
|
t=m_houndQueue.dequeue(); //Fetch new hound from queue
|
2018-05-09 10:22:19 -04:00
|
|
|
int i0=t.indexOf(" ");
|
|
|
|
hc=t.mid(0,i0); //hound call
|
2018-04-13 15:20:37 -04:00
|
|
|
list2 << hc; //Add new Hound to list2
|
|
|
|
m_foxQSOinProgress.enqueue(hc); //Put him in the QSO queue
|
2018-05-11 08:24:15 -04:00
|
|
|
m_foxQSO[hc].grid=t.mid(16,4); //Hound grid
|
2018-05-09 13:18:08 -04:00
|
|
|
rpt=t.mid(12,3); //report to send Hound
|
2018-04-13 15:20:37 -04:00
|
|
|
m_foxQSO[hc].sent=rpt; //Report to send him
|
2018-04-14 16:55:56 -04:00
|
|
|
m_foxQSO[hc].ncall=0; //Start a new Hound
|
2018-04-13 15:20:37 -04:00
|
|
|
m_foxQSO[hc].nRR73 = 0; //Have not sent RR73
|
2018-05-09 13:18:08 -04:00
|
|
|
m_foxQSO[hc].rcvd = -99; //Have not received R+rpt
|
2018-04-13 15:20:37 -04:00
|
|
|
m_foxQSO[hc].tFoxRrpt = -1; //Have not received R+rpt
|
|
|
|
m_foxQSO[hc].tFoxTxRR73 = -1; //Have not sent RR73
|
|
|
|
rm_tb4(hc); //Remove this Hound from tb4
|
2018-05-09 13:18:08 -04:00
|
|
|
if(list2.size()==m_Nslots) goto list2Done;
|
|
|
|
if(m_foxQSO.count()>=2*m_Nslots) goto list2Done;
|
2018-04-13 15:20:37 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
list2Done:
|
|
|
|
n1=list1.size();
|
|
|
|
n2=list2.size();
|
|
|
|
n3=qMax(n1,n2);
|
2018-04-14 19:05:33 -04:00
|
|
|
if(n3>m_Nslots) n3=m_Nslots;
|
2018-04-13 15:20:37 -04:00
|
|
|
for(int i=0; i<n3; i++) {
|
|
|
|
hc1="";
|
|
|
|
fm="";
|
|
|
|
if(i<n1 and i<n2) {
|
|
|
|
hc1=list1.at(i);
|
|
|
|
hc2=list2.at(i);
|
2018-04-14 16:55:56 -04:00
|
|
|
m_foxQSO[hc2].ncall++;
|
2018-05-09 13:18:08 -04:00
|
|
|
fm = Radio::base_callsign(hc1) + " RR73; " + Radio::base_callsign(hc2) +
|
|
|
|
" <" + m_config.my_callsign() + "> " + m_foxQSO[hc2].sent;
|
2018-04-13 15:20:37 -04:00
|
|
|
}
|
|
|
|
if(i<n1 and i>=n2) {
|
|
|
|
hc1=list1.at(i);
|
2018-05-09 13:18:08 -04:00
|
|
|
fm = Radio::base_callsign(hc1) + " " + m_baseCall + " RR73"; //Standard FT8 message
|
2018-04-13 15:20:37 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
if(hc1!="") {
|
|
|
|
// Log this QSO!
|
2018-11-07 12:49:45 -05:00
|
|
|
auto QSO_time = QDateTime::currentDateTimeUtc ();
|
2018-04-14 19:05:33 -04:00
|
|
|
m_hisCall=hc1;
|
|
|
|
m_hisGrid=m_foxQSO[hc1].grid;
|
|
|
|
m_rptSent=m_foxQSO[hc1].sent;
|
|
|
|
m_rptRcvd=m_foxQSO[hc1].rcvd;
|
2018-11-11 23:44:03 -05:00
|
|
|
if (!m_foxLogWindow) on_fox_log_action_triggered ();
|
2019-05-29 18:35:18 -04:00
|
|
|
if (m_logBook.fox_log ()->add_QSO (QSO_time, m_hisCall, m_hisGrid, m_rptSent, m_rptRcvd, m_lastBand))
|
2018-11-07 12:49:45 -05:00
|
|
|
{
|
|
|
|
writeFoxQSO (QString {" Log: %1 %2 %3 %4 %5"}.arg (m_hisCall).arg (m_hisGrid)
|
|
|
|
.arg (m_rptSent).arg (m_rptRcvd).arg (m_lastBand));
|
2019-02-20 14:40:36 -05:00
|
|
|
on_logQSOButton_clicked ();
|
2018-11-07 12:49:45 -05:00
|
|
|
m_foxRateQueue.enqueue (now); //Add present time in seconds
|
|
|
|
//to Rate queue.
|
|
|
|
}
|
2018-04-14 19:05:33 -04:00
|
|
|
m_loggedByFox[hc1] += (m_lastBand + " ");
|
2018-04-13 15:20:37 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
if(i<n2 and fm=="") {
|
|
|
|
hc2=list2.at(i);
|
2018-04-14 16:55:56 -04:00
|
|
|
m_foxQSO[hc2].ncall++;
|
2018-05-09 13:18:08 -04:00
|
|
|
fm = Radio::base_callsign(hc2) + " " + m_baseCall + " " + m_foxQSO[hc2].sent; //Standard FT8 message
|
2018-04-13 15:20:37 -04:00
|
|
|
}
|
2017-12-21 15:55:38 -05:00
|
|
|
islot++;
|
2018-04-13 15:20:37 -04:00
|
|
|
foxGenWaveform(islot-1,fm); //Generate tx waveform
|
2017-12-21 15:55:38 -05:00
|
|
|
}
|
|
|
|
|
2018-04-14 19:05:33 -04:00
|
|
|
if(islot < m_Nslots) {
|
2018-05-09 13:18:08 -04:00
|
|
|
//At least one slot is still open
|
2018-05-14 14:45:23 -04:00
|
|
|
if(islot==0 or ((m_tFoxTx-m_tFoxTx0>=4) and ui->cbMoreCQs->isChecked())) {
|
|
|
|
//Roughly every 4th Tx sequence, put a CQ message in an otherwise empty slot
|
2018-05-09 13:18:08 -04:00
|
|
|
fm=ui->comboBoxCQ->currentText() + " " + m_config.my_callsign();
|
|
|
|
if(!fm.contains("/")) {
|
|
|
|
fm += " " + m_config.my_grid().mid(0,4);
|
2018-05-14 14:45:23 -04:00
|
|
|
m_tFoxTx0=m_tFoxTx; //Remember when we send a CQ
|
2018-05-09 13:18:08 -04:00
|
|
|
m_fullFoxCallTime=now;
|
|
|
|
}
|
|
|
|
islot++;
|
|
|
|
foxGenWaveform(islot-1,fm);
|
2017-12-22 13:30:35 -05:00
|
|
|
}
|
2017-12-21 15:55:38 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
Transmit:
|
|
|
|
foxcom_.nslots=islot;
|
2017-12-27 16:06:57 -05:00
|
|
|
foxcom_.nfreq=ui->TxFreqSpinBox->value();
|
2018-04-24 20:56:49 -04:00
|
|
|
if(m_config.split_mode()) foxcom_.nfreq = foxcom_.nfreq - m_XIT; //Fox Tx freq
|
2017-12-22 13:00:47 -05:00
|
|
|
QString foxCall=m_config.my_callsign() + " ";
|
2019-07-02 20:51:40 -04:00
|
|
|
::memcpy(foxcom_.mycall, foxCall.toLatin1(),sizeof foxcom_.mycall); //Copy Fox callsign into foxcom_
|
2017-12-21 15:55:38 -05:00
|
|
|
foxgen_();
|
2018-04-13 15:20:37 -04:00
|
|
|
m_tFoxTxSinceCQ++;
|
2017-12-06 16:38:24 -05:00
|
|
|
|
2018-04-13 15:20:37 -04:00
|
|
|
for(QString hc: m_foxQSO.keys()) { //Check for strikeout or timeout
|
2018-04-14 16:55:56 -04:00
|
|
|
if(m_foxQSO[hc].ncall>=m_maxStrikes) m_foxQSO[hc].ncall++;
|
2018-04-13 15:20:37 -04:00
|
|
|
bool b1=((m_tFoxTx - m_foxQSO[hc].tFoxRrpt) > 2*m_maxFoxWait) and
|
|
|
|
(m_foxQSO[hc].tFoxRrpt > 0);
|
|
|
|
bool b2=((m_tFoxTx - m_foxQSO[hc].tFoxTxRR73) > m_maxFoxWait) and
|
|
|
|
(m_foxQSO[hc].tFoxTxRR73>0);
|
2018-04-14 16:55:56 -04:00
|
|
|
bool b3=(m_foxQSO[hc].ncall >= m_maxStrikes+m_maxFoxWait);
|
2018-04-19 09:43:53 -04:00
|
|
|
bool b4=(m_foxQSO[hc].nRR73 >= m_maxStrikes);
|
2018-04-13 15:20:37 -04:00
|
|
|
if(b1 or b2 or b3 or b4) {
|
|
|
|
m_foxQSO.remove(hc);
|
|
|
|
m_foxQSOinProgress.removeOne(hc);
|
2017-12-06 12:05:48 -05:00
|
|
|
}
|
|
|
|
}
|
2018-04-13 15:20:37 -04:00
|
|
|
|
2017-12-22 10:31:09 -05:00
|
|
|
while(!m_foxRateQueue.isEmpty()) {
|
|
|
|
qint64 age = now - m_foxRateQueue.head();
|
|
|
|
if(age < 3600) break;
|
|
|
|
m_foxRateQueue.dequeue();
|
|
|
|
}
|
2018-11-11 23:44:03 -05:00
|
|
|
if (m_foxLogWindow)
|
2018-11-07 12:49:45 -05:00
|
|
|
{
|
|
|
|
m_foxLogWindow->rate (m_foxRateQueue.size ());
|
|
|
|
m_foxLogWindow->queued (m_foxQSOinProgress.count ());
|
|
|
|
}
|
2017-12-04 13:18:03 -05:00
|
|
|
}
|
2017-12-13 12:20:21 -05:00
|
|
|
|
|
|
|
void MainWindow::rm_tb4(QString houndCall)
|
|
|
|
{
|
|
|
|
if(houndCall=="") return;
|
|
|
|
QString t="";
|
|
|
|
QString tb4=ui->textBrowser4->toPlainText();
|
|
|
|
QStringList list=tb4.split("\n");
|
|
|
|
int n=list.size();
|
|
|
|
int j=0;
|
|
|
|
for (int i=0; i<n; i++) {
|
|
|
|
if(j>0) t += "\n";
|
|
|
|
QString line=list.at(i);
|
|
|
|
if(!line.contains(houndCall + " ")) {
|
|
|
|
j++;
|
|
|
|
t += line;
|
|
|
|
}
|
|
|
|
}
|
2018-05-09 13:49:54 -04:00
|
|
|
t.replace("\n\n","\n");
|
2017-12-13 12:20:21 -05:00
|
|
|
ui->textBrowser4->setText(t);
|
|
|
|
}
|
|
|
|
|
|
|
|
void MainWindow::doubleClickOnFoxQueue(Qt::KeyboardModifiers modifiers)
|
|
|
|
{
|
2017-12-19 14:12:59 -05:00
|
|
|
if(modifiers==9999) return; //Silence compiler warning
|
2017-12-13 12:20:21 -05:00
|
|
|
QTextCursor cursor=ui->textBrowser4->textCursor();
|
|
|
|
cursor.setPosition(cursor.selectionStart());
|
2018-05-09 13:49:54 -04:00
|
|
|
QString houndCall=cursor.block().text().mid(0,12).trimmed();
|
2017-12-13 12:20:21 -05:00
|
|
|
rm_tb4(houndCall);
|
2018-03-14 13:46:42 -04:00
|
|
|
writeFoxQSO(" Del: " + houndCall);
|
2017-12-13 12:20:21 -05:00
|
|
|
QQueue<QString> tmpQueue;
|
|
|
|
while(!m_houndQueue.isEmpty()) {
|
|
|
|
QString t=m_houndQueue.dequeue();
|
2018-05-09 13:49:54 -04:00
|
|
|
QString hc=t.mid(0,12).trimmed();
|
2017-12-13 12:20:21 -05:00
|
|
|
if(hc != houndCall) tmpQueue.enqueue(t);
|
|
|
|
}
|
|
|
|
m_houndQueue.swap(tmpQueue);
|
|
|
|
}
|
2017-12-21 15:55:38 -05:00
|
|
|
|
|
|
|
void MainWindow::foxGenWaveform(int i,QString fm)
|
|
|
|
{
|
|
|
|
//Generate and accumulate the Tx waveform
|
|
|
|
fm += " ";
|
|
|
|
fm=fm.mid(0,40);
|
2018-04-13 15:20:37 -04:00
|
|
|
if(fm.mid(0,3)=="CQ ") m_tFoxTxSinceCQ=-1;
|
2017-12-22 13:54:21 -05:00
|
|
|
|
|
|
|
QString txModeArg;
|
2020-05-06 21:56:57 -04:00
|
|
|
txModeArg = txModeArg.asprintf("FT8fox %d",i+1);
|
2017-12-22 13:54:21 -05:00
|
|
|
ui->decodedTextBrowser2->displayTransmittedText(fm.trimmed(), txModeArg,
|
2020-06-20 13:47:32 -04:00
|
|
|
ui->TxFreqSpinBox->value()+60*i,m_bFastMode,m_TRperiod);
|
2017-12-21 15:55:38 -05:00
|
|
|
foxcom_.i3bit[i]=0;
|
|
|
|
if(fm.indexOf("<")>0) foxcom_.i3bit[i]=1;
|
2017-12-21 16:22:03 -05:00
|
|
|
strncpy(&foxcom_.cmsg[i][0],fm.toLatin1(),40); //Copy this message into cmsg[i]
|
2018-02-21 10:48:56 -05:00
|
|
|
if(i==0) m_fm1=fm;
|
2017-12-29 14:35:30 -05:00
|
|
|
QString t;
|
2020-05-06 21:56:57 -04:00
|
|
|
t = t.asprintf(" Tx%d: ",i+1);
|
2017-12-29 14:35:30 -05:00
|
|
|
writeFoxQSO(t + fm.trimmed());
|
2017-12-22 09:51:22 -05:00
|
|
|
}
|
|
|
|
|
2018-11-07 12:49:45 -05:00
|
|
|
void MainWindow::writeFoxQSO(QString const& msg)
|
2017-12-22 09:51:22 -05:00
|
|
|
{
|
2018-03-12 12:45:32 -04:00
|
|
|
QString t;
|
2020-05-06 21:56:57 -04:00
|
|
|
t = t.asprintf("%3d%3d%3d",m_houndQueue.count(),m_foxQSOinProgress.count(),m_foxQSO.count());
|
2017-12-22 09:51:22 -05:00
|
|
|
QFile f {m_config.writeable_data_dir ().absoluteFilePath ("FoxQSO.txt")};
|
|
|
|
if (f.open(QIODevice::WriteOnly | QIODevice::Text | QIODevice::Append)) {
|
|
|
|
QTextStream out(&f);
|
2020-06-13 11:04:41 -04:00
|
|
|
out << QDateTime::currentDateTimeUtc().toString("yyyy-MM-dd hh:mm:ss") << " "
|
|
|
|
#if QT_VERSION >= QT_VERSION_CHECK (5, 15, 0)
|
|
|
|
<< Qt::fixed
|
|
|
|
#else
|
|
|
|
<< fixed
|
|
|
|
#endif
|
|
|
|
<< qSetRealNumberPrecision (3) << (m_freqNominal/1.e6)
|
|
|
|
<< t << msg
|
|
|
|
#if QT_VERSION >= QT_VERSION_CHECK (5, 15, 0)
|
|
|
|
<< Qt::endl
|
|
|
|
#else
|
|
|
|
<< endl
|
|
|
|
#endif
|
|
|
|
;
|
2017-12-22 09:51:22 -05:00
|
|
|
f.close();
|
|
|
|
} else {
|
|
|
|
MessageBox::warning_message (this, tr("File Open Error"),
|
|
|
|
tr("Cannot open \"%1\" for append: %2").arg(f.fileName()).arg(f.errorString()));
|
|
|
|
}
|
2017-12-21 15:55:38 -05:00
|
|
|
}
|
2018-02-20 11:44:11 -05:00
|
|
|
|
2018-04-09 15:30:12 -04:00
|
|
|
/*################################################################################### */
|
2018-02-20 11:44:11 -05:00
|
|
|
void MainWindow::foxTest()
|
|
|
|
{
|
|
|
|
QFile f("steps.txt");
|
|
|
|
if(!f.open(QIODevice::ReadOnly | QIODevice::Text)) return;
|
|
|
|
|
2018-04-11 11:26:43 -04:00
|
|
|
QFile fdiag("diag.txt");
|
|
|
|
if(!fdiag.open(QIODevice::WriteOnly | QIODevice::Text)) return;
|
|
|
|
|
2018-02-20 11:44:11 -05:00
|
|
|
QTextStream s(&f);
|
2018-04-11 11:26:43 -04:00
|
|
|
QTextStream sdiag(&fdiag);
|
2018-02-20 11:44:11 -05:00
|
|
|
QString line;
|
2018-04-09 15:30:12 -04:00
|
|
|
QString t;
|
|
|
|
QString msg;
|
|
|
|
QString hc1;
|
|
|
|
QString rptRcvd;
|
|
|
|
qint32 n=0;
|
|
|
|
|
2018-02-20 11:44:11 -05:00
|
|
|
while(!s.atEnd()) {
|
|
|
|
line=s.readLine();
|
2018-04-13 15:20:37 -04:00
|
|
|
if(line.length()==0) continue;
|
2018-04-11 08:57:43 -04:00
|
|
|
if(line.mid(0,4).toInt()==0) line=" " + line;
|
2018-04-09 15:30:12 -04:00
|
|
|
if(line.contains("NSlots")) {
|
|
|
|
n=line.mid(44,1).toInt();
|
|
|
|
ui->sbNslots->setValue(n);
|
|
|
|
}
|
|
|
|
if(line.contains("Sel:")) {
|
|
|
|
t=line.mid(43,6) + " " + line.mid(54,4) + " " + line.mid(50,3);
|
|
|
|
selectHound(t);
|
|
|
|
}
|
|
|
|
|
|
|
|
if(line.contains("Del:")) {
|
|
|
|
int i0=line.indexOf("Del:");
|
|
|
|
hc1=line.mid(i0+6);
|
|
|
|
int i1=hc1.indexOf(" ");
|
|
|
|
hc1=hc1.mid(0,i1);
|
|
|
|
rm_tb4(hc1);
|
|
|
|
writeFoxQSO(" Del: " + hc1);
|
|
|
|
QQueue<QString> tmpQueue;
|
|
|
|
while(!m_houndQueue.isEmpty()) {
|
|
|
|
t=m_houndQueue.dequeue();
|
|
|
|
QString hc=t.mid(0,6).trimmed();
|
|
|
|
if(hc != hc1) tmpQueue.enqueue(t);
|
|
|
|
}
|
|
|
|
m_houndQueue.swap(tmpQueue);
|
|
|
|
}
|
|
|
|
if(line.contains("Rx:")) {
|
|
|
|
msg=line.mid(43);
|
|
|
|
t=msg.mid(24);
|
|
|
|
int i0=t.indexOf(" ");
|
|
|
|
hc1=t.mid(i0+1);
|
|
|
|
int i1=hc1.indexOf(" ");
|
|
|
|
hc1=hc1.mid(0,i1);
|
|
|
|
int i2=qMax(msg.indexOf("R+"),msg.indexOf("R-"));
|
2018-04-13 15:20:37 -04:00
|
|
|
if(i2>20) {
|
|
|
|
rptRcvd=msg.mid(i2,4);
|
|
|
|
foxRxSequencer(msg,hc1,rptRcvd);
|
|
|
|
}
|
2018-03-09 16:48:21 -05:00
|
|
|
}
|
2018-04-13 16:22:29 -04:00
|
|
|
if(line.contains("Tx1:")) {
|
|
|
|
foxTxSequencer();
|
|
|
|
} else {
|
2020-05-06 21:56:57 -04:00
|
|
|
t = t.asprintf("%3d %3d %3d %3d %5d ",m_houndQueue.count(),
|
2018-04-13 16:22:29 -04:00
|
|
|
m_foxQSOinProgress.count(),m_foxQSO.count(),
|
|
|
|
m_loggedByFox.count(),m_tFoxTx);
|
|
|
|
sdiag << t << line.mid(37).trimmed() << "\n";
|
|
|
|
}
|
2018-02-20 11:44:11 -05:00
|
|
|
}
|
|
|
|
}
|
2019-01-03 12:15:48 -05:00
|
|
|
|
|
|
|
void MainWindow::write_all(QString txRx, QString message)
|
|
|
|
{
|
|
|
|
QString line;
|
|
|
|
QString t;
|
2019-04-26 21:06:32 -04:00
|
|
|
QString msg;
|
|
|
|
QString mode_string;
|
|
|
|
|
2020-10-21 08:09:10 -04:00
|
|
|
if (message.size () > 5 && message[4]==' ') {
|
2019-04-26 21:06:32 -04:00
|
|
|
msg=message.mid(4,-1);
|
|
|
|
} else {
|
|
|
|
msg=message.mid(6,-1);
|
|
|
|
}
|
|
|
|
|
2020-10-21 08:09:10 -04:00
|
|
|
if (message.size () > 19 && message[19]=='#') {
|
2019-04-26 21:06:32 -04:00
|
|
|
mode_string="JT65 ";
|
2020-10-21 08:09:10 -04:00
|
|
|
} else if (message.size () > 19 && message[19]=='@') {
|
2019-04-26 21:06:32 -04:00
|
|
|
mode_string="JT9 ";
|
|
|
|
} else {
|
|
|
|
mode_string=m_mode.leftJustified(6,' ');
|
|
|
|
}
|
|
|
|
|
2019-01-03 12:15:48 -05:00
|
|
|
msg=msg.mid(0,15) + msg.mid(18,-1);
|
|
|
|
|
2020-05-06 21:56:57 -04:00
|
|
|
t = t.asprintf("%5d",ui->TxFreqSpinBox->value());
|
2019-04-26 21:06:32 -04:00
|
|
|
if (txRx=="Tx") msg=" 0 0.0" + t + " " + message;
|
2019-01-03 12:15:48 -05:00
|
|
|
auto time = QDateTime::currentDateTimeUtc ();
|
2020-09-21 14:35:16 -04:00
|
|
|
if( txRx=="Rx" ) time=m_dateTimeSeqStart;
|
|
|
|
|
2020-05-06 21:56:57 -04:00
|
|
|
t = t.asprintf("%10.3f ",m_freqNominal/1.e6);
|
2019-04-26 21:06:32 -04:00
|
|
|
if (m_diskData) {
|
|
|
|
if (m_fileDateTime.size()==11) {
|
|
|
|
line=m_fileDateTime + " " + t + txRx + " " + mode_string + msg;
|
|
|
|
} else {
|
|
|
|
line=m_fileDateTime + t + txRx + " " + mode_string + msg;
|
|
|
|
}
|
2019-01-03 12:15:48 -05:00
|
|
|
} else {
|
2019-04-26 21:06:32 -04:00
|
|
|
line=time.toString("yyMMdd_hhmmss") + t + txRx + " " + mode_string + msg;
|
2019-01-03 12:15:48 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
QString file_name="ALL.TXT";
|
2019-04-26 21:06:32 -04:00
|
|
|
if (m_mode=="WSPR") file_name="ALL_WSPR.TXT";
|
2019-01-03 12:15:48 -05:00
|
|
|
QFile f{m_config.writeable_data_dir().absoluteFilePath(file_name)};
|
2019-04-26 21:06:32 -04:00
|
|
|
if (f.open(QIODevice::WriteOnly | QIODevice::Text | QIODevice::Append)) {
|
2019-01-03 12:15:48 -05:00
|
|
|
QTextStream out(&f);
|
2020-06-21 13:49:37 -04:00
|
|
|
out << line.trimmed()
|
2020-06-13 11:04:41 -04:00
|
|
|
#if QT_VERSION >= QT_VERSION_CHECK (5, 15, 0)
|
|
|
|
<< Qt::endl
|
|
|
|
#else
|
|
|
|
<< endl
|
|
|
|
#endif
|
|
|
|
;
|
2019-01-03 12:15:48 -05:00
|
|
|
f.close();
|
|
|
|
} else {
|
|
|
|
auto const& message2 = tr ("Cannot open \"%1\" for append: %2")
|
|
|
|
.arg (f.fileName ()).arg (f.errorString ());
|
|
|
|
QTimer::singleShot (0, [=] { // don't block guiUpdate
|
|
|
|
MessageBox::warning_message(this, tr ("Log File Error"), message2); });
|
|
|
|
}
|
|
|
|
}
|
2019-01-18 11:51:15 -05:00
|
|
|
|
2019-03-14 12:03:07 -04:00
|
|
|
void MainWindow::chkFT4()
|
|
|
|
{
|
|
|
|
if(m_mode!="FT4") return;
|
2019-04-23 14:16:55 -04:00
|
|
|
ui->cbAutoSeq->setEnabled(true);
|
|
|
|
ui->cbFirst->setVisible(true);
|
|
|
|
ui->cbFirst->setEnabled(true);
|
|
|
|
ui->labDXped->setVisible(m_config.special_op_id()!=SpecOp::NONE);
|
2019-03-14 12:03:07 -04:00
|
|
|
ui->cbFirst->setVisible(ui->cbAutoSeq->isChecked());
|
|
|
|
|
|
|
|
if (SpecOp::NONE < m_config.special_op_id () && SpecOp::FOX > m_config.special_op_id ()) {
|
|
|
|
QString t0="";
|
|
|
|
if(SpecOp::NA_VHF==m_config.special_op_id()) t0+="NA VHF";
|
|
|
|
if(SpecOp::EU_VHF==m_config.special_op_id()) t0+="EU VHF";
|
|
|
|
if(SpecOp::FIELD_DAY==m_config.special_op_id()) t0+="Field Day";
|
|
|
|
if(SpecOp::RTTY==m_config.special_op_id()) t0+="RTTY";
|
2020-01-24 12:26:36 -05:00
|
|
|
if(SpecOp::WW_DIGI==m_config.special_op_id()) t0+="WW_DIGI";
|
2019-03-14 12:03:07 -04:00
|
|
|
if(t0=="") {
|
|
|
|
ui->labDXped->setVisible(false);
|
|
|
|
} else {
|
|
|
|
ui->labDXped->setVisible(true);
|
|
|
|
ui->labDXped->setText(t0);
|
|
|
|
}
|
|
|
|
on_contest_log_action_triggered();
|
|
|
|
}
|
2020-05-02 11:54:20 -04:00
|
|
|
if (SpecOp::HOUND == m_config.special_op_id() or SpecOp::FOX == m_config.special_op_id()) {
|
|
|
|
ui->labDXped->setVisible(false);
|
|
|
|
}
|
|
|
|
|
2019-03-14 12:03:07 -04:00
|
|
|
}
|
2019-04-08 12:36:05 -04:00
|
|
|
|
|
|
|
void MainWindow::on_pbBestSP_clicked()
|
|
|
|
{
|
2019-04-09 08:48:13 -04:00
|
|
|
m_bBestSPArmed = !m_bBestSPArmed;
|
2019-04-09 20:12:48 -04:00
|
|
|
if(m_bBestSPArmed and !m_transmitting) ui->pbBestSP->setStyleSheet ("QPushButton{color:red}");
|
|
|
|
if(!m_bBestSPArmed) ui->pbBestSP->setStyleSheet ("");
|
2019-04-16 13:21:45 -04:00
|
|
|
if(m_bBestSPArmed) m_dateTimeBestSP=QDateTime::currentDateTimeUtc();
|
2019-04-08 12:36:05 -04:00
|
|
|
}
|
2019-06-25 09:35:58 -04:00
|
|
|
|
|
|
|
void MainWindow::set_mode (QString const& mode)
|
|
|
|
{
|
|
|
|
if ("FT4" == mode) on_actionFT4_triggered ();
|
2020-07-23 13:51:05 -04:00
|
|
|
else if ("FST4" == mode) on_actionFST4_triggered ();
|
|
|
|
else if ("FST4W" == mode) on_actionFST4W_triggered ();
|
2019-06-25 09:35:58 -04:00
|
|
|
else if ("FT8" == mode) on_actionFT8_triggered ();
|
|
|
|
else if ("JT4" == mode) on_actionJT4_triggered ();
|
|
|
|
else if ("JT9" == mode) on_actionJT9_triggered ();
|
|
|
|
else if ("JT9+JT65" == mode) on_actionJT9_JT65_triggered ();
|
|
|
|
else if ("JT65" == mode) on_actionJT65_triggered ();
|
|
|
|
else if ("QRA64" == mode) on_actionQRA64_triggered ();
|
|
|
|
else if ("FreqCal" == mode) on_actionFreqCal_triggered ();
|
|
|
|
else if ("ISCAT" == mode) on_actionISCAT_triggered ();
|
|
|
|
else if ("MSK144" == mode) on_actionMSK144_triggered ();
|
|
|
|
else if ("WSPR" == mode) on_actionWSPR_triggered ();
|
|
|
|
else if ("Echo" == mode) on_actionEcho_triggered ();
|
|
|
|
}
|
|
|
|
|
|
|
|
void MainWindow::remote_configure (QString const& mode, quint32 frequency_tolerance
|
|
|
|
, QString const& submode, bool fast_mode, quint32 tr_period, quint32 rx_df
|
|
|
|
, QString const& dx_call, QString const& dx_grid, bool generate_messages)
|
|
|
|
{
|
|
|
|
if (mode.size ())
|
|
|
|
{
|
|
|
|
set_mode (mode);
|
|
|
|
}
|
2020-10-13 11:46:38 -04:00
|
|
|
auto is_FST4W = "FST4W" == m_mode;
|
|
|
|
if (frequency_tolerance != quint32_max && (ui->sbFtol->isVisible () || is_FST4W))
|
2019-06-25 09:35:58 -04:00
|
|
|
{
|
2020-10-13 11:46:38 -04:00
|
|
|
m_block_udp_status_updates = true;
|
|
|
|
if (is_FST4W)
|
|
|
|
{
|
|
|
|
ui->sbFST4W_FTol->setValue (frequency_tolerance);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
ui->sbFtol->setValue (frequency_tolerance);
|
|
|
|
}
|
|
|
|
m_block_udp_status_updates = false;
|
2019-06-25 09:35:58 -04:00
|
|
|
}
|
|
|
|
if (submode.size () && ui->sbSubmode->isVisible ())
|
|
|
|
{
|
|
|
|
ui->sbSubmode->setValue (submode.toUpper ().at (0).toLatin1 () - 'A');
|
|
|
|
}
|
|
|
|
if (ui->cbFast9->isVisible () && ui->cbFast9->isChecked () != fast_mode)
|
|
|
|
{
|
|
|
|
ui->cbFast9->click ();
|
|
|
|
}
|
|
|
|
if (tr_period != quint32_max && ui->sbTR->isVisible ())
|
|
|
|
{
|
2020-10-13 11:46:38 -04:00
|
|
|
if (is_FST4W)
|
|
|
|
{
|
|
|
|
ui->sbTR_FST4W->setValue (tr_period);
|
|
|
|
ui->sbTR_FST4W->interpretText ();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
ui->sbTR->setValue (tr_period);
|
|
|
|
ui->sbTR->interpretText ();
|
|
|
|
}
|
2019-06-25 09:35:58 -04:00
|
|
|
}
|
|
|
|
if (rx_df != quint32_max && ui->RxFreqSpinBox->isVisible ())
|
|
|
|
{
|
|
|
|
m_block_udp_status_updates = true;
|
2020-10-13 11:46:38 -04:00
|
|
|
if (is_FST4W)
|
|
|
|
{
|
|
|
|
ui->sbFST4W_RxFreq->setValue (rx_df);
|
|
|
|
ui->sbFST4W_RxFreq->interpretText ();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
ui->RxFreqSpinBox->setValue (rx_df);
|
|
|
|
ui->RxFreqSpinBox->interpretText ();
|
|
|
|
}
|
2019-06-25 09:35:58 -04:00
|
|
|
m_block_udp_status_updates = false;
|
|
|
|
}
|
|
|
|
if (dx_call.size () && ui->dxCallEntry->isVisible ())
|
|
|
|
{
|
|
|
|
ui->dxCallEntry->setText (dx_call);
|
|
|
|
}
|
|
|
|
if (dx_grid.size () && ui->dxGridEntry->isVisible ())
|
|
|
|
{
|
|
|
|
ui->dxGridEntry->setText (dx_grid);
|
|
|
|
}
|
|
|
|
if (generate_messages && ui->genStdMsgsPushButton->isVisible ())
|
|
|
|
{
|
|
|
|
ui->genStdMsgsPushButton->click ();
|
|
|
|
}
|
|
|
|
if (m_config.udpWindowToFront ())
|
|
|
|
{
|
|
|
|
show ();
|
|
|
|
raise ();
|
|
|
|
activateWindow ();
|
|
|
|
}
|
|
|
|
if (m_config.udpWindowRestore () && isMinimized ())
|
|
|
|
{
|
|
|
|
showNormal ();
|
|
|
|
raise ();
|
|
|
|
}
|
|
|
|
tx_watchdog (false);
|
|
|
|
QApplication::alert (this);
|
|
|
|
}
|
2020-07-01 12:01:47 -04:00
|
|
|
|
|
|
|
QString MainWindow::WSPR_message()
|
|
|
|
{
|
|
|
|
QString sdBm,msg0,msg1,msg2;
|
|
|
|
sdBm = sdBm.asprintf(" %d",m_dBm);
|
|
|
|
m_tx=1-m_tx;
|
|
|
|
int i2=m_config.my_callsign().indexOf("/");
|
|
|
|
if(i2>0
|
|
|
|
|| (6 == m_config.my_grid ().size ()
|
|
|
|
&& !ui->WSPR_prefer_type_1_check_box->isChecked ())) {
|
|
|
|
if(i2<0) { // "Type 2" WSPR message
|
|
|
|
msg1=m_config.my_callsign() + " " + m_config.my_grid().mid(0,4) + sdBm;
|
|
|
|
} else {
|
|
|
|
msg1=m_config.my_callsign() + sdBm;
|
|
|
|
}
|
2020-07-02 14:57:46 -04:00
|
|
|
msg0="<" + m_config.my_callsign() + "> " + m_config.my_grid();
|
|
|
|
if(m_mode=="WSPR") msg0 += sdBm;
|
2020-07-01 12:01:47 -04:00
|
|
|
if(m_tx==0) msg2=msg0;
|
|
|
|
if(m_tx==1) msg2=msg1;
|
|
|
|
} else {
|
|
|
|
msg2=m_config.my_callsign() + " " + m_config.my_grid().mid(0,4) + sdBm; // Normal WSPR message
|
|
|
|
}
|
|
|
|
return msg2;
|
|
|
|
}
|