diff --git a/plugins/channelrx/freqscanner/freqscanneraddrangedialog.cpp b/plugins/channelrx/freqscanner/freqscanneraddrangedialog.cpp index cdf24d2cb..124322fa3 100644 --- a/plugins/channelrx/freqscanner/freqscanneraddrangedialog.cpp +++ b/plugins/channelrx/freqscanner/freqscanneraddrangedialog.cpp @@ -15,6 +15,8 @@ // along with this program. If not, see . // /////////////////////////////////////////////////////////////////////////////////// +#include + #include "freqscanneraddrangedialog.h" #include "ui_freqscanneraddrangedialog.h" @@ -80,8 +82,18 @@ void FreqScannerAddRangeDialog::accept() if ((start <= stop) && (step > 0)) { - for (qint64 f = start; f <= stop; f += step) { - m_frequencies.append(f); + 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) { + m_frequencies.append(f); + } } } } diff --git a/plugins/channelrx/freqscanner/freqscanneraddrangedialog.ui b/plugins/channelrx/freqscanner/freqscanneraddrangedialog.ui index 73cd0a1aa..98cd619a9 100644 --- a/plugins/channelrx/freqscanner/freqscanneraddrangedialog.ui +++ b/plugins/channelrx/freqscanner/freqscanneraddrangedialog.ui @@ -122,7 +122,7 @@ - 8333.3 + 8333