Added save directory. Tweaked groupcall Hz

This commit is contained in:
Jordan Sherer 2018-10-06 09:06:47 -04:00
parent 48dbe28031
commit 286e32bf4e
3 changed files with 149 additions and 137 deletions

View File

@ -6875,6 +6875,10 @@ void MainWindow::on_actionOpen_log_directory_triggered ()
QDesktopServices::openUrl (QUrl::fromLocalFile (m_config.writeable_data_dir ().absolutePath ()));
}
void MainWindow::on_actionOpen_Save_Directory_triggered(){
QDesktopServices::openUrl (QUrl::fromLocalFile (m_config.save_directory().absolutePath ()));
}
void MainWindow::on_bandComboBox_currentIndexChanged (int index)
{
auto const& frequencies = m_config.frequencies ();
@ -9280,8 +9284,8 @@ void MainWindow::processCommandActivity() {
auto d = m_rxCommandQueue.dequeue();
bool isAllCall = isAllCallIncluded(d.to);
bool isGroupCall = isGroupCallIncluded(d.to);
bool isNear = abs(d.freq - currentFreqOffset()) <= 150;
bool isNear = abs(d.freq - currentFreqOffset()) <= 110; // 100Hz + a 10Hz buffer
bool isGroupCall = isGroupCallIncluded(d.to) && isNear;
qDebug() << "try processing command" << d.from << d.to << d.cmd << d.freq << d.grid << d.extra;
@ -9310,11 +9314,11 @@ void MainWindow::processCommandActivity() {
logCallActivity(cd, true);
// we're only responding to allcall, groupcalls near us, and our callsign at this point, so we'll end after logging the callsigns we've heard
if (!isAllCall && !toMe && !(isGroupCall && isNear)) {
if (!isAllCall && !toMe && !isGroupCall) {
continue;
}
// if selcal is enabled and this isnt directed to us, take no action.
// if selcal is enabled and this is an allcall, take no action.
if (isAllCall && ui->selcalButton->isChecked()) {
continue;
}
@ -9483,7 +9487,7 @@ void MainWindow::processCommandActivity() {
#endif
// PROCESS RELAY
else if (d.cmd == ">" && !isAllCall) {
else if (d.cmd == ">" && !isAllCall && !isGroupCall) {
// 1. see if there are any more hops to process
// 2. if so, forward
@ -9536,7 +9540,7 @@ void MainWindow::processCommandActivity() {
}
// PROCESS AGN
else if (d.cmd == " AGN?" && !isAllCall && !m_lastTxMessage.isEmpty()) {
else if (d.cmd == " AGN?" && !isAllCall && !isGroupCall && !m_lastTxMessage.isEmpty()) {
reply = m_lastTxMessage;
}

View File

@ -200,6 +200,7 @@ private slots:
void on_actionDecode_remaining_files_in_directory_triggered();
void on_actionDelete_all_wav_files_in_SaveDir_triggered();
void on_actionOpen_log_directory_triggered ();
void on_actionOpen_Save_Directory_triggered();
void on_actionNone_triggered();
void on_actionSave_all_triggered();
void on_actionKeyboard_shortcuts_triggered();

View File

@ -798,69 +798,6 @@ background-color: #6699ff;
</property>
</spacer>
</item>
<item row="4" column="3">
<widget class="QPushButton" name="beaconButton">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>75</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Enable or disable the automatic beacon&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
font-family: helvetica;
font-weight: bold;
background-color: lightgray;
color: black;
border-style: solid;
border-radius:2px;
border-width:0px;
border-color: gray;
font-size:90%;
min-width:75px;
min-height:30px;
/*max-width:60px;*/
max-height:30px;
}
QPushButton[state=&quot;error&quot;] {
background-color: red;
}
QPushButton[state=&quot;warning&quot;] {
background-color: orange;
}
QPushButton[state=&quot;ok&quot;] {
background-color: #00ff00;
}
QPushButton:checked {
background-color: #6699ff;
}</string>
</property>
<property name="text">
<string>BEACON</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item row="4" column="2">
<widget class="QPushButton" name="autoReplyButton">
<property name="enabled">
@ -924,72 +861,6 @@ background-color: #6699ff;
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QPushButton" name="selcalButton">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>75</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="visible">
<bool>true</bool>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Enable or disable selective calling (i.e., only directed messages to you will be displayed in the RX area)&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
font-family: helvetica;
font-weight: bold;
background-color: lightgray;
color: black;
border-style: solid;
border-radius:2px;
border-width:0px;
border-color: gray;
font-size:90%;
min-width:75px;
min-height:30px;
/*max-width:60px;*/
max-height:30px;
}
QPushButton[state=&quot;error&quot;] {
background-color: red;
}
QPushButton[state=&quot;warning&quot;] {
background-color: orange;
}
QPushButton[state=&quot;ok&quot;] {
background-color: #00ff00;
}
QPushButton:checked {
background-color: #6699ff;
}</string>
</property>
<property name="text">
<string>SELCAL</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QPushButton" name="spotButton">
<property name="enabled">
@ -1113,6 +984,135 @@ background-color: #00ff00;
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QPushButton" name="beaconButton">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>75</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Enable or disable the automatic beacon&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
font-family: helvetica;
font-weight: bold;
background-color: lightgray;
color: black;
border-style: solid;
border-radius:2px;
border-width:0px;
border-color: gray;
font-size:90%;
min-width:75px;
min-height:30px;
/*max-width:60px;*/
max-height:30px;
}
QPushButton[state=&quot;error&quot;] {
background-color: red;
}
QPushButton[state=&quot;warning&quot;] {
background-color: orange;
}
QPushButton[state=&quot;ok&quot;] {
background-color: #00ff00;
}
QPushButton:checked {
background-color: #6699ff;
}</string>
</property>
<property name="text">
<string>BEACON</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item row="4" column="3">
<widget class="QPushButton" name="selcalButton">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>75</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="visible">
<bool>true</bool>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Enable or disable selective calling (i.e., only directed messages to you will be displayed in the RX area)&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
font-family: helvetica;
font-weight: bold;
background-color: lightgray;
color: black;
border-style: solid;
border-radius:2px;
border-width:0px;
border-color: gray;
font-size:90%;
min-width:75px;
min-height:30px;
/*max-width:60px;*/
max-height:30px;
}
QPushButton[state=&quot;error&quot;] {
background-color: red;
}
QPushButton[state=&quot;warning&quot;] {
background-color: orange;
}
QPushButton[state=&quot;ok&quot;] {
background-color: #00ff00;
}
QPushButton:checked {
background-color: #6699ff;
}</string>
</property>
<property name="text">
<string>SELCAL</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
@ -4644,6 +4644,8 @@ list. The list can be maintained in Settings (F2).</string>
<addaction name="actionSave_decoded"/>
<addaction name="actionSave_all"/>
<addaction name="separator"/>
<addaction name="actionOpen_Save_Directory"/>
<addaction name="separator"/>
<addaction name="actionDelete_all_wav_files_in_SaveDir"/>
</widget>
<widget class="QMenu" name="menuHelp">
@ -4820,7 +4822,7 @@ list. The list can be maintained in Settings (F2).</string>
<bool>true</bool>
</property>
<property name="text">
<string>Delete all *.wav files in SaveDir</string>
<string>Delete all *.wav files in Save Directory</string>
</property>
</action>
<action name="actionQuickDecode">
@ -5125,7 +5127,7 @@ list. The list can be maintained in Settings (F2).</string>
</action>
<action name="actionOpen_log_directory">
<property name="text">
<string>Open log directory</string>
<string>Open Log Directory...</string>
</property>
</action>
<action name="actionJT4">
@ -5466,6 +5468,11 @@ list. The list can be maintained in Settings (F2).</string>
<enum>Qt::WindowShortcut</enum>
</property>
</action>
<action name="actionOpen_Save_Directory">
<property name="text">
<string>Open Save Directory...</string>
</property>
</action>
</widget>
<layoutdefault spacing="6" margin="11"/>
<customwidgets>