mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-15 12:51:49 -05:00
Fix 8333 channels.
This commit is contained in:
parent
bb2655cd51
commit
51ddd77aa3
@ -15,6 +15,8 @@
|
|||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include <cmath>
|
||||||
|
|
||||||
#include "freqscanneraddrangedialog.h"
|
#include "freqscanneraddrangedialog.h"
|
||||||
#include "ui_freqscanneraddrangedialog.h"
|
#include "ui_freqscanneraddrangedialog.h"
|
||||||
|
|
||||||
@ -79,12 +81,22 @@ void FreqScannerAddRangeDialog::accept()
|
|||||||
int step = ui->step->currentText().toInt();
|
int step = ui->step->currentText().toInt();
|
||||||
|
|
||||||
if ((start <= stop) && (step > 0))
|
if ((start <= stop) && (step > 0))
|
||||||
|
{
|
||||||
|
if (step == 8333)
|
||||||
|
{
|
||||||
|
double fstep = 8333 + 1.0/3.0; // float will give incorrect results
|
||||||
|
for (double f = start; f <= stop; f += fstep) {
|
||||||
|
m_frequencies.append(std::round(f));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
for (qint64 f = start; f <= stop; f += step) {
|
for (qint64 f = start; f <= stop; f += step) {
|
||||||
m_frequencies.append(f);
|
m_frequencies.append(f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
QDialog::accept();
|
QDialog::accept();
|
||||||
}
|
}
|
||||||
|
@ -122,7 +122,7 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>8333.3</string>
|
<string>8333</string>
|
||||||
</property>
|
</property>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
Loading…
Reference in New Issue
Block a user