mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-16 05:11:49 -05:00
Merge pull request #1857 from das-Iro/fix-typecast
Add explicit typecasting that was missing
This commit is contained in:
commit
1d3c366c9a
@ -864,7 +864,7 @@ void GLSpectrumGUI::setAveragingToolitp()
|
||||
{
|
||||
QString s;
|
||||
int averagingIndex = m_settings.m_averagingMode == SpectrumSettings::AvgModeNone ? 0 : m_settings.m_averagingIndex;
|
||||
float overlapFactor = (m_settings.m_fftSize - m_settings.m_fftOverlap) / m_settings.m_fftSize;
|
||||
float overlapFactor = (m_settings.m_fftSize - m_settings.m_fftOverlap) / (float)m_settings.m_fftSize;
|
||||
float averagingTime = (m_settings.m_fftSize * (SpectrumSettings::getAveragingValue(averagingIndex, m_settings.m_averagingMode) == 0 ?
|
||||
1 :
|
||||
SpectrumSettings::getAveragingValue(averagingIndex, m_settings.m_averagingMode))) / (float) m_glSpectrum->getSampleRate();
|
||||
|
@ -2735,7 +2735,7 @@ void GLSpectrumView::applyChanges()
|
||||
float timeScaleDiv = ((float)m_sampleRate / (float)m_timingRate);
|
||||
|
||||
if (m_fftSize > m_fftOverlap) {
|
||||
timeScaleDiv *= m_fftSize / (m_fftSize - m_fftOverlap);
|
||||
timeScaleDiv *= m_fftSize / (float)(m_fftSize - m_fftOverlap);
|
||||
}
|
||||
|
||||
if (!m_invertedWaterfall) {
|
||||
@ -2828,7 +2828,7 @@ void GLSpectrumView::applyChanges()
|
||||
float timeScaleDiv = ((float)m_sampleRate / (float)m_timingRate);
|
||||
|
||||
if (m_fftSize > m_fftOverlap) {
|
||||
timeScaleDiv *= m_fftSize / (m_fftSize - m_fftOverlap);
|
||||
timeScaleDiv *= m_fftSize / (float)(m_fftSize - m_fftOverlap);
|
||||
}
|
||||
|
||||
if (!m_invertedWaterfall) {
|
||||
|
Loading…
Reference in New Issue
Block a user