Fixed ordering of filter controls and logic around min filter
This commit is contained in:
parent
98760a6d42
commit
d28d556309
@ -4410,8 +4410,11 @@ bool MainWindow::decodeProcessQueue(qint32 *pSubmode){
|
|||||||
dec_data.params.nfb=m_wideGraph->Fmax();
|
dec_data.params.nfb=m_wideGraph->Fmax();
|
||||||
|
|
||||||
if(m_wideGraph->filterEnabled()){
|
if(m_wideGraph->filterEnabled()){
|
||||||
dec_data.params.nfa=max(0, m_wideGraph->filterMinimum());
|
int low = max(0, m_wideGraph->filterMinimum());
|
||||||
dec_data.params.nfb=min(m_wideGraph->filterMaximum(), 5000);
|
int high = min(m_wideGraph->filterMaximum(), 5000);
|
||||||
|
|
||||||
|
dec_data.params.nfa=min(low, high);
|
||||||
|
dec_data.params.nfb=max(low, high);
|
||||||
}
|
}
|
||||||
|
|
||||||
//if(m_mode=="FT8" and m_config.bHound() and !ui->cbRxAll->isChecked()) dec_data.params.nfb=1000;
|
//if(m_mode=="FT8" and m_config.bHound() and !ui->cbRxAll->isChecked()) dec_data.params.nfb=1000;
|
||||||
@ -7543,6 +7546,8 @@ void MainWindow::on_actionJS8_triggered()
|
|||||||
m_wideGraph->setSubMode(m_nSubMode);
|
m_wideGraph->setSubMode(m_nSubMode);
|
||||||
#if JS8_ENFORCE_MINIMUM_FILTER_BANDWIDTH
|
#if JS8_ENFORCE_MINIMUM_FILTER_BANDWIDTH
|
||||||
m_wideGraph->setFilterMinimumBandwidth(computeBandwidthForSubmode(m_nSubMode) + 2*rxThreshold(m_nSubMode));
|
m_wideGraph->setFilterMinimumBandwidth(computeBandwidthForSubmode(m_nSubMode) + 2*rxThreshold(m_nSubMode));
|
||||||
|
#else
|
||||||
|
m_wideGraph->setFilterMinimumBandwidth(1);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool bVHF=m_config.enable_VHF_features();
|
bool bVHF=m_config.enable_VHF_features();
|
||||||
|
@ -403,12 +403,10 @@ void WideGraph::setFilter(int a, int b){
|
|||||||
int low = std::min(a, b);
|
int low = std::min(a, b);
|
||||||
int high = std::max(a, b);
|
int high = std::max(a, b);
|
||||||
|
|
||||||
#if JS8_ENFORCE_MINIMUM_FILTER_BANDWIDTH
|
|
||||||
// ensure minimum filter width
|
// ensure minimum filter width
|
||||||
if(high-low < m_filterMinWidth){
|
if(high-low < m_filterMinWidth){
|
||||||
high = low + m_filterMinWidth;
|
high = low + m_filterMinWidth;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
int width = high - low;
|
int width = high - low;
|
||||||
int center = low + width / 2;
|
int center = low + width / 2;
|
||||||
@ -740,11 +738,11 @@ void WideGraph::on_sbPercent2dPlot_valueChanged(int n)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void WideGraph::on_filterMinSpinBox_valueChanged(int n){
|
void WideGraph::on_filterMinSpinBox_valueChanged(int n){
|
||||||
setFilter(n, m_filterMaximum);
|
setFilter(n, std::max(m_filterMaximum, n));
|
||||||
}
|
}
|
||||||
|
|
||||||
void WideGraph::on_filterMaxSpinBox_valueChanged(int n){
|
void WideGraph::on_filterMaxSpinBox_valueChanged(int n){
|
||||||
setFilter(m_filterMinimum, n);
|
setFilter(std::min(m_filterMinimum, n), n);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WideGraph::on_filterCenterSpinBox_valueChanged(int n){
|
void WideGraph::on_filterCenterSpinBox_valueChanged(int n){
|
||||||
|
90
widegraph.ui
90
widegraph.ui
@ -172,7 +172,7 @@
|
|||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>-196</y>
|
<y>-195</y>
|
||||||
<width>267</width>
|
<width>267</width>
|
||||||
<height>402</height>
|
<height>402</height>
|
||||||
</rect>
|
</rect>
|
||||||
@ -269,6 +269,53 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QSpinBox" name="filterCenterSpinBox">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="buttonSymbols">
|
||||||
|
<enum>QAbstractSpinBox::PlusMinus</enum>
|
||||||
|
</property>
|
||||||
|
<property name="suffix">
|
||||||
|
<string> Hz</string>
|
||||||
|
</property>
|
||||||
|
<property name="prefix">
|
||||||
|
<string>Center: </string>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>5000</number>
|
||||||
|
</property>
|
||||||
|
<property name="singleStep">
|
||||||
|
<number>1</number>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>1500</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QSpinBox" name="filterWidthSpinBox">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="buttonSymbols">
|
||||||
|
<enum>QAbstractSpinBox::PlusMinus</enum>
|
||||||
|
</property>
|
||||||
|
<property name="suffix">
|
||||||
|
<string> Hz</string>
|
||||||
|
</property>
|
||||||
|
<property name="prefix">
|
||||||
|
<string>Width: </string>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>5000</number>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>2000</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QSpinBox" name="filterMinSpinBox">
|
<widget class="QSpinBox" name="filterMinSpinBox">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
@ -325,47 +372,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QSpinBox" name="filterCenterSpinBox">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="suffix">
|
|
||||||
<string> Hz</string>
|
|
||||||
</property>
|
|
||||||
<property name="prefix">
|
|
||||||
<string>Center: </string>
|
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
|
||||||
<number>5000</number>
|
|
||||||
</property>
|
|
||||||
<property name="singleStep">
|
|
||||||
<number>1</number>
|
|
||||||
</property>
|
|
||||||
<property name="value">
|
|
||||||
<number>1500</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QSpinBox" name="filterWidthSpinBox">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="suffix">
|
|
||||||
<string> Hz</string>
|
|
||||||
</property>
|
|
||||||
<property name="prefix">
|
|
||||||
<string>Width: </string>
|
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
|
||||||
<number>5000</number>
|
|
||||||
</property>
|
|
||||||
<property name="value">
|
|
||||||
<number>1000</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
Loading…
Reference in New Issue
Block a user