Fixed narrowing warning when Rx sample size is 16 bits

pull/724/head
f4exb 2020-11-24 00:02:44 +01:00
rodzic 4059a0be27
commit ce2aad5a7a
4 zmienionych plików z 14 dodań i 14 usunięć

Wyświetl plik

@ -48,7 +48,7 @@ void ChirpChatDemodDecoderTTY::decodeSymbols(const std::vector<unsigned short>&
}
else
{
char asciiChar = -1;
signed char asciiChar = -1;
if (ttyState == TTYLetters) {
asciiChar = ttyLetters[(int) ttyChar];

Wyświetl plik

@ -583,7 +583,9 @@ void MetisMISOUDPHandler::processIQBuffer(unsigned char* buffer)
{
if (m_settings.m_log2Decim == 0) // no decimation - direct conversion
{
m_convertBuffer[r][m_sampleCount] = getRxIQInversion(r) ? Sample{sampleQ, sampleI} : Sample{sampleI, sampleQ};
m_convertBuffer[r][m_sampleCount] = getRxIQInversion(r)
? Sample{(FixReal) sampleQ, (FixReal) sampleI}
: Sample{(FixReal) sampleI, (FixReal) sampleQ};
samplesAdded = 1;
}
else

Wyświetl plik

@ -453,12 +453,11 @@ void DSPDeviceMIMOEngine::workSamplesSource(SampleVector& data, unsigned int iBe
begin,
begin,
[this](Sample& a, const Sample& b) -> Sample {
int den = m_sumIndex + 1; // at each stage scale sum by n/n+1 and input by 1/n+1
int nom = m_sumIndex; // so that final sum is scaled by N (number of channels)
return Sample{
a.real()/den + nom*(b.real()/den),
a.imag()/den + nom*(b.imag()/den)
};
FixReal den = m_sumIndex + 1; // at each stage scale sum by n/n+1 and input by 1/n+1
FixReal nom = m_sumIndex; // so that final sum is scaled by N (number of channels)
FixReal x = a.real()/den + nom*(b.real()/den);
FixReal y = a.imag()/den + nom*(b.imag()/den);
return Sample{x, y};
}
);
}

Wyświetl plik

@ -222,12 +222,11 @@ void DSPDeviceSinkEngine::workSamples(SampleVector& data, unsigned int iBegin, u
data.begin() + iBegin,
data.begin() + iBegin,
[this](Sample& a, const Sample& b) -> Sample {
int den = m_sumIndex + 1; // at each stage scale sum by n/n+1 and input by 1/n+1
int nom = m_sumIndex; // so that final sum is scaled by N (number of channels)
return Sample{
a.real()/den + nom*(b.real()/den),
a.imag()/den + nom*(b.imag()/den)
};
FixReal den = m_sumIndex + 1; // at each stage scale sum by n/n+1 and input by 1/n+1
FixReal nom = m_sumIndex; // so that final sum is scaled by N (number of channels)
FixReal x = a.real()/den + nom*(b.real()/den);
FixReal y = a.imag()/den + nom*(b.imag()/den);
return Sample{x, y};
}
);
}