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"
|
||||||
|
|
||||||
@ -80,8 +82,18 @@ void FreqScannerAddRangeDialog::accept()
|
|||||||
|
|
||||||
if ((start <= stop) && (step > 0))
|
if ((start <= stop) && (step > 0))
|
||||||
{
|
{
|
||||||
for (qint64 f = start; f <= stop; f += step) {
|
if (step == 8333)
|
||||||
m_frequencies.append(f);
|
{
|
||||||
|
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) {
|
||||||
|
m_frequencies.append(f);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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