Added @ALLCALL to CQs and HBs to make them more clear and unify the message formatting across all directed message types
This commit is contained in:
parent
e55689b25b
commit
1a4efa8120
@ -145,7 +145,7 @@ bool DecodedText::tryUnpackHeartbeat(){
|
|||||||
cmp.append(parts.at(1));
|
cmp.append(parts.at(1));
|
||||||
}
|
}
|
||||||
compound_ = cmp.join("/");
|
compound_ = cmp.join("/");
|
||||||
message_ = QString("%1: %2 %3 ").arg(compound_).arg(isAlt ? Varicode::cqString(bits3) : Varicode::hbString(bits3)).arg(extra_);
|
message_ = QString("%1: @ALLCALL %2 %3 ").arg(compound_).arg(isAlt ? Varicode::cqString(bits3) : Varicode::hbString(bits3)).arg(extra_);
|
||||||
frameType_ = type;
|
frameType_ = type;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -990,7 +990,7 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// prep
|
// prep
|
||||||
prepareHeartbeatMode(ui->actionModeJS8HB->isEnabled() && ui->actionModeJS8HB->isChecked());
|
prepareHeartbeatMode(canCurrentModeSendHeartbeat() && ui->actionModeJS8HB->isChecked());
|
||||||
prepareSpotting();
|
prepareSpotting();
|
||||||
|
|
||||||
auto enterFilter = new EnterKeyPressEater();
|
auto enterFilter = new EnterKeyPressEater();
|
||||||
@ -1241,10 +1241,6 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
|
|||||||
ui->tableWidgetCalls->clearSelection();
|
ui->tableWidgetCalls->clearSelection();
|
||||||
});
|
});
|
||||||
|
|
||||||
// savedMenu->setEnabled(savedMenu->isEnabled() && !ui->actionModeJS8HB->isChecked());
|
|
||||||
// directedMenu->setEnabled(directedMenu->isEnabled() && !ui->actionModeJS8HB->isChecked());
|
|
||||||
// relayAction->setEnabled(relayAction->isEnabled() && !ui->actionModeJS8HB->isChecked());
|
|
||||||
|
|
||||||
menu->addSeparator();
|
menu->addSeparator();
|
||||||
|
|
||||||
removeActivity->setDisabled(selectedOffset == -1);
|
removeActivity->setDisabled(selectedOffset == -1);
|
||||||
@ -1493,10 +1489,6 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
|
|||||||
ui->tableWidgetCalls->clearSelection();
|
ui->tableWidgetCalls->clearSelection();
|
||||||
});
|
});
|
||||||
|
|
||||||
// savedMenu->setEnabled(savedMenu->isEnabled() && !ui->actionModeJS8HB->isChecked());
|
|
||||||
// directedMenu->setEnabled(directedMenu->isEnabled() && !ui->actionModeJS8HB->isChecked());
|
|
||||||
// relayAction->setEnabled(relayAction->isEnabled() && !ui->actionModeJS8HB->isChecked());
|
|
||||||
|
|
||||||
menu->addSeparator();
|
menu->addSeparator();
|
||||||
|
|
||||||
menu->addAction(addStation);
|
menu->addAction(addStation);
|
||||||
@ -2384,7 +2376,7 @@ void MainWindow::readSettings()
|
|||||||
setFreqOffsetForRestore(m_settings->value("RxFreq",1500).toInt(), false);
|
setFreqOffsetForRestore(m_settings->value("RxFreq",1500).toInt(), false);
|
||||||
|
|
||||||
setSubmode(m_settings->value("SubMode", Varicode::JS8CallFast).toInt());
|
setSubmode(m_settings->value("SubMode", Varicode::JS8CallFast).toInt());
|
||||||
ui->actionModeJS8HB->setChecked(canEnableHeartbeat() && m_settings->value("SubModeHB", false).toBool());
|
ui->actionModeJS8HB->setChecked(m_settings->value("SubModeHB", false).toBool());
|
||||||
ui->actionHeartbeatAcknowledgements->setChecked(m_settings->value("SubModeHBAck", false).toBool());
|
ui->actionHeartbeatAcknowledgements->setChecked(m_settings->value("SubModeHBAck", false).toBool());
|
||||||
ui->actionModeMultiDecoder->setChecked(m_settings->value("SubModeMultiDecode", true).toBool());
|
ui->actionModeMultiDecoder->setChecked(m_settings->value("SubModeMultiDecode", true).toBool());
|
||||||
|
|
||||||
@ -4876,7 +4868,7 @@ void MainWindow::processDecodedLine(QByteArray t){
|
|||||||
// Only respond to HEARTBEATS...remember that CQ messages are "Alt" pings
|
// Only respond to HEARTBEATS...remember that CQ messages are "Alt" pings
|
||||||
if(decodedtext.isHeartbeat()){
|
if(decodedtext.isHeartbeat()){
|
||||||
if(decodedtext.isAlt()){
|
if(decodedtext.isAlt()){
|
||||||
// this is a cq with a standard or compound call, ala "KN4CRD/P: CQCQCQ"
|
// this is a cq with a standard or compound call, ala "KN4CRD/P: @ALLCALL CQ CQ CQ"
|
||||||
cd.cqTimestamp = DriftingDateTime::currentDateTimeUtc();
|
cd.cqTimestamp = DriftingDateTime::currentDateTimeUtc();
|
||||||
|
|
||||||
// it is not processed elsewhere, so we need to just log it here.
|
// it is not processed elsewhere, so we need to just log it here.
|
||||||
@ -7447,7 +7439,7 @@ void MainWindow::displayWidgets(qint64 n)
|
|||||||
void MainWindow::on_actionModeJS8HB_toggled(bool checked){
|
void MainWindow::on_actionModeJS8HB_toggled(bool checked){
|
||||||
// prep hb mode
|
// prep hb mode
|
||||||
|
|
||||||
prepareHeartbeatMode(ui->actionModeJS8HB->isEnabled() && ui->actionModeJS8HB->isChecked());
|
prepareHeartbeatMode(canCurrentModeSendHeartbeat() && ui->actionModeJS8HB->isChecked());
|
||||||
displayActivity(true);
|
displayActivity(true);
|
||||||
|
|
||||||
on_actionJS8_triggered();
|
on_actionJS8_triggered();
|
||||||
@ -7456,7 +7448,7 @@ void MainWindow::on_actionModeJS8HB_toggled(bool checked){
|
|||||||
void MainWindow::on_actionHeartbeatAcknowledgements_toggled(bool checked){
|
void MainWindow::on_actionHeartbeatAcknowledgements_toggled(bool checked){
|
||||||
// prep hb ack mode
|
// prep hb ack mode
|
||||||
|
|
||||||
prepareHeartbeatMode(ui->actionModeJS8HB->isEnabled() && ui->actionModeJS8HB->isChecked());
|
prepareHeartbeatMode(canCurrentModeSendHeartbeat() && ui->actionModeJS8HB->isChecked());
|
||||||
displayActivity(true);
|
displayActivity(true);
|
||||||
|
|
||||||
on_actionJS8_triggered();
|
on_actionJS8_triggered();
|
||||||
@ -7492,13 +7484,13 @@ void MainWindow::on_actionModeJS8Ultra_triggered(){
|
|||||||
|
|
||||||
void MainWindow::on_actionModeAutoreply_toggled(bool checked){
|
void MainWindow::on_actionModeAutoreply_toggled(bool checked){
|
||||||
// update the HB ack option (needs autoreply on)
|
// update the HB ack option (needs autoreply on)
|
||||||
prepareHeartbeatMode(ui->actionModeJS8HB->isEnabled() && ui->actionModeJS8HB->isChecked());
|
prepareHeartbeatMode(canCurrentModeSendHeartbeat() && ui->actionModeJS8HB->isChecked());
|
||||||
|
|
||||||
// then update the js8 mode
|
// then update the js8 mode
|
||||||
on_actionJS8_triggered();
|
on_actionJS8_triggered();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MainWindow::canEnableHeartbeat(){
|
bool MainWindow::canCurrentModeSendHeartbeat(){
|
||||||
if(m_nSubMode == Varicode::JS8CallFast){
|
if(m_nSubMode == Varicode::JS8CallFast){
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -7521,7 +7513,7 @@ void MainWindow::prepareHeartbeatMode(bool enabled){
|
|||||||
ui->hbMacroButton->setChecked(false);
|
ui->hbMacroButton->setChecked(false);
|
||||||
}
|
}
|
||||||
ui->actionHeartbeat->setEnabled(enabled);
|
ui->actionHeartbeat->setEnabled(enabled);
|
||||||
ui->actionModeJS8HB->setEnabled(enabled && canEnableHeartbeat());
|
ui->actionModeJS8HB->setEnabled(canCurrentModeSendHeartbeat());
|
||||||
ui->actionHeartbeatAcknowledgements->setEnabled(enabled && ui->actionModeAutoreply->isChecked());
|
ui->actionHeartbeatAcknowledgements->setEnabled(enabled && ui->actionModeAutoreply->isChecked());
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
@ -7571,13 +7563,8 @@ void MainWindow::on_actionJS8_triggered()
|
|||||||
m_nSubMode=Varicode::JS8CallUltra;
|
m_nSubMode=Varicode::JS8CallUltra;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Only enable heartbeat for normal mode
|
// Only enable heartbeat for modes that support it
|
||||||
ui->actionModeJS8HB->setEnabled(canEnableHeartbeat());
|
prepareHeartbeatMode(canCurrentModeSendHeartbeat() && ui->actionModeJS8HB->isChecked());
|
||||||
prepareHeartbeatMode(ui->actionModeJS8HB->isEnabled() && ui->actionModeJS8HB->isChecked());
|
|
||||||
|
|
||||||
//if(m_nSubMode != Varicode::JS8CallNormal){
|
|
||||||
// ui->actionModeJS8HB->setChecked(false);
|
|
||||||
//}
|
|
||||||
|
|
||||||
updateModeButtonText();
|
updateModeButtonText();
|
||||||
|
|
||||||
@ -8142,12 +8129,7 @@ void MainWindow::sendHeartbeat(){
|
|||||||
QStringList parts;
|
QStringList parts;
|
||||||
|
|
||||||
parts.append(QString("%1:").arg(mycall));
|
parts.append(QString("%1:").arg(mycall));
|
||||||
|
parts.append("HB");
|
||||||
auto flags = generateStatusFlags();
|
|
||||||
if(flags.isEmpty() || flags.first() != "HB"){
|
|
||||||
parts.append("HB");
|
|
||||||
}
|
|
||||||
parts.append(flags);
|
|
||||||
parts.append(mygrid);
|
parts.append(mygrid);
|
||||||
|
|
||||||
QString message = parts.join(" ").trimmed();
|
QString message = parts.join(" ").trimmed();
|
||||||
@ -8219,7 +8201,7 @@ void MainWindow::sendCQ(bool repeat){
|
|||||||
auto message = m_config.cq_message();
|
auto message = m_config.cq_message();
|
||||||
if(message.isEmpty()){
|
if(message.isEmpty()){
|
||||||
QString mygrid = m_config.my_grid().left(4);
|
QString mygrid = m_config.my_grid().left(4);
|
||||||
message = QString("CQCQCQ %1").arg(mygrid).trimmed();
|
message = QString("CQ CQ CQ %1").arg(mygrid).trimmed();
|
||||||
}
|
}
|
||||||
|
|
||||||
clearCallsignSelected();
|
clearCallsignSelected();
|
||||||
@ -11221,7 +11203,7 @@ void MainWindow::processCommandActivity() {
|
|||||||
|
|
||||||
// PROCESS ACTIVE HEARTBEAT
|
// PROCESS ACTIVE HEARTBEAT
|
||||||
// if we have hb mode enabled and auto reply enabled <del>and auto ack enabled and no callsign is selected</del> update: if we're in HB mode, doesn't matter if a callsign is selected.
|
// if we have hb mode enabled and auto reply enabled <del>and auto ack enabled and no callsign is selected</del> update: if we're in HB mode, doesn't matter if a callsign is selected.
|
||||||
else if (d.cmd == " HB" && ui->actionModeJS8HB->isEnabled() && ui->actionModeJS8HB->isChecked() && ui->actionModeAutoreply->isChecked() && ui->actionHeartbeatAcknowledgements->isChecked()){
|
else if (d.cmd == " HB" && canCurrentModeSendHeartbeat() && ui->actionModeJS8HB->isChecked() && ui->actionModeAutoreply->isChecked() && ui->actionHeartbeatAcknowledgements->isChecked()){
|
||||||
// check to make sure we aren't pausing HB transmissions (ACKs) while a callsign is selected
|
// check to make sure we aren't pausing HB transmissions (ACKs) while a callsign is selected
|
||||||
if(m_config.heartbeat_qso_pause() && !selectedCallsign.isEmpty()){
|
if(m_config.heartbeat_qso_pause() && !selectedCallsign.isEmpty()){
|
||||||
qDebug() << "hb paused during qso";
|
qDebug() << "hb paused during qso";
|
||||||
|
@ -282,7 +282,7 @@ private slots:
|
|||||||
void on_actionHeartbeatAcknowledgements_toggled(bool checked);
|
void on_actionHeartbeatAcknowledgements_toggled(bool checked);
|
||||||
void on_actionModeMultiDecoder_toggled(bool checked);
|
void on_actionModeMultiDecoder_toggled(bool checked);
|
||||||
void on_actionModeAutoreply_toggled(bool checked);
|
void on_actionModeAutoreply_toggled(bool checked);
|
||||||
bool canEnableHeartbeat();
|
bool canCurrentModeSendHeartbeat();
|
||||||
void prepareHeartbeatMode(bool enabled);
|
void prepareHeartbeatMode(bool enabled);
|
||||||
void on_actionJS8_triggered();
|
void on_actionJS8_triggered();
|
||||||
void on_TxFreqSpinBox_valueChanged(int arg1);
|
void on_TxFreqSpinBox_valueChanged(int arg1);
|
||||||
|
21
varicode.cpp
21
varicode.cpp
@ -139,7 +139,7 @@ QRegularExpression directed_re("^" +
|
|||||||
optional_cmd_pattern +
|
optional_cmd_pattern +
|
||||||
optional_num_pattern);
|
optional_num_pattern);
|
||||||
|
|
||||||
QRegularExpression heartbeat_re(R"(^\s*(?<type>CQ CQ CQ|CQ DX|CQ QRP|CQ CONTEST|CQ FIELD|CQ FD|CQ CQ|CQ|HB( AUTO)?( RELAY)?( SPOT)?)(?:\s(?<grid>[A-R]{2}[0-9]{2}))?\b)");
|
QRegularExpression heartbeat_re(R"(^\s*(?<callsign>[@]ALLCALL\s+)?(?<type>CQ CQ CQ|CQ DX|CQ QRP|CQ CONTEST|CQ FIELD|CQ FD|CQ CQ|CQ|HB)(?:\s(?<grid>[A-R]{2}[0-9]{2}))?\b)");
|
||||||
|
|
||||||
QRegularExpression compound_re("^\\s*[`]" +
|
QRegularExpression compound_re("^\\s*[`]" +
|
||||||
callsign_pattern +
|
callsign_pattern +
|
||||||
@ -261,6 +261,8 @@ QMap<QString, quint32> basecalls = {
|
|||||||
{ "@RAYNET", nbasecall + 41 }, // RAYNET GROUP
|
{ "@RAYNET", nbasecall + 41 }, // RAYNET GROUP
|
||||||
{ "@RADAR", nbasecall + 42 }, // RADAR GROUP
|
{ "@RADAR", nbasecall + 42 }, // RADAR GROUP
|
||||||
{ "@SKYWARN", nbasecall + 43 }, // SKYWARN GROUP
|
{ "@SKYWARN", nbasecall + 43 }, // SKYWARN GROUP
|
||||||
|
{ "@CQ", nbasecall + 44 }, // CQ GROUP
|
||||||
|
{ "@QSO", nbasecall + 45 }, // QSO GROUP
|
||||||
};
|
};
|
||||||
|
|
||||||
QMap<quint32, QString> cqs = {
|
QMap<quint32, QString> cqs = {
|
||||||
@ -274,15 +276,16 @@ QMap<quint32, QString> cqs = {
|
|||||||
{ 7, "CQ"},
|
{ 7, "CQ"},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* status flags in HB messages are deprecated as of 2.2 */
|
||||||
QMap<quint32, QString> hbs = {
|
QMap<quint32, QString> hbs = {
|
||||||
{ 0, "HB" }, // HB
|
{ 0, "HB" }, // HB
|
||||||
{ 1, "HB AUTO" }, // HB AUTO
|
{ 1, "HB" }, // HB AUTO
|
||||||
{ 2, "HB AUTO RELAY" }, // HB AUTO RELAY
|
{ 2, "HB" }, // HB AUTO RELAY
|
||||||
{ 3, "HB AUTO RELAY SPOT" }, // HB AUTO RELAY SPOT
|
{ 3, "HB" }, // HB AUTO RELAY SPOT
|
||||||
{ 7, "HB AUTO SPOT"}, // HB AUTO SPOT
|
{ 4, "HB" }, // HB RELAY
|
||||||
{ 4, "HB RELAY" }, // HB RELAY
|
{ 5, "HB" }, // HB RELAY SPOT
|
||||||
{ 5, "HB RELAY SPOT" }, // HB RELAY SPOT
|
{ 6, "HB" }, // HB SPOT
|
||||||
{ 6, "HB SPOT" }, // HB SPOT
|
{ 7, "HB" }, // HB AUTO SPOT
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user