kopia lustrzana https://github.com/f4exb/sdrangel
				
				
				
			LimeSDR: apply settings with force on construction
							rodzic
							
								
									7577e6f145
								
							
						
					
					
						commit
						996f964435
					
				| 
						 | 
				
			
			@ -55,6 +55,8 @@ LimeSDROutput::LimeSDROutput(DeviceSinkAPI *deviceAPI) :
 | 
			
		|||
    openDevice();
 | 
			
		||||
    resumeTxBuddies();
 | 
			
		||||
    resumeRxBuddies();
 | 
			
		||||
 | 
			
		||||
    applySettings(m_settings, true, false);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
LimeSDROutput::~LimeSDROutput()
 | 
			
		||||
| 
						 | 
				
			
			@ -773,6 +775,8 @@ bool LimeSDROutput::applySettings(const LimeSDROutputSettings& settings, bool fo
 | 
			
		|||
    if ((m_settings.m_ncoFrequency != settings.m_ncoFrequency) ||
 | 
			
		||||
        (m_settings.m_ncoEnable != settings.m_ncoEnable) || force || forceNCOFrequency)
 | 
			
		||||
    {
 | 
			
		||||
        forwardChangeOwnDSP = true;
 | 
			
		||||
 | 
			
		||||
        if (m_deviceShared.m_deviceParams->getDevice() != 0 && m_channelAcquired)
 | 
			
		||||
        {
 | 
			
		||||
            if (DeviceLimeSDR::setNCOFrequency(m_deviceShared.m_deviceParams->getDevice(),
 | 
			
		||||
| 
						 | 
				
			
			@ -782,7 +786,6 @@ bool LimeSDROutput::applySettings(const LimeSDROutputSettings& settings, bool fo
 | 
			
		|||
                    settings.m_ncoFrequency))
 | 
			
		||||
            {
 | 
			
		||||
                //doCalibration = true;
 | 
			
		||||
                forwardChangeOwnDSP = true;
 | 
			
		||||
                m_deviceShared.m_ncoFrequency = settings.m_ncoEnable ? settings.m_ncoFrequency : 0; // for buddies
 | 
			
		||||
                qDebug("LimeSDROutput::applySettings: %sd and set NCO to %d Hz",
 | 
			
		||||
                        settings.m_ncoEnable ? "enable" : "disable",
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -61,6 +61,8 @@ LimeSDRInput::LimeSDRInput(DeviceSourceAPI *deviceAPI) :
 | 
			
		|||
    sprintf(recFileNameCStr, "test_%d.sdriq", m_deviceAPI->getDeviceUID());
 | 
			
		||||
    m_fileSink = new FileRecord(std::string(recFileNameCStr));
 | 
			
		||||
    m_deviceAPI->addSink(m_fileSink);
 | 
			
		||||
 | 
			
		||||
    applySettings(m_settings, true, false);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
LimeSDRInput::~LimeSDRInput()
 | 
			
		||||
| 
						 | 
				
			
			@ -923,6 +925,8 @@ bool LimeSDRInput::applySettings(const LimeSDRInputSettings& settings, bool forc
 | 
			
		|||
    if ((m_settings.m_ncoFrequency != settings.m_ncoFrequency) ||
 | 
			
		||||
        (m_settings.m_ncoEnable != settings.m_ncoEnable) || force || forceNCOFrequency)
 | 
			
		||||
    {
 | 
			
		||||
        forwardChangeOwnDSP = true;
 | 
			
		||||
 | 
			
		||||
        if (m_deviceShared.m_deviceParams->getDevice() != 0 && m_channelAcquired)
 | 
			
		||||
        {
 | 
			
		||||
            if (DeviceLimeSDR::setNCOFrequency(m_deviceShared.m_deviceParams->getDevice(),
 | 
			
		||||
| 
						 | 
				
			
			@ -932,7 +936,6 @@ bool LimeSDRInput::applySettings(const LimeSDRInputSettings& settings, bool forc
 | 
			
		|||
                    settings.m_ncoFrequency))
 | 
			
		||||
            {
 | 
			
		||||
                //doCalibration = true;
 | 
			
		||||
                forwardChangeOwnDSP = true;
 | 
			
		||||
                m_deviceShared.m_ncoFrequency = settings.m_ncoEnable ? settings.m_ncoFrequency : 0; // for buddies
 | 
			
		||||
                qDebug("LimeSDRInput::applySettings: %sd and set NCO to %d Hz",
 | 
			
		||||
                        settings.m_ncoEnable ? "enable" : "disable",
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Ładowanie…
	
		Reference in New Issue