mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-05-23 10:48:41 -04:00
Fix gcc warnings
This commit is contained in:
parent
37a19dee04
commit
24d8da247c
@ -287,12 +287,14 @@ void DATVModGUI::on_modulation_currentIndexChanged(int index)
|
||||
|
||||
void DATVModGUI::on_rollOff_currentIndexChanged(int index)
|
||||
{
|
||||
(void) index;
|
||||
m_settings.m_rollOff = ui->rollOff->currentText().toFloat();
|
||||
applySettings();
|
||||
}
|
||||
|
||||
void DATVModGUI::on_fec_currentIndexChanged(int index)
|
||||
{
|
||||
(void) index;
|
||||
m_settings.m_fec = DATVModSettings::mapCodeRate(ui->fec->currentText());
|
||||
applySettings();
|
||||
}
|
||||
|
@ -95,6 +95,27 @@ int DATVModSource::getDVBSDataBitrate(const DATVModSettings& settings)
|
||||
case DATVModSettings::FEC78:
|
||||
convFactor = 7.0f/8.0f;
|
||||
break;
|
||||
case DATVModSettings::FEC45:
|
||||
convFactor = 4.0f/5.0f;
|
||||
break;
|
||||
case DATVModSettings::FEC89:
|
||||
convFactor = 8.0f/9.0f;
|
||||
break;
|
||||
case DATVModSettings::FEC910:
|
||||
convFactor = 9.0f/10.0f;
|
||||
break;
|
||||
case DATVModSettings::FEC14:
|
||||
convFactor = 1.0f/4.0f;
|
||||
break;
|
||||
case DATVModSettings::FEC13:
|
||||
convFactor = 1.0f/3.0f;
|
||||
break;
|
||||
case DATVModSettings::FEC25:
|
||||
convFactor = 2.0f/5.0f;
|
||||
break;
|
||||
case DATVModSettings::FEC35:
|
||||
convFactor = 3.0f/5.0f;
|
||||
break;
|
||||
}
|
||||
switch (settings.m_modulation)
|
||||
{
|
||||
@ -107,6 +128,12 @@ int DATVModSource::getDVBSDataBitrate(const DATVModSettings& settings)
|
||||
case DATVModSettings::PSK8:
|
||||
bitsPerSymbol = 3.0f;
|
||||
break;
|
||||
case DATVModSettings::APSK16:
|
||||
bitsPerSymbol = 4.0f;
|
||||
break;
|
||||
case DATVModSettings::APSK32:
|
||||
bitsPerSymbol = 5.0f;
|
||||
break;
|
||||
}
|
||||
|
||||
return std::round(settings.m_symbolRate * bitsPerSymbol * rsFactor * convFactor);
|
||||
@ -255,10 +282,10 @@ void DATVModSource::modulateSample()
|
||||
int size = ba.size();
|
||||
char *data = ba.data();
|
||||
|
||||
if (size <= sizeof(m_udpBuffer))
|
||||
if (size <= (int)sizeof(m_udpBuffer))
|
||||
{
|
||||
memcpy(m_mpegTS, data, sizeof(m_mpegTS));
|
||||
if (size >= sizeof(m_mpegTS))
|
||||
if (size >= (int)sizeof(m_mpegTS))
|
||||
memcpy(&m_udpBuffer[0], &data[sizeof(m_mpegTS)], size - sizeof(m_mpegTS));
|
||||
m_udpBufferIdx = 0;
|
||||
m_udpBufferCount = (size / sizeof(m_mpegTS)) - 1;
|
||||
|
@ -134,7 +134,7 @@ public:
|
||||
private:
|
||||
std::vector<Real> m_taps;
|
||||
std::vector<Type> m_samples;
|
||||
int m_ptr;
|
||||
unsigned int m_ptr;
|
||||
};
|
||||
|
||||
#endif // INCLUDE_RAISEDCOSINE_H
|
||||
|
@ -56,8 +56,6 @@ public:
|
||||
m_taps.resize(nTaps / 2 + 1);
|
||||
|
||||
// calculate filter taps
|
||||
double Ne = (nTaps-1) / 2;
|
||||
|
||||
for(i = 0; i < nTaps / 2 + 1; i++)
|
||||
{
|
||||
double t = (i - (nTaps / 2)) / (double)samplesPerSymbol;
|
||||
@ -136,7 +134,7 @@ public:
|
||||
private:
|
||||
std::vector<Real> m_taps;
|
||||
std::vector<Type> m_samples;
|
||||
int m_ptr;
|
||||
unsigned int m_ptr;
|
||||
};
|
||||
|
||||
#endif // INCLUDE_ROOTRAISEDCOSINE_H
|
||||
|
Loading…
x
Reference in New Issue
Block a user