Updated configuration for beacon interval
This commit is contained in:
parent
f58ce3aec0
commit
145bc8d292
@ -560,6 +560,7 @@ private:
|
|||||||
bool miles_;
|
bool miles_;
|
||||||
bool quick_call_;
|
bool quick_call_;
|
||||||
bool disable_TX_on_73_;
|
bool disable_TX_on_73_;
|
||||||
|
int beacon_;
|
||||||
int watchdog_;
|
int watchdog_;
|
||||||
bool TX_messages_;
|
bool TX_messages_;
|
||||||
bool enable_VHF_features_;
|
bool enable_VHF_features_;
|
||||||
@ -661,6 +662,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::beacon () const {return m_->beacon_;}
|
||||||
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_;}
|
||||||
@ -1149,6 +1151,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_->beacon_spin_box->setValue (beacon_);
|
||||||
ui_->tx_watchdog_spin_box->setValue (watchdog_);
|
ui_->tx_watchdog_spin_box->setValue (watchdog_);
|
||||||
ui_->TX_messages_check_box->setChecked (TX_messages_);
|
ui_->TX_messages_check_box->setChecked (TX_messages_);
|
||||||
ui_->enable_VHF_features_check_box->setChecked(enable_VHF_features_);
|
ui_->enable_VHF_features_check_box->setChecked(enable_VHF_features_);
|
||||||
@ -1386,6 +1389,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 ();
|
||||||
|
beacon_ = settings_->value ("TxBeacon", 5).toInt ();
|
||||||
watchdog_ = settings_->value ("TxWatchdog", 6).toInt ();
|
watchdog_ = settings_->value ("TxWatchdog", 6).toInt ();
|
||||||
TX_messages_ = settings_->value ("Tx2QSO", true).toBool ();
|
TX_messages_ = settings_->value ("Tx2QSO", true).toBool ();
|
||||||
enable_VHF_features_ = settings_->value("VHFUHF",false).toBool ();
|
enable_VHF_features_ = settings_->value("VHFUHF",false).toBool ();
|
||||||
@ -1484,6 +1488,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", beacon_);
|
||||||
settings_->setValue ("TxWatchdog", watchdog_);
|
settings_->setValue ("TxWatchdog", 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);
|
||||||
@ -1891,6 +1896,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 ();
|
||||||
|
beacon_ = ui_->beacon_spin_box->value ();
|
||||||
watchdog_ = ui_->tx_watchdog_spin_box->value ();
|
watchdog_ = ui_->tx_watchdog_spin_box->value ();
|
||||||
TX_messages_ = ui_->TX_messages_check_box->isChecked ();
|
TX_messages_ = ui_->TX_messages_check_box->isChecked ();
|
||||||
data_mode_ = static_cast<DataMode> (ui_->TX_mode_button_group->checkedId ());
|
data_mode_ = static_cast<DataMode> (ui_->TX_mode_button_group->checkedId ());
|
||||||
|
@ -119,6 +119,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 beacon () const;
|
||||||
int watchdog () const;
|
int watchdog () const;
|
||||||
bool TX_messages () const;
|
bool TX_messages () const;
|
||||||
bool split_mode () const;
|
bool split_mode () const;
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>534</width>
|
<width>785</width>
|
||||||
<height>530</height>
|
<height>647</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@ -81,18 +81,18 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QFormLayout" name="formLayout_21">
|
<layout class="QFormLayout" name="formLayout_21">
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QCheckBox" name="use_dynamic_grid">
|
<widget class="QCheckBox" name="use_dynamic_grid">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Check to allow grid changes from external programs</string>
|
<string>Check to allow grid changes from external programs</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>AutoGrid</string>
|
<string>AutoGrid</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QFormLayout" name="formLayout_2">
|
<layout class="QFormLayout" name="formLayout_2">
|
||||||
@ -292,14 +292,46 @@
|
|||||||
<layout class="QGridLayout" name="gridLayout_8">
|
<layout class="QGridLayout" name="gridLayout_8">
|
||||||
<item row="4" column="1">
|
<item row="4" column="1">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_12">
|
<layout class="QHBoxLayout" name="horizontalLayout_12">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="beacon_label_10">
|
||||||
|
<property name="text">
|
||||||
|
<string>Beacon every:</string>
|
||||||
|
</property>
|
||||||
|
<property name="buddy">
|
||||||
|
<cstring>beacon_spin_box</cstring>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QSpinBox" name="beacon_spin_box">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string><html><head/><body><p>Number of minutes between unattended beacons</p></body></html></string>
|
||||||
|
</property>
|
||||||
|
<property name="suffix">
|
||||||
|
<string> minutes</string>
|
||||||
|
</property>
|
||||||
|
<property name="prefix">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<number>1</number>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>5</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="horizontalSpacer_7">
|
<spacer name="horizontalSpacer_7">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Fixed</enum>
|
||||||
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>0</width>
|
<width>40</width>
|
||||||
<height>0</height>
|
<height>0</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
@ -2768,12 +2800,12 @@ soundcard changes</string>
|
|||||||
</connection>
|
</connection>
|
||||||
</connections>
|
</connections>
|
||||||
<buttongroups>
|
<buttongroups>
|
||||||
<buttongroup name="CAT_data_bits_button_group"/>
|
|
||||||
<buttongroup name="PTT_method_button_group"/>
|
|
||||||
<buttongroup name="TX_audio_source_button_group"/>
|
|
||||||
<buttongroup name="split_mode_button_group"/>
|
|
||||||
<buttongroup name="CAT_stop_bits_button_group"/>
|
<buttongroup name="CAT_stop_bits_button_group"/>
|
||||||
<buttongroup name="CAT_handshake_button_group"/>
|
|
||||||
<buttongroup name="TX_mode_button_group"/>
|
<buttongroup name="TX_mode_button_group"/>
|
||||||
|
<buttongroup name="PTT_method_button_group"/>
|
||||||
|
<buttongroup name="CAT_data_bits_button_group"/>
|
||||||
|
<buttongroup name="split_mode_button_group"/>
|
||||||
|
<buttongroup name="CAT_handshake_button_group"/>
|
||||||
|
<buttongroup name="TX_audio_source_button_group"/>
|
||||||
</buttongroups>
|
</buttongroups>
|
||||||
</ui>
|
</ui>
|
||||||
|
@ -222,6 +222,17 @@ namespace
|
|||||||
widget->removeRow(i);
|
widget->removeRow(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int roundUp(int numToRound, int multiple)
|
||||||
|
{
|
||||||
|
if(multiple == 0)
|
||||||
|
{
|
||||||
|
return numToRound;
|
||||||
|
}
|
||||||
|
|
||||||
|
int roundDown = ( (int) (numToRound) / multiple) * multiple;
|
||||||
|
return roundDown + multiple;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------- MainWindow constructor
|
//--------------------------------------------------- MainWindow constructor
|
||||||
@ -5384,7 +5395,7 @@ void MainWindow::scheduleBeacon(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 ? m_txFirst ? 15 : 30 : 300) - secondsSinceEpoch;
|
int delta = roundUp(secondsSinceEpoch, 15) + 1 + (first ? m_txFirst ? 15 : 30 : qMax(1, m_config.beacon()) * 60) - secondsSinceEpoch;
|
||||||
timestamp = timestamp.addSecs(delta);
|
timestamp = timestamp.addSecs(delta);
|
||||||
|
|
||||||
// set the next beacon timestamp and timer
|
// set the next beacon timestamp and timer
|
||||||
|
12
mainwindow.h
12
mainwindow.h
@ -797,18 +797,6 @@ protected:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
static int roundUp(int numToRound, int multiple)
|
|
||||||
{
|
|
||||||
if(multiple == 0)
|
|
||||||
{
|
|
||||||
return numToRound;
|
|
||||||
}
|
|
||||||
|
|
||||||
int roundDown = ( (int) (numToRound) / multiple) * multiple;
|
|
||||||
return roundDown + multiple;
|
|
||||||
}
|
|
||||||
|
|
||||||
extern int killbyname(const char* progName);
|
extern int killbyname(const char* progName);
|
||||||
extern void getDev(int* numDevices,char hostAPI_DeviceName[][50],
|
extern void getDev(int* numDevices,char hostAPI_DeviceName[][50],
|
||||||
int minChan[], int maxChan[],
|
int minChan[], int maxChan[],
|
||||||
|
Loading…
Reference in New Issue
Block a user