1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-12-23 01:55:48 -05:00

Merge pull request #1857 from das-Iro/fix-typecast

Add explicit typecasting that was missing
This commit is contained in:
Edouard Griffiths 2023-10-24 17:40:05 +02:00 committed by GitHub
commit 1d3c366c9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -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();

View File

@ -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) {