kopia lustrzana https://github.com/f4exb/sdrangel
Fixed -Wtype-limits warnings
rodzic
7a6636b63a
commit
6285235257
|
@ -100,7 +100,7 @@ bool BeamSteeringCWModSettings::deserialize(const QByteArray& data)
|
|||
m_log2Interp = tmp > 6 ? 6 : tmp;
|
||||
d.readU32(13, &m_filterChainHash, 0);
|
||||
d.readS32(14, &stmp, 0);
|
||||
m_channelOutput = tmp < 0 ? 0 : tmp > 2 ? 2 : tmp;
|
||||
m_channelOutput = stmp < 0 ? 0 : stmp > 2 ? 2 : stmp;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -517,7 +517,7 @@ void ChirpChatDemod::webapiUpdateChannelSettings(
|
|||
if (channelSettingsKeys.contains("udpPort"))
|
||||
{
|
||||
uint16_t port = response.getChirpChatDemodSettings()->getUdpPort();
|
||||
settings.m_udpPort = port < 1024 ? 1024 : port > 65535 ? 65535 : port;
|
||||
settings.m_udpPort = port < 1024 ? 1024 : port;
|
||||
}
|
||||
if (channelSettingsKeys.contains("rgbColor")) {
|
||||
settings.m_rgbColor = response.getChirpChatDemodSettings()->getRgbColor();
|
||||
|
|
|
@ -320,12 +320,6 @@ void NFMDemodSink::applySettings(const NFMDemodSettings& settings, bool force)
|
|||
|
||||
void NFMDemodSink::applyAudioSampleRate(unsigned int sampleRate)
|
||||
{
|
||||
if (sampleRate < 0)
|
||||
{
|
||||
qWarning("NFMDemodSink::applyAudioSampleRate: invalid sample rate: %d", sampleRate);
|
||||
return;
|
||||
}
|
||||
|
||||
qDebug("NFMDemodSink::applyAudioSampleRate: %u m_channelSampleRate: %d", sampleRate, m_channelSampleRate);
|
||||
|
||||
m_filterTaps = (sampleRate / 48) | 1;
|
||||
|
|
|
@ -364,12 +364,6 @@ void FreeDVModSource::calculateLevel(qint16& sample)
|
|||
|
||||
void FreeDVModSource::applyAudioSampleRate(unsigned int sampleRate)
|
||||
{
|
||||
if (sampleRate < 0)
|
||||
{
|
||||
qWarning("FreeDVModSource::applyAudioSampleRate: invalid sample rate %d", sampleRate);
|
||||
return;
|
||||
}
|
||||
|
||||
qDebug("FreeDVModSource::applyAudioSampleRate: %d", sampleRate);
|
||||
// TODO: put up simple IIR interpolator when sampleRate < m_modemSampleRate
|
||||
|
||||
|
|
|
@ -104,7 +104,7 @@ void TestMOSyncWorker::setSamplerate(int samplerate)
|
|||
|
||||
void TestMOSyncWorker::setLog2Interpolation(unsigned int log2Interpolation)
|
||||
{
|
||||
if ((log2Interpolation < 0) || (log2Interpolation > 6)) {
|
||||
if (log2Interpolation > 6) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -349,7 +349,7 @@ void LimeRFEController::settingsToState(const LimeRFESettings& settings)
|
|||
}
|
||||
}
|
||||
|
||||
m_rfeBoardState.attValue = settings.m_attenuationFactor < 0 ? 0 : settings.m_attenuationFactor > 7 ? 7 : settings.m_attenuationFactor;
|
||||
m_rfeBoardState.attValue = settings.m_attenuationFactor > 7 ? 7 : settings.m_attenuationFactor;
|
||||
m_rfeBoardState.notchOnOff = settings.m_amfmNotch;
|
||||
m_rfeBoardState.enableSWR = settings.m_swrEnable ? RFE_SWR_ENABLE : RFE_SWR_DISABLE;
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue