Added more sane defaults to tx watchdog. Fixed bug in relay disabled when no relay required
This commit is contained in:
parent
df0b06ccb7
commit
fddca6522e
@ -1587,6 +1587,9 @@ void Configuration::impl::read_settings ()
|
||||
disable_TX_on_73_ = settings_->value ("73TxDisable", false).toBool ();
|
||||
beacon_ = settings_->value ("TxBeacon", 30).toInt ();
|
||||
watchdog_ = settings_->value ("TxWatchdog", 0).toInt ();
|
||||
if(watchdog_){
|
||||
watchdog_ = qMax(5, watchdog_);
|
||||
}
|
||||
TX_messages_ = settings_->value ("Tx2QSO", true).toBool ();
|
||||
enable_VHF_features_ = settings_->value("VHFUHF",false).toBool ();
|
||||
decode_at_52s_ = settings_->value("Decode52",false).toBool ();
|
||||
|
@ -359,7 +359,7 @@
|
||||
<item>
|
||||
<widget class="QCheckBox" name="relay_disabled_check_box">
|
||||
<property name="text">
|
||||
<string>Disable message passing (>) when AUTO is enabled</string>
|
||||
<string>Disable message relay (>) when AUTO is enabled</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -571,6 +571,9 @@
|
||||
<property name="prefix">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>0</number>
|
||||
</property>
|
||||
|
@ -1406,6 +1406,10 @@ void MainWindow::initializeDummyData(){
|
||||
}
|
||||
|
||||
displayActivity(true);
|
||||
|
||||
QTimer::singleShot(10000, this, [this](){
|
||||
tx_watchdog(true);
|
||||
});
|
||||
}
|
||||
|
||||
void MainWindow::initialize_fonts ()
|
||||
@ -4682,6 +4686,10 @@ void MainWindow::guiUpdate()
|
||||
|
||||
void MainWindow::startTx()
|
||||
{
|
||||
if(m_tx_watchdog){
|
||||
return;
|
||||
}
|
||||
|
||||
if(!prepareNextMessageFrame()){
|
||||
return;
|
||||
}
|
||||
@ -4755,7 +4763,7 @@ void MainWindow::stopTx()
|
||||
tx_status_label.setText("");
|
||||
}
|
||||
|
||||
if(prepareNextMessageFrame()){
|
||||
if(!m_tx_watchdog && prepareNextMessageFrame()){
|
||||
continueTx();
|
||||
} else {
|
||||
// TODO: jsherer - split this up...
|
||||
@ -9506,7 +9514,7 @@ void MainWindow::processCommandActivity() {
|
||||
#endif
|
||||
|
||||
// PROCESS RELAY
|
||||
else if (d.cmd == ">" && !isAllCall && !m_config.relay_off()) {
|
||||
else if (d.cmd == ">" && !isAllCall) {
|
||||
|
||||
// 1. see if there are any more hops to process
|
||||
// 2. if so, forward
|
||||
@ -9517,8 +9525,8 @@ void MainWindow::processCommandActivity() {
|
||||
auto text = d.text;
|
||||
auto match = re.match(text);
|
||||
|
||||
// if the text starts with a callsign, relay.
|
||||
if(match.hasMatch()){
|
||||
// if the text starts with a callsign, and relay is not disabled, then relay.
|
||||
if(match.hasMatch() && !m_config.relay_off()){
|
||||
// replace freetext with relayed free text
|
||||
if(match.captured("type") != ">"){
|
||||
text = text.replace(match.capturedStart("type"), match.capturedLength("type"), ">");
|
||||
@ -10834,6 +10842,7 @@ void MainWindow::tx_watchdog (bool triggered)
|
||||
m_bTxTime=false;
|
||||
if (m_tune) stop_tuning ();
|
||||
if (m_auto) auto_tx_mode (false);
|
||||
stopTx();
|
||||
tx_status_label.setStyleSheet ("QLabel{background-color: #ff0000}");
|
||||
tx_status_label.setText ("Runaway Tx watchdog");
|
||||
QApplication::alert (this);
|
||||
|
Loading…
Reference in New Issue
Block a user