Enable Tx by double-clicking on a combined message on standard FT8 sub-bands is no longer permitted, as 10-bit hash collisions are too likely.

This commit is contained in:
Uwe Risse 2024-02-05 16:50:22 +01:00
parent 98e48e00d3
commit 3611f07ad6

View File

@ -5531,8 +5531,31 @@ void MainWindow::doubleClickOnCall(Qt::KeyboardModifiers modifiers)
return;
}
DecodedText message {cursor.block().text().trimmed().left(61).remove("TU; ")};
m_bDoubleClicked = true;
processMessage (message, modifiers);
if(message.string().contains(";") && message.string().contains("<")) {
QVector<qint32> ft8Freq = {1840000,3573000,7074000,10136000,14074000,18100000,21074000,24915000,28074000,50313000,70154000};
for(int i=0; i<ft8Freq.length()-1; i++) {
int kHzdiff=m_freqNominal - ft8Freq[i];
if(qAbs(kHzdiff) < 3000 ) {
m_bTxTime=false;
if (m_auto) auto_tx_mode (false);
if (m_tune) stop_tuning();
auto const& msg2 = tr("Double-clicking on combined messages\n"
"not allowed on the standard FT8 sub-bands.\n\n"
"First verify that the displayed <callsign>\n"
"is not a decoding artefact.");
QTimer::singleShot (0, [=] { // don't block guiUpdate
MessageBox::warning_message (this, tr ("Potential hash collision"), msg2);
});
break;
} else {
m_bDoubleClicked = true;
processMessage (message, modifiers);
}
}
} else {
m_bDoubleClicked = true;
processMessage (message, modifiers);
}
}
void MainWindow::processMessage (DecodedText const& message, Qt::KeyboardModifiers modifiers)