Merge branch 'feat-fst280' of bitbucket.org:k1jt/wsjtx into feat-fst280

This commit is contained in:
Joe Taylor 2021-01-28 07:43:14 -05:00
commit 48713f0f38
11 changed files with 594 additions and 511 deletions

View File

@ -184,13 +184,13 @@ void SoundInput::reset (bool report_dropped_frames)
{
LOG_WARN ("Detected dropped audio source samples: "
<< m_stream->format ().framesForDuration (lost_usec)
<< " (" << std::setprecision (4) << lost_usec / 1.e6 << " S)")
<< " (" << std::setprecision (4) << lost_usec / 1.e6 << " S)");
}
else if (std::abs (lost_usec) > 5 * 48000)
{
LOG_ERROR ("Detected excessive dropped audio source samples: "
<< m_stream->format ().framesForDuration (lost_usec)
<< " (" << std::setprecision (4) << lost_usec / 1.e6 << " S)")
<< " (" << std::setprecision (4) << lost_usec / 1.e6 << " S)");
}
}
cummulative_lost_usec_ = elapsed_usecs - m_stream->processedUSecs ();

View File

@ -1587,6 +1587,7 @@ install (FILES
install (FILES
cty.dat
cty.dat_copyright.txt
contrib/Ephemeris/JPLEPH
DESTINATION ${CMAKE_INSTALL_DATADIR}/${CMAKE_PROJECT_NAME}
#COMPONENT runtime
@ -1668,7 +1669,7 @@ endif (NOT WIN32 AND NOT APPLE)
#
# bundle fixup only done in Release or MinSizeRel configurations
# bundle fixup only done in non-Debug configurations
#
if (NOT is_debug_build)
@ -1715,7 +1716,7 @@ if (NOT is_debug_build)
${QT_PLUGINS_DIR}/imageformats
${QT_PLUGINS_DIR}/styles
DESTINATION ${WSJT_PLUGIN_DESTINATION}
CONFIGURATIONS Release MinSizeRel
CONFIGURATIONS Release MinSizeRel RelWithDebInfo
#COMPONENT runtime
FILES_MATCHING PATTERN "*${CMAKE_SHARED_LIBRARY_SUFFIX}"
PATTERN "*minimal*${CMAKE_SHARED_LIBRARY_SUFFIX}" EXCLUDE
@ -1729,7 +1730,7 @@ if (NOT is_debug_build)
FILES
${QT_PLUGINS_DIR}/sqldrivers/libqsqlite${CMAKE_SHARED_LIBRARY_SUFFIX}
DESTINATION ${WSJT_PLUGIN_DESTINATION}/sqldrivers
CONFIGURATIONS Release MinSizeRel
CONFIGURATIONS Release MinSizeRel RelWithDebInfo
#COMPONENT runtime
)
# install (
@ -1773,7 +1774,7 @@ if (NOT is_debug_build)
${QT_PLUGINS_DIR}/audio
${QT_PLUGINS_DIR}/imageformats
DESTINATION ${WSJT_PLUGIN_DESTINATION}
CONFIGURATIONS Release MinSizeRel
CONFIGURATIONS Release MinSizeRel RelWithDebInfo
#COMPONENT runtime
FILES_MATCHING PATTERN "*${CMAKE_SHARED_LIBRARY_SUFFIX}"
PATTERN "*minimal*${CMAKE_SHARED_LIBRARY_SUFFIX}" EXCLUDE
@ -1785,7 +1786,7 @@ if (NOT is_debug_build)
FILES
${QT_PLUGINS_DIR}/sqldrivers/qsqlite${CMAKE_SHARED_LIBRARY_SUFFIX}
DESTINATION ${WSJT_PLUGIN_DESTINATION}/sqldrivers
CONFIGURATIONS Release MinSizeRel
CONFIGURATIONS Release MinSizeRel RelWithDebInfo
#COMPONENT runtime
)
# install (

View File

@ -32,13 +32,12 @@ public:
catch (std::exception const& e)
{
LOG_FATAL (e.what ());
throw;
}
catch (...)
{
LOG_FATAL ("Unexpected fatal error");
throw;
}
return false;
}
};

View File

@ -35,16 +35,16 @@ namespace Logger
BOOST_LOG_SEV (LOGGER, boost::log::trivial::LEVEL) \
<< boost::log::add_value ("Line", __LINE__) \
<< boost::log::add_value ("File", __FILE__) \
<< boost::log::add_value ("Function", __FUNCTION__) << ARG;
<< boost::log::add_value ("Function", __FUNCTION__) << ARG
/// System Log macros.
/// TRACE < DEBUG < INFO < WARN < ERROR < FATAL
#define LOG_TRACE(ARG) LOG_LOG_LOCATION (sys::get(), trace, ARG);
#define LOG_DEBUG(ARG) LOG_LOG_LOCATION (sys::get(), debug, ARG);
#define LOG_INFO(ARG) LOG_LOG_LOCATION (sys::get(), info, ARG);
#define LOG_WARN(ARG) LOG_LOG_LOCATION (sys::get(), warning, ARG);
#define LOG_ERROR(ARG) LOG_LOG_LOCATION (sys::get(), error, ARG);
#define LOG_FATAL(ARG) LOG_LOG_LOCATION (sys::get(), fatal, ARG);
#define LOG_TRACE(ARG) LOG_LOG_LOCATION (sys::get(), trace, ARG)
#define LOG_DEBUG(ARG) LOG_LOG_LOCATION (sys::get(), debug, ARG)
#define LOG_INFO(ARG) LOG_LOG_LOCATION (sys::get(), info, ARG)
#define LOG_WARN(ARG) LOG_LOG_LOCATION (sys::get(), warning, ARG)
#define LOG_ERROR(ARG) LOG_LOG_LOCATION (sys::get(), error, ARG)
#define LOG_FATAL(ARG) LOG_LOG_LOCATION (sys::get(), fatal, ARG)
/// Data Log macros. Does not include LINE, FILE, FUNCTION.
/// TRACE < DEBUG < INFO < WARN < ERROR < FATAL

16
NEWS
View File

@ -13,6 +13,22 @@
Copyright 2001 - 2021 by Joe Taylor, K1JT.
Release: WSJT-X 2.3.0-rc4
Jan 26, 2021
-------------------------
WSJT-X 2.3.0 Release Candidate 4 is a stop-gap release while some
recent important Hamlib changes are being verified. Also included are
the following regression and defect repairs.
- The wsprd command line tool uses the current working directory for
the data file directory if it is not specified.
- Updates to the language translations of the WSJT-X user Interface.
- Updated CTY.DAT file.
Release: WSJT-X 2.3.0-rc3
Jan 6, 2021
-------------------------

View File

@ -22,6 +22,7 @@
#include <QRandomGenerator>
#endif
#include "Logger.hpp"
#include "Configuration.hpp"
#include "pimpl_impl.hpp"
@ -46,9 +47,12 @@ class PSKReporter::impl final
{
Q_OBJECT
using logger_type = boost::log::sources::severity_channel_logger_mt<boost::log::trivial::severity_level>;
public:
impl (PSKReporter * self, Configuration const * config, QString const& program_info)
: self_ {self}
: logger_ {boost::log::keywords::channel = "PSKRPRT"}
, self_ {self}
, config_ {config}
, sequence_number_ {0u}
, send_descriptors_ {0}
@ -72,6 +76,7 @@ public:
if (socket_
&& QAbstractSocket::UdpSocket == socket_->socketType ())
{
LOG_LOG_LOCATION (logger_, trace, "enable descriptor resend");
// send templates again
send_descriptors_ = 3; // three times
// send receiver data set again
@ -91,6 +96,7 @@ public:
&& QAbstractSocket::UnconnectedState != socket_->state ()
&& QAbstractSocket::ClosingState != socket_->state ())
{
LOG_LOG_LOCATION (logger_, trace, "create/recreate socket");
// handle re-opening asynchronously
auto connection = QSharedPointer<QMetaObject::Connection>::create ();
*connection = connect (socket_.data (), &QAbstractSocket::disconnected, [this, connection] () {
@ -110,6 +116,7 @@ public:
void handle_socket_error (QAbstractSocket::SocketError e)
{
LOG_LOG_LOCATION (logger_, trace, "err: " << e);
switch (e)
{
case QAbstractSocket::RemoteHostClosedError:
@ -132,12 +139,14 @@ public:
// be called from the disconnected handler above.
if (config_->psk_reporter_tcpip ())
{
LOG_LOG_LOCATION (logger_, trace, "create TCP/IP socket");
socket_.reset (new QTcpSocket, &QObject::deleteLater);
send_descriptors_ = 1;
send_receiver_data_ = 1;
}
else
{
LOG_LOG_LOCATION (logger_, trace, "create UDP/IP socket");
socket_.reset (new QUdpSocket, &QObject::deleteLater);
send_descriptors_ = 3;
send_receiver_data_ = 3;
@ -154,6 +163,7 @@ public:
// use this for pseudo connection with UDP, allows us to use
// QIODevice::write() instead of QUDPSocket::writeDatagram()
socket_->connectToHost (HOST, SERVICE_PORT, QAbstractSocket::WriteOnly);
LOG_LOG_LOCATION (logger_, debug, "remote host: " << HOST << " port: " << SERVICE_PORT);
if (!report_timer_.isActive ())
{
@ -169,6 +179,7 @@ public:
{
if (socket_)
{
LOG_LOG_LOCATION (logger_, trace, "disconnecting");
socket_->disconnectFromHost ();
}
descriptor_timer_.stop ();
@ -180,9 +191,12 @@ public:
bool flushing ()
{
return FLUSH_INTERVAL && !(++flush_counter_ % FLUSH_INTERVAL);
bool flush = FLUSH_INTERVAL && !(++flush_counter_ % FLUSH_INTERVAL);
LOG_LOG_LOCATION (logger_, trace, "flush: " << flush);
return flush;
}
logger_type mutable logger_;
PSKReporter * self_;
Configuration const * config_;
QSharedPointer<QAbstractSocket> socket_;
@ -267,6 +281,7 @@ void PSKReporter::impl::build_preamble (QDataStream& message)
<< quint32 (0u) // Export Time (place-holder filled in later)
<< ++sequence_number_ // Sequence Number
<< observation_id_; // Observation Domain ID
LOG_LOG_LOCATION (logger_, trace, "#: " << sequence_number_);
if (send_descriptors_)
{
@ -329,6 +344,7 @@ void PSKReporter::impl::build_preamble (QDataStream& message)
// insert Length
set_length (out, descriptor);
message.writeRawData (descriptor.constData (), descriptor.size ());
LOG_LOG_LOCATION (logger_, debug, "sent descriptors");
}
}
@ -354,11 +370,13 @@ void PSKReporter::impl::build_preamble (QDataStream& message)
// insert Length and move to payload
set_length (out, data);
message.writeRawData (data.constData (), data.size ());
LOG_LOG_LOCATION (logger_, debug, "sent local information");
}
}
void PSKReporter::impl::send_report (bool send_residue)
{
LOG_LOG_LOCATION (logger_, trace, "sending residue: " << send_residue);
if (QAbstractSocket::ConnectedState != socket_->state ()) return;
QDataStream message {&payload_, QIODevice::WriteOnly | QIODevice::Append};
@ -391,9 +409,11 @@ void PSKReporter::impl::send_report (bool send_residue)
if (tx_residue_.size ())
{
tx_out.writeRawData (tx_residue_.constData (), tx_residue_.size ());
LOG_LOG_LOCATION (logger_, debug, "sent residue");
tx_residue_.clear ();
}
LOG_LOG_LOCATION (logger_, debug, "pending spots: " << spots_.size ());
while (spots_.size () || flush)
{
auto tx_data_size = tx_data_.size ();
@ -452,6 +472,7 @@ void PSKReporter::impl::send_report (bool send_residue)
// Send data to PSK Reporter site
socket_->write (payload_); // TODO: handle errors
LOG_LOG_LOCATION (logger_, debug, "sent spots");
flush = false; // break loop
message.device ()->seek (0u);
payload_.clear (); // Fresh message
@ -462,29 +483,35 @@ void PSKReporter::impl::send_report (bool send_residue)
break;
}
}
LOG_LOG_LOCATION (logger_, debug, "remaining spots: " << spots_.size ());
}
}
PSKReporter::PSKReporter (Configuration const * config, QString const& program_info)
: m_ {this, config, program_info}
{
LOG_LOG_LOCATION (m_->logger_, trace, "Started for: " << program_info);
}
PSKReporter::~PSKReporter ()
{
// m_->send_report (true); // send any pending spots
LOG_LOG_LOCATION (m_->logger_, trace, "Ended");
}
void PSKReporter::reconnect ()
{
LOG_LOG_LOCATION (m_->logger_, trace, "");
m_->reconnect ();
}
void PSKReporter::setLocalStation (QString const& call, QString const& gridSquare, QString const& antenna)
{
LOG_LOG_LOCATION (m_->logger_, trace, "call: " << call << " grid: " << gridSquare << " ant: " << antenna);
m_->check_connection ();
if (call != m_->rx_call_ || gridSquare != m_->rx_grid_ || antenna != m_->rx_ant_)
{
LOG_LOG_LOCATION (m_->logger_, trace, "updating information");
m_->send_receiver_data_ = m_->socket_
&& QAbstractSocket::UdpSocket == m_->socket_->socketType () ? 3 : 1;
m_->rx_call_ = call;
@ -496,6 +523,7 @@ void PSKReporter::setLocalStation (QString const& call, QString const& gridSquar
bool PSKReporter::addRemoteStation (QString const& call, QString const& grid, Radio::Frequency freq
, QString const& mode, int snr)
{
LOG_LOG_LOCATION (m_->logger_, trace, "call: " << call << " grid: " << grid << " freq: " << freq << " mode: " << mode << " snr: " << snr);
m_->check_connection ();
if (m_->socket_ && m_->socket_->isValid ())
{
@ -511,6 +539,7 @@ bool PSKReporter::addRemoteStation (QString const& call, QString const& grid, Ra
void PSKReporter::sendReport (bool last)
{
LOG_LOG_LOCATION (m_->logger_, trace, "last: " << last);
m_->check_connection ();
if (m_->socket_ && QAbstractSocket::ConnectedState == m_->socket_->state ())
{

View File

@ -13,6 +13,22 @@
Copyright 2001 - 2021 by Joe Taylor, K1JT.
Release: WSJT-X 2.3.0-rc4
Jan 26, 2021
-------------------------
WSJT-X 2.3.0 Release Candidate 4 is a stop-gap release while some
recent important Hamlib changes are being verified. Also included are
the following regression and defect repairs.
- The wsprd command line tool uses the current working directory for
the data file directory if it is not specified.
- Updates to the language translations of the WSJT-X user Interface.
- Updated CTY.DAT file.
Release: WSJT-X 2.3.0-rc3
Jan 6, 2021
-------------------------

982
cty.dat

File diff suppressed because it is too large Load Diff

21
cty.dat_copyright.txt Normal file
View File

@ -0,0 +1,21 @@
Copyright © 1994-
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
“Software”), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Proudly powered by WordPress

View File

@ -107,7 +107,6 @@ subroutine four2a(a,nfft,ndim,isign,iform)
!$omp end critical(fftw)
end if
enddo
call fftwf_cleanup()
nplan=0
!$omp end critical(four2a)

View File

@ -3379,9 +3379,7 @@ void MainWindow::readFromStdout() //readFromStdout
int n0=n2/1000;
int n1=n2%1000;
if(m_mode=="Q65") {
QString t;
t.sprintf("%d %d",n0,n1);
ndecodes_label.setText(t);
ndecodes_label.setText(QString {"%1 %2"}.arg (n0).arg (n1));
} else {
if(m_nDecodes==0) ndecodes_label.setText("0");
}