Heartbeat commands instead
This commit is contained in:
parent
cac5f798a3
commit
7da30200f5
@ -628,7 +628,7 @@ private:
|
|||||||
bool spot_to_reporting_networks_;
|
bool spot_to_reporting_networks_;
|
||||||
bool transmit_directed_;
|
bool transmit_directed_;
|
||||||
bool autoreply_off_at_startup_;
|
bool autoreply_off_at_startup_;
|
||||||
bool ping_anywhere_;
|
bool heartbeat_anywhere_;
|
||||||
bool relay_disabled_;
|
bool relay_disabled_;
|
||||||
bool monitor_off_at_startup_;
|
bool monitor_off_at_startup_;
|
||||||
bool monitor_last_used_;
|
bool monitor_last_used_;
|
||||||
@ -642,7 +642,7 @@ private:
|
|||||||
bool miles_;
|
bool miles_;
|
||||||
bool quick_call_;
|
bool quick_call_;
|
||||||
bool disable_TX_on_73_;
|
bool disable_TX_on_73_;
|
||||||
int ping_;
|
int heartbeat_;
|
||||||
int watchdog_;
|
int watchdog_;
|
||||||
bool TX_messages_;
|
bool TX_messages_;
|
||||||
bool enable_VHF_features_;
|
bool enable_VHF_features_;
|
||||||
@ -759,7 +759,7 @@ void Configuration::set_spot_to_reporting_networks (bool spot)
|
|||||||
|
|
||||||
bool Configuration::transmit_directed() const { return m_->transmit_directed_; }
|
bool Configuration::transmit_directed() const { return m_->transmit_directed_; }
|
||||||
bool Configuration::autoreply_off_at_startup () const {return m_->autoreply_off_at_startup_;}
|
bool Configuration::autoreply_off_at_startup () const {return m_->autoreply_off_at_startup_;}
|
||||||
bool Configuration::ping_anywhere() const { return m_->ping_anywhere_;}
|
bool Configuration::heartbeat_anywhere() const { return m_->heartbeat_anywhere_;}
|
||||||
bool Configuration::relay_off() const { return m_->relay_disabled_; }
|
bool Configuration::relay_off() const { return m_->relay_disabled_; }
|
||||||
bool Configuration::monitor_off_at_startup () const {return m_->monitor_off_at_startup_;}
|
bool Configuration::monitor_off_at_startup () const {return m_->monitor_off_at_startup_;}
|
||||||
bool Configuration::monitor_last_used () const {return m_->rig_is_dummy_ || m_->monitor_last_used_;}
|
bool Configuration::monitor_last_used () const {return m_->rig_is_dummy_ || m_->monitor_last_used_;}
|
||||||
@ -773,7 +773,7 @@ bool Configuration::clear_DX () const {return m_->clear_DX_;}
|
|||||||
bool Configuration::miles () const {return m_->miles_;}
|
bool Configuration::miles () const {return m_->miles_;}
|
||||||
bool Configuration::quick_call () const {return m_->quick_call_;}
|
bool Configuration::quick_call () const {return m_->quick_call_;}
|
||||||
bool Configuration::disable_TX_on_73 () const {return m_->disable_TX_on_73_;}
|
bool Configuration::disable_TX_on_73 () const {return m_->disable_TX_on_73_;}
|
||||||
int Configuration::ping () const {return m_->ping_;}
|
int Configuration::heartbeat () const {return m_->heartbeat_;}
|
||||||
int Configuration::watchdog () const {return m_->watchdog_;}
|
int Configuration::watchdog () const {return m_->watchdog_;}
|
||||||
bool Configuration::TX_messages () const {return m_->TX_messages_;}
|
bool Configuration::TX_messages () const {return m_->TX_messages_;}
|
||||||
bool Configuration::enable_VHF_features () const {return m_->enable_VHF_features_;}
|
bool Configuration::enable_VHF_features () const {return m_->enable_VHF_features_;}
|
||||||
@ -1338,7 +1338,7 @@ void Configuration::impl::initialize_models ()
|
|||||||
ui_->psk_reporter_check_box->setChecked (spot_to_reporting_networks_);
|
ui_->psk_reporter_check_box->setChecked (spot_to_reporting_networks_);
|
||||||
ui_->transmit_directed_check_box->setChecked(transmit_directed_);
|
ui_->transmit_directed_check_box->setChecked(transmit_directed_);
|
||||||
ui_->autoreply_off_check_box->setChecked (autoreply_off_at_startup_);
|
ui_->autoreply_off_check_box->setChecked (autoreply_off_at_startup_);
|
||||||
ui_->ping_anywhere_check_box->setChecked(ping_anywhere_);
|
ui_->heartbeat_anywhere_check_box->setChecked(heartbeat_anywhere_);
|
||||||
ui_->relay_disabled_check_box->setChecked(relay_disabled_);
|
ui_->relay_disabled_check_box->setChecked(relay_disabled_);
|
||||||
ui_->monitor_off_check_box->setChecked (monitor_off_at_startup_);
|
ui_->monitor_off_check_box->setChecked (monitor_off_at_startup_);
|
||||||
ui_->monitor_last_used_check_box->setChecked (monitor_last_used_);
|
ui_->monitor_last_used_check_box->setChecked (monitor_last_used_);
|
||||||
@ -1350,7 +1350,7 @@ void Configuration::impl::initialize_models ()
|
|||||||
ui_->miles_check_box->setChecked (miles_);
|
ui_->miles_check_box->setChecked (miles_);
|
||||||
ui_->quick_call_check_box->setChecked (quick_call_);
|
ui_->quick_call_check_box->setChecked (quick_call_);
|
||||||
ui_->disable_TX_on_73_check_box->setChecked (disable_TX_on_73_);
|
ui_->disable_TX_on_73_check_box->setChecked (disable_TX_on_73_);
|
||||||
ui_->ping_spin_box->setValue (ping_);
|
ui_->heartbeat_spin_box->setValue (heartbeat_);
|
||||||
ui_->tx_watchdog_spin_box->setValue (watchdog_);
|
ui_->tx_watchdog_spin_box->setValue (watchdog_);
|
||||||
ui_->enable_VHF_features_check_box->setChecked(enable_VHF_features_);
|
ui_->enable_VHF_features_check_box->setChecked(enable_VHF_features_);
|
||||||
ui_->decode_at_52s_check_box->setChecked(decode_at_52s_);
|
ui_->decode_at_52s_check_box->setChecked(decode_at_52s_);
|
||||||
@ -1596,7 +1596,7 @@ void Configuration::impl::read_settings ()
|
|||||||
|
|
||||||
transmit_directed_ = settings_->value ("TransmitDirected", true).toBool();
|
transmit_directed_ = settings_->value ("TransmitDirected", true).toBool();
|
||||||
autoreply_off_at_startup_ = settings_->value ("AutoreplyOFF", false).toBool ();
|
autoreply_off_at_startup_ = settings_->value ("AutoreplyOFF", false).toBool ();
|
||||||
ping_anywhere_ = settings_->value("BeaconAnywhere", false).toBool();
|
heartbeat_anywhere_ = settings_->value("BeaconAnywhere", false).toBool();
|
||||||
relay_disabled_ = settings_->value ("RelayOFF", false).toBool ();
|
relay_disabled_ = settings_->value ("RelayOFF", false).toBool ();
|
||||||
monitor_off_at_startup_ = settings_->value ("MonitorOFF", false).toBool ();
|
monitor_off_at_startup_ = settings_->value ("MonitorOFF", false).toBool ();
|
||||||
monitor_last_used_ = settings_->value ("MonitorLastUsed", false).toBool ();
|
monitor_last_used_ = settings_->value ("MonitorLastUsed", false).toBool ();
|
||||||
@ -1657,7 +1657,7 @@ void Configuration::impl::read_settings ()
|
|||||||
miles_ = settings_->value ("Miles", false).toBool ();
|
miles_ = settings_->value ("Miles", false).toBool ();
|
||||||
quick_call_ = settings_->value ("QuickCall", false).toBool ();
|
quick_call_ = settings_->value ("QuickCall", false).toBool ();
|
||||||
disable_TX_on_73_ = settings_->value ("73TxDisable", false).toBool ();
|
disable_TX_on_73_ = settings_->value ("73TxDisable", false).toBool ();
|
||||||
ping_ = settings_->value ("TxBeacon", 30).toInt ();
|
heartbeat_ = settings_->value ("TxBeacon", 30).toInt ();
|
||||||
watchdog_ = settings_->value ("TxIdleWatchdog", 60).toInt ();
|
watchdog_ = settings_->value ("TxIdleWatchdog", 60).toInt ();
|
||||||
if(watchdog_){
|
if(watchdog_){
|
||||||
watchdog_ = qMax(5, watchdog_);
|
watchdog_ = qMax(5, watchdog_);
|
||||||
@ -1762,7 +1762,7 @@ void Configuration::impl::write_settings ()
|
|||||||
settings_->setValue ("Type2MsgGen", QVariant::fromValue (type_2_msg_gen_));
|
settings_->setValue ("Type2MsgGen", QVariant::fromValue (type_2_msg_gen_));
|
||||||
settings_->setValue ("TransmitDirected", transmit_directed_);
|
settings_->setValue ("TransmitDirected", transmit_directed_);
|
||||||
settings_->setValue ("AutoreplyOFF", autoreply_off_at_startup_);
|
settings_->setValue ("AutoreplyOFF", autoreply_off_at_startup_);
|
||||||
settings_->setValue ("BeaconAnywhere", ping_anywhere_);
|
settings_->setValue ("BeaconAnywhere", heartbeat_anywhere_);
|
||||||
settings_->setValue ("RelayOFF", relay_disabled_);
|
settings_->setValue ("RelayOFF", relay_disabled_);
|
||||||
settings_->setValue ("MonitorOFF", monitor_off_at_startup_);
|
settings_->setValue ("MonitorOFF", monitor_off_at_startup_);
|
||||||
settings_->setValue ("MonitorLastUsed", monitor_last_used_);
|
settings_->setValue ("MonitorLastUsed", monitor_last_used_);
|
||||||
@ -1791,7 +1791,7 @@ void Configuration::impl::write_settings ()
|
|||||||
settings_->setValue ("Miles", miles_);
|
settings_->setValue ("Miles", miles_);
|
||||||
settings_->setValue ("QuickCall", quick_call_);
|
settings_->setValue ("QuickCall", quick_call_);
|
||||||
settings_->setValue ("73TxDisable", disable_TX_on_73_);
|
settings_->setValue ("73TxDisable", disable_TX_on_73_);
|
||||||
settings_->setValue ("TxBeacon", ping_);
|
settings_->setValue ("TxBeacon", heartbeat_);
|
||||||
settings_->setValue ("TxIdleWatchdog", watchdog_);
|
settings_->setValue ("TxIdleWatchdog", watchdog_);
|
||||||
settings_->setValue ("Tx2QSO", TX_messages_);
|
settings_->setValue ("Tx2QSO", TX_messages_);
|
||||||
settings_->setValue ("CATForceDTR", rig_params_.force_dtr);
|
settings_->setValue ("CATForceDTR", rig_params_.force_dtr);
|
||||||
@ -2260,7 +2260,7 @@ void Configuration::impl::accept ()
|
|||||||
tx_qsy_allowed_ = ui_->tx_qsy_check_box->isChecked ();
|
tx_qsy_allowed_ = ui_->tx_qsy_check_box->isChecked ();
|
||||||
transmit_directed_ = ui_->transmit_directed_check_box->isChecked();
|
transmit_directed_ = ui_->transmit_directed_check_box->isChecked();
|
||||||
autoreply_off_at_startup_ = ui_->autoreply_off_check_box->isChecked ();
|
autoreply_off_at_startup_ = ui_->autoreply_off_check_box->isChecked ();
|
||||||
ping_anywhere_ = ui_->ping_anywhere_check_box->isChecked();
|
heartbeat_anywhere_ = ui_->heartbeat_anywhere_check_box->isChecked();
|
||||||
relay_disabled_ = ui_->relay_disabled_check_box->isChecked();
|
relay_disabled_ = ui_->relay_disabled_check_box->isChecked();
|
||||||
monitor_off_at_startup_ = ui_->monitor_off_check_box->isChecked ();
|
monitor_off_at_startup_ = ui_->monitor_off_check_box->isChecked ();
|
||||||
monitor_last_used_ = ui_->monitor_last_used_check_box->isChecked ();
|
monitor_last_used_ = ui_->monitor_last_used_check_box->isChecked ();
|
||||||
@ -2272,7 +2272,7 @@ void Configuration::impl::accept ()
|
|||||||
miles_ = ui_->miles_check_box->isChecked ();
|
miles_ = ui_->miles_check_box->isChecked ();
|
||||||
quick_call_ = ui_->quick_call_check_box->isChecked ();
|
quick_call_ = ui_->quick_call_check_box->isChecked ();
|
||||||
disable_TX_on_73_ = ui_->disable_TX_on_73_check_box->isChecked ();
|
disable_TX_on_73_ = ui_->disable_TX_on_73_check_box->isChecked ();
|
||||||
ping_ = ui_->ping_spin_box->value ();
|
heartbeat_ = ui_->heartbeat_spin_box->value ();
|
||||||
watchdog_ = ui_->tx_watchdog_spin_box->value ();
|
watchdog_ = ui_->tx_watchdog_spin_box->value ();
|
||||||
data_mode_ = static_cast<DataMode> (ui_->TX_mode_button_group->checkedId ());
|
data_mode_ = static_cast<DataMode> (ui_->TX_mode_button_group->checkedId ());
|
||||||
save_directory_ = ui_->save_path_display_label->text ();
|
save_directory_ = ui_->save_path_display_label->text ();
|
||||||
|
@ -121,7 +121,7 @@ public:
|
|||||||
void set_spot_to_reporting_networks (bool);
|
void set_spot_to_reporting_networks (bool);
|
||||||
bool transmit_directed() const;
|
bool transmit_directed() const;
|
||||||
bool autoreply_off_at_startup () const;
|
bool autoreply_off_at_startup () const;
|
||||||
bool ping_anywhere() const;
|
bool heartbeat_anywhere() const;
|
||||||
bool relay_off() const;
|
bool relay_off() const;
|
||||||
bool monitor_off_at_startup () const;
|
bool monitor_off_at_startup () const;
|
||||||
bool monitor_last_used () const;
|
bool monitor_last_used () const;
|
||||||
@ -135,7 +135,7 @@ public:
|
|||||||
bool miles () const;
|
bool miles () const;
|
||||||
bool quick_call () const;
|
bool quick_call () const;
|
||||||
bool disable_TX_on_73 () const;
|
bool disable_TX_on_73 () const;
|
||||||
int ping () const;
|
int heartbeat () const;
|
||||||
int watchdog () const;
|
int watchdog () const;
|
||||||
bool TX_messages () const;
|
bool TX_messages () const;
|
||||||
bool split_mode () const;
|
bool split_mode () const;
|
||||||
|
@ -613,9 +613,9 @@ text message.</string>
|
|||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_21">
|
<layout class="QVBoxLayout" name="verticalLayout_21">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="ping_anywhere_check_box">
|
<widget class="QCheckBox" name="heartbeat_anywhere_check_box">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Allow transmitting heartbeat pings outside of heartbeat sub-channel (500Hz - 1000Hz)</string>
|
<string>Allow heartbeat transmissions outside of heartbeat sub-channel (500Hz - 1000Hz)</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -629,7 +629,7 @@ text message.</string>
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QSpinBox" name="ping_spin_box">
|
<widget class="QSpinBox" name="heartbeat_spin_box">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string><html><head/><body><p>Number of minutes between unattended pings</p></body></html></string>
|
<string><html><head/><body><p>Number of minutes between unattended pings</p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
|
@ -131,7 +131,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) : "PING").arg(extra_);
|
message_ = QString("%1: %2 %3 ").arg(compound_).arg(isAlt ? Varicode::cqString(bits3) : "HEARTBEAT").arg(extra_);
|
||||||
frameType_ = type;
|
frameType_ = type;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1372,7 +1372,7 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
|
|||||||
p.setColor(QPalette::Inactive, QPalette::Highlight, p.color(QPalette::Active, QPalette::Highlight));
|
p.setColor(QPalette::Inactive, QPalette::Highlight, p.color(QPalette::Active, QPalette::Highlight));
|
||||||
ui->tableWidgetCalls->setPalette(p);
|
ui->tableWidgetCalls->setPalette(p);
|
||||||
|
|
||||||
// Don't block ping's first run...
|
// Don't block heartbeat's first run...
|
||||||
m_lastTxTime = DriftingDateTime::currentDateTimeUtc().addSecs(-300);
|
m_lastTxTime = DriftingDateTime::currentDateTimeUtc().addSecs(-300);
|
||||||
|
|
||||||
|
|
||||||
@ -3644,7 +3644,7 @@ void MainWindow::readFromStdout() //readFromStdout
|
|||||||
cd.utcTimestamp = DriftingDateTime::currentDateTimeUtc();
|
cd.utcTimestamp = DriftingDateTime::currentDateTimeUtc();
|
||||||
cd.bits = decodedtext.bits();
|
cd.bits = decodedtext.bits();
|
||||||
|
|
||||||
// Only respond to PINGS...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()){
|
||||||
|
|
||||||
@ -3653,10 +3653,10 @@ void MainWindow::readFromStdout() //readFromStdout
|
|||||||
logCallActivity(cd, true);
|
logCallActivity(cd, true);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// convert PING to a directed command and process...
|
// convert HEARTBEAT to a directed command and process...
|
||||||
cmd.from = cd.call;
|
cmd.from = cd.call;
|
||||||
cmd.to = "@ALLCALL";
|
cmd.to = "@ALLCALL";
|
||||||
cmd.cmd = " PING";
|
cmd.cmd = " HEARTBEAT";
|
||||||
cmd.snr = cd.snr;
|
cmd.snr = cd.snr;
|
||||||
cmd.bits = cd.bits;
|
cmd.bits = cd.bits;
|
||||||
cmd.grid = cd.grid;
|
cmd.grid = cd.grid;
|
||||||
@ -5480,7 +5480,7 @@ void MainWindow::scheduleHeartbeat(bool first){
|
|||||||
|
|
||||||
// round to 15 second increment
|
// round to 15 second increment
|
||||||
int secondsSinceEpoch = (timestamp.toMSecsSinceEpoch()/1000);
|
int secondsSinceEpoch = (timestamp.toMSecsSinceEpoch()/1000);
|
||||||
int delta = roundUp(secondsSinceEpoch, 15) + 1 + (first ? 0 : qMax(1, m_config.ping()) * 60) - secondsSinceEpoch;
|
int delta = roundUp(secondsSinceEpoch, 15) + 1 + (first ? 0 : qMax(1, m_config.heartbeat()) * 60) - secondsSinceEpoch;
|
||||||
timestamp = timestamp.addSecs(delta);
|
timestamp = timestamp.addSecs(delta);
|
||||||
|
|
||||||
// 25% of the time, switch intervals
|
// 25% of the time, switch intervals
|
||||||
@ -5537,7 +5537,7 @@ void MainWindow::prepareHeartbeat(){
|
|||||||
|
|
||||||
// JS8Call Style
|
// JS8Call Style
|
||||||
if(m_txHeartbeatQueue.isEmpty()){
|
if(m_txHeartbeatQueue.isEmpty()){
|
||||||
lines.append(QString("%1: PING %2").arg(mycall).arg(mygrid));
|
lines.append(QString("%1: HEARTBEAT %2").arg(mycall).arg(mygrid));
|
||||||
} else {
|
} else {
|
||||||
while(!m_txHeartbeatQueue.isEmpty() && lines.length() < 1){
|
while(!m_txHeartbeatQueue.isEmpty() && lines.length() < 1){
|
||||||
lines.append(m_txHeartbeatQueue.dequeue());
|
lines.append(m_txHeartbeatQueue.dequeue());
|
||||||
@ -5545,7 +5545,7 @@ void MainWindow::prepareHeartbeat(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Choose a ping frequency
|
// Choose a ping frequency
|
||||||
auto f = m_config.ping_anywhere() ? -1 : findFreeFreqOffset(500, 1000, 50);
|
auto f = m_config.heartbeat_anywhere() ? -1 : findFreeFreqOffset(500, 1000, 50);
|
||||||
|
|
||||||
auto text = lines.join(QChar('\n'));
|
auto text = lines.join(QChar('\n'));
|
||||||
if(text.isEmpty()){
|
if(text.isEmpty()){
|
||||||
@ -6538,7 +6538,7 @@ void MainWindow::buildQueryMenu(QMenu * menu, QString call){
|
|||||||
addMessageText(QString("%1>[MESSAGE]").arg(selectedCall), true, true);
|
addMessageText(QString("%1>[MESSAGE]").arg(selectedCall), true, true);
|
||||||
});
|
});
|
||||||
|
|
||||||
auto qsoQueryAction = menu->addAction(QString("%1 PING REQ [CALLSIGN]? - Please acknowledge you can communicate directly with [CALLSIGN]").arg(call).trimmed());
|
auto qsoQueryAction = menu->addAction(QString("%1 HEARTBEAT REQ [CALLSIGN]? - Please acknowledge you can communicate directly with [CALLSIGN]").arg(call).trimmed());
|
||||||
connect(qsoQueryAction, &QAction::triggered, this, [this](){
|
connect(qsoQueryAction, &QAction::triggered, this, [this](){
|
||||||
|
|
||||||
QString selectedCall = callsignSelected();
|
QString selectedCall = callsignSelected();
|
||||||
@ -6546,7 +6546,7 @@ void MainWindow::buildQueryMenu(QMenu * menu, QString call){
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
addMessageText(QString("%1 PING REQ [CALLSIGN]?").arg(selectedCall), true, true);
|
addMessageText(QString("%1 HEARTBEAT REQ [CALLSIGN]?").arg(selectedCall), true, true);
|
||||||
});
|
});
|
||||||
|
|
||||||
menu->addSeparator();
|
menu->addSeparator();
|
||||||
@ -8212,7 +8212,7 @@ void MainWindow::processRxActivity() {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(d.isDirected && d.text.contains(": PING")){
|
if(d.isDirected && d.text.contains(": HEARTBEAT")){
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -8494,7 +8494,7 @@ void MainWindow::processCommandActivity() {
|
|||||||
cd.snr = d.snr;
|
cd.snr = d.snr;
|
||||||
cd.freq = d.freq;
|
cd.freq = d.freq;
|
||||||
cd.bits = d.bits;
|
cd.bits = d.bits;
|
||||||
cd.ackTimestamp = d.text.contains("PING ACK") || toMe ? d.utcTimestamp : QDateTime{};
|
cd.ackTimestamp = d.text.contains("HEARTBEAT ACK") || toMe ? d.utcTimestamp : QDateTime{};
|
||||||
cd.utcTimestamp = d.utcTimestamp;
|
cd.utcTimestamp = d.utcTimestamp;
|
||||||
logCallActivity(cd, true);
|
logCallActivity(cd, true);
|
||||||
|
|
||||||
@ -8535,7 +8535,7 @@ void MainWindow::processCommandActivity() {
|
|||||||
bool shouldDisplay = true;
|
bool shouldDisplay = true;
|
||||||
|
|
||||||
// don't display ping allcalls
|
// don't display ping allcalls
|
||||||
if(isAllCall && (ad.text.contains(": PING") || d.cmd == " PING")){
|
if(isAllCall && (ad.text.contains(": HEARTBEAT") || d.cmd == " HEARTBEAT")){
|
||||||
shouldDisplay = false;
|
shouldDisplay = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -8546,7 +8546,7 @@ void MainWindow::processCommandActivity() {
|
|||||||
|
|
||||||
// ACKs are the most likely source of items to be overwritten (multiple responses at once)...
|
// ACKs are the most likely source of items to be overwritten (multiple responses at once)...
|
||||||
// so don't overwrite those (i.e., print each on a new line)
|
// so don't overwrite those (i.e., print each on a new line)
|
||||||
bool shouldOverwrite = (!d.cmd.contains("PING ACK")); /* && isRecentOffset(d.freq);*/
|
bool shouldOverwrite = (!d.cmd.contains("HEARTBEAT ACK")); /* && isRecentOffset(d.freq);*/
|
||||||
|
|
||||||
if(shouldOverwrite && ui->textEditRX->find(d.utcTimestamp.time().toString(), QTextDocument::FindBackward)){
|
if(shouldOverwrite && ui->textEditRX->find(d.utcTimestamp.time().toString(), QTextDocument::FindBackward)){
|
||||||
// ... maybe we could delete the last line that had this message on this frequency...
|
// ... maybe we could delete the last line that had this message on this frequency...
|
||||||
@ -8588,7 +8588,7 @@ void MainWindow::processCommandActivity() {
|
|||||||
|
|
||||||
// if this is an allcall, check to make sure we haven't replied to their allcall recently (in the past ping interval)
|
// if this is an allcall, check to make sure we haven't replied to their allcall recently (in the past ping interval)
|
||||||
// that way we never get spammed by allcalls at a higher frequency than what we would normally ping
|
// that way we never get spammed by allcalls at a higher frequency than what we would normally ping
|
||||||
if (isAllCall && m_txAllcallCommandCache.contains(d.from) && m_txAllcallCommandCache[d.from]->secsTo(now) / 60 < m_config.ping()) {
|
if (isAllCall && m_txAllcallCommandCache.contains(d.from) && m_txAllcallCommandCache[d.from]->secsTo(now) / 60 < m_config.heartbeat()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -8748,9 +8748,9 @@ void MainWindow::processCommandActivity() {
|
|||||||
reply = m_lastTxMessage;
|
reply = m_lastTxMessage;
|
||||||
}
|
}
|
||||||
|
|
||||||
// PROCESS PING
|
// PROCESS HEARTBEAT
|
||||||
else if (d.cmd == " PING" && ui->heartbeatButton->isChecked()){
|
else if (d.cmd == " HEARTBEAT" && ui->heartbeatButton->isChecked()){
|
||||||
reply = QString("%1 PING ACK %2").arg(d.from).arg(Varicode::formatSNR(d.snr));
|
reply = QString("%1 HEARTBEAT ACK %2").arg(d.from).arg(Varicode::formatSNR(d.snr));
|
||||||
|
|
||||||
enqueueHeartbeat(reply);
|
enqueueHeartbeat(reply);
|
||||||
|
|
||||||
@ -8762,8 +8762,8 @@ void MainWindow::processCommandActivity() {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// PROCESS BUFFERED PING REQ QUERY
|
// PROCESS BUFFERED HEARTBEAT REQ QUERY
|
||||||
else if (d.cmd == " PING REQ" && ui->heartbeatButton->isChecked()){
|
else if (d.cmd == " HEARTBEAT REQ" && ui->heartbeatButton->isChecked()){
|
||||||
auto who = d.text;
|
auto who = d.text;
|
||||||
if(who.isEmpty()){
|
if(who.isEmpty()){
|
||||||
continue;
|
continue;
|
||||||
@ -8850,7 +8850,7 @@ void MainWindow::processCommandActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// do not queue @ALLCALL replies if auto-reply is not checked or it's a ping reply
|
// do not queue @ALLCALL replies if auto-reply is not checked or it's a ping reply
|
||||||
if(!ui->autoReplyButton->isChecked() && isAllCall && !d.cmd.contains("PING")){
|
if(!ui->autoReplyButton->isChecked() && isAllCall && !d.cmd.contains("HEARTBEAT")){
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -9029,7 +9029,7 @@ void MainWindow::processTxQueue(){
|
|||||||
// check to see if this is a high priority message, or if we have autoreply enabled, or if this is a ping and the ping button is enabled
|
// check to see if this is a high priority message, or if we have autoreply enabled, or if this is a ping and the ping button is enabled
|
||||||
if(message.priority >= PriorityHigh ||
|
if(message.priority >= PriorityHigh ||
|
||||||
(ui->autoReplyButton->isChecked()) ||
|
(ui->autoReplyButton->isChecked()) ||
|
||||||
(ui->heartbeatButton->isChecked() && message.message.contains("PING"))
|
(ui->heartbeatButton->isChecked() && message.message.contains("HEARTBEAT"))
|
||||||
){
|
){
|
||||||
// then try to set the frequency...
|
// then try to set the frequency...
|
||||||
setFreqOffsetForRestore(f, true);
|
setFreqOffsetForRestore(f, true);
|
||||||
@ -9161,7 +9161,7 @@ void MainWindow::displayBandActivity() {
|
|||||||
if (!isOffsetSelected && activityAging && item.utcTimestamp.secsTo(now) / 60 >= activityAging) {
|
if (!isOffsetSelected && activityAging && item.utcTimestamp.secsTo(now) / 60 >= activityAging) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!pingEnabled && (item.text.contains(": PING") || item.text.contains("PING ACK"))){
|
if (!pingEnabled && (item.text.contains(": HEARTBEAT") || item.text.contains("HEARTBEAT ACK"))){
|
||||||
// hide pings if we're not pinging.
|
// hide pings if we're not pinging.
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -9480,7 +9480,7 @@ void MainWindow::networkMessage(Message const &message)
|
|||||||
|
|
||||||
auto type = message.type();
|
auto type = message.type();
|
||||||
|
|
||||||
if(type == "PING"){
|
if(type == "HEARTBEAT"){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
16
varicode.cpp
16
varicode.cpp
@ -59,9 +59,9 @@ QMap<QString, int> directed_cmds = {
|
|||||||
{" ACTIVE", 10 }, // i have been active in the past 10 minutes
|
{" ACTIVE", 10 }, // i have been active in the past 10 minutes
|
||||||
{" IDLE", 11 }, // i have not been active in the past 10 minutes
|
{" IDLE", 11 }, // i have not been active in the past 10 minutes
|
||||||
|
|
||||||
{" PING", -1 }, // this is my ping (unused except for faux processing of pings as directed commands)
|
{" HEARTBEAT", -1 }, // this is my ping (unused except for faux processing of pings as directed commands)
|
||||||
{" PING ACK", 12 }, // i acknowledge your ping at this SNR
|
{" HEARTBEAT ACK", 12 }, // i acknowledge your ping at this SNR
|
||||||
{" PING REQ", 13 }, // can you transmit a ping to callsign?
|
{" HEARTBEAT REQ", 13 }, // can you transmit a ping to callsign?
|
||||||
|
|
||||||
{" APRS:", 14 }, // send an aprs packet
|
{" APRS:", 14 }, // send an aprs packet
|
||||||
|
|
||||||
@ -100,7 +100,7 @@ QMap<int, int> checksum_cmds = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
QString callsign_pattern = QString("(?<callsign>[@]?[A-Z0-9/]+)");
|
QString callsign_pattern = QString("(?<callsign>[@]?[A-Z0-9/]+)");
|
||||||
QString optional_cmd_pattern = QString("(?<cmd>\\s?(?:PING (ACK|REQ)|AGN[?]|QSL[?]|HW CPY[?]|APRS[:]|QRZ[?]|(?:(?:ACK|73|YES|NO|SNR|QSL|RR|SK|FB|QTH|QTC|GRID|ACTIVE|IDLE)(?=[ ]|$))|[?@&$%#^>* ]))?");
|
QString optional_cmd_pattern = QString("(?<cmd>\\s?(?:HEARTBEAT (ACK|REQ)|AGN[?]|QSL[?]|HW CPY[?]|APRS[:]|QRZ[?]|(?:(?:ACK|73|YES|NO|SNR|QSL|RR|SK|FB|QTH|QTC|GRID|ACTIVE|IDLE)(?=[ ]|$))|[?@&$%#^>* ]))?");
|
||||||
QString optional_grid_pattern = QString("(?<grid>\\s?[A-R]{2}[0-9]{2})?");
|
QString optional_grid_pattern = QString("(?<grid>\\s?[A-R]{2}[0-9]{2})?");
|
||||||
QString optional_extended_grid_pattern = QString("^(?<grid>\\s?(?:[A-R]{2}[0-9]{2}(?:[A-X]{2}(?:[0-9]{2})?)*))?");
|
QString optional_extended_grid_pattern = QString("^(?<grid>\\s?(?:[A-R]{2}[0-9]{2}(?:[A-X]{2}(?:[0-9]{2})?)*))?");
|
||||||
QString optional_num_pattern = QString("(?<num>(?<=SNR|ACK)\\s?[-+]?(?:3[01]|[0-2]?[0-9]))?");
|
QString optional_num_pattern = QString("(?<num>(?<=SNR|ACK)\\s?[-+]?(?:3[01]|[0-2]?[0-9]))?");
|
||||||
@ -110,7 +110,7 @@ QRegularExpression directed_re("^" +
|
|||||||
optional_cmd_pattern +
|
optional_cmd_pattern +
|
||||||
optional_num_pattern);
|
optional_num_pattern);
|
||||||
|
|
||||||
QRegularExpression heartbeat_re(R"(^\s*(?<type>CQCQCQ|CQ QRPP?|CQ DX|CQ TEST|CQ( CQ){0,2}|PING)(?:\s(?<grid>[A-R]{2}[0-9]{2}))?\b)");
|
QRegularExpression heartbeat_re(R"(^\s*(?<type>CQCQCQ|CQ QRPP?|CQ DX|CQ TEST|CQ( CQ){0,2}|HEARTBEAT)(?:\s(?<grid>[A-R]{2}[0-9]{2}))?\b)");
|
||||||
|
|
||||||
QRegularExpression compound_re("^\\s*[`]" +
|
QRegularExpression compound_re("^\\s*[`]" +
|
||||||
callsign_pattern +
|
callsign_pattern +
|
||||||
@ -1107,7 +1107,7 @@ bool Varicode::isCompoundCallsign(const QString &callsign){
|
|||||||
// CQCQCQ EM73
|
// CQCQCQ EM73
|
||||||
// CQ DX EM73
|
// CQ DX EM73
|
||||||
// CQ QRP EM73
|
// CQ QRP EM73
|
||||||
// PING EM73
|
// HEARTBEAT EM73
|
||||||
QString Varicode::packHeartbeatMessage(QString const &text, const QString &callsign, int *n){
|
QString Varicode::packHeartbeatMessage(QString const &text, const QString &callsign, int *n){
|
||||||
QString frame;
|
QString frame;
|
||||||
|
|
||||||
@ -1121,7 +1121,7 @@ QString Varicode::packHeartbeatMessage(QString const &text, const QString &calls
|
|||||||
|
|
||||||
// Heartbeat Alt Type
|
// Heartbeat Alt Type
|
||||||
// ---------------
|
// ---------------
|
||||||
// 1 0 PING
|
// 1 0 HEARTBEAT
|
||||||
// 1 1 CQCQCQ
|
// 1 1 CQCQCQ
|
||||||
|
|
||||||
auto type = parsedText.captured("type");
|
auto type = parsedText.captured("type");
|
||||||
@ -1649,7 +1649,7 @@ QStringList Varicode::buildMessageFrames(
|
|||||||
if(!selectedCall.isEmpty() && !line.startsWith(selectedCall) && !line.startsWith("`")){
|
if(!selectedCall.isEmpty() && !line.startsWith(selectedCall) && !line.startsWith("`")){
|
||||||
bool lineStartsWithBaseCall = (
|
bool lineStartsWithBaseCall = (
|
||||||
line.startsWith("@ALLCALL") ||
|
line.startsWith("@ALLCALL") ||
|
||||||
line.startsWith("PING") ||
|
line.startsWith("HEARTBEAT") ||
|
||||||
Varicode::startsWithCQ(line)
|
Varicode::startsWithCQ(line)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user