kopia lustrzana https://github.com/f4exb/sdrangel
				
				
				
			Fixed narrowing warning when Rx sample size is 16 bits
							rodzic
							
								
									4059a0be27
								
							
						
					
					
						commit
						ce2aad5a7a
					
				| 
						 | 
				
			
			@ -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];
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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};
 | 
			
		||||
                    }
 | 
			
		||||
                );
 | 
			
		||||
            }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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};
 | 
			
		||||
                }
 | 
			
		||||
            );
 | 
			
		||||
        }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Ładowanie…
	
		Reference in New Issue