Merge branch 'develop' of bitbucket.org:k1jt/wsjtx into develop

This commit is contained in:
Joe Taylor 2024-09-26 09:16:41 -04:00
commit 999caa9e99
3 changed files with 18 additions and 5 deletions

View File

@ -11,7 +11,9 @@ FoxVerifier::FoxVerifier(QString user_agent, QNetworkAccessManager *manager,QStr
ts_ = timestamp;
hz_ = hz;
QString url = QString("%1/check/%2/%3/%4.text").arg(base_url).arg(callsign).arg(timestamp.toString(Qt::ISODate)).arg(code);
// make sure we URLencode the callsign, for things like E51D/MM
QString encodedCall = QString::fromUtf8(QUrl::toPercentEncoding(callsign));
QString url = QString("%1/check/").arg(base_url) + encodedCall + QString("/%1/%2.text").arg(timestamp.toString(Qt::ISODate)).arg(code);
LOG_INFO(QString("FoxVerifier: url %1").arg(url).toStdString());
q_url_ = QUrl(url);
if (manager_ == nullptr) {
@ -58,11 +60,13 @@ bool FoxVerifier::finished() {
void FoxVerifier::errorOccurred(QNetworkReply::NetworkError code)
{
int status = reply_->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt();
QString reason = reply_->attribute(QNetworkRequest::HttpReasonPhraseAttribute).toString();
errored_ = true;
error_reason_ = reply_->errorString();
if (reply_->error() != QNetworkReply::NoError) {
LOG_INFO(QString("FoxVerifier: errorOccurred status %1 error [%2] isFinished %3 isrunning %4 code %5").arg(status).arg(
error_reason_).arg(reply_->isFinished()).arg(reply_->isRunning()).arg(code).toStdString());
LOG_INFO(QString("FoxVerifier: errorOccurred status %1 error [%2][%3] isFinished %4 isrunning %5 code %6").arg(status).arg(
reason).arg(error_reason_).arg(reply_->isFinished()).arg(reply_->isRunning()).arg(code).toStdString());
return;
}
// TODO emit

View File

@ -36,7 +36,7 @@ subroutine sfrx_sub(nyymmdd,nutc,nfqso,ntol,iwave)
call sfox_ana(dd,npts,c0,npts)
! call sfox_remove_tone(c0,fsync) ! Needs testing
call sfox_remove_tone(c0,fsync) ! Needs testing
ndepth=3
dth=0.5

View File

@ -227,6 +227,7 @@ bool keep_frequency = false;
int m_Nslots0 {1};
int m_TxFreqFox {300};
bool filtered = false;
QString m_hisCall0 = "";
QSharedMemory mem_qmap("mem_qmap"); //Memory segment to be shared (optionally) with QMAP
struct {
@ -2671,8 +2672,10 @@ void MainWindow::statusChanged()
if (SpecOp::FOX==m_specOp) {
ui->pbFreeText->setVisible(true);
ui->cbSendMsg->setVisible(true);
ui->txb6->click();
if (m_config.superFox()) {
ui->sbNslots->setVisible(true);
m_XIT=0;
if(ui->cbSendMsg->isChecked()) {
ui->sbNslots->setValue(2);
m_Nslots=2;
@ -5856,6 +5859,7 @@ void MainWindow::doubleClickOnCall(Qt::KeyboardModifiers modifiers)
return;
}
m_bDoubleClicked = true;
m_hisCall0 = m_hisCall;
processMessage (message, modifiers);
}
@ -6477,6 +6481,7 @@ void MainWindow::genStdMsgs(QString rpt, bool unconditional)
m_gen_message_is_cq = false;
return;
}
m_hisCall0 = hisCall;
auto const& my_callsign = m_config.my_callsign ();
auto is_compound = my_callsign != m_baseCall;
auto is_type_one = !is77BitMode () && is_compound && shortList (my_callsign);
@ -6723,6 +6728,8 @@ void MainWindow::clearDX ()
if (m_mode=="FT8" and SpecOp::HOUND == m_specOp) {
m_ntx=1;
ui->txrb1->setChecked(true);
m_hisCall = "";
m_hisCall0 = "";
} else {
m_ntx=6;
ui->txrb6->setChecked(true);
@ -6994,7 +7001,8 @@ void MainWindow::mousePressEvent(QMouseEvent *event)
void MainWindow::on_dxCallEntry_textChanged (QString const& call)
{
if (SpecOp::HOUND==m_specOp && m_config.superFox() && !m_bDoubleClicked) {
if (SpecOp::HOUND==m_specOp && m_config.superFox() && !(m_bDoubleClicked or (m_hisCall0 != ""
&& (call.left(6).contains(m_hisCall0) or call.right(6).contains(m_hisCall0))))) {
clearDX();
return;
}
@ -9393,6 +9401,7 @@ void MainWindow::replayDecodes ()
void MainWindow::postDecode (bool is_new, QString const& message)
{
if (message.contains("$VERIFY$")) return; // Don't send SuperFox OTP messages to messageClient
auto const& decode = message.trimmed ();
auto const& parts = decode.left (22).split (' ', SkipEmptyParts);
if (parts.size () >= 5)