mirror of
				https://github.com/f4exb/sdrangel.git
				synced 2025-10-31 13:00:26 -04:00 
			
		
		
		
	LimeSDR: added soft decimation/interpolation by 64
This commit is contained in:
		
							parent
							
								
									a159e72e20
								
							
						
					
					
						commit
						10cbfb3b44
					
				| @ -395,7 +395,7 @@ void LimeSDROutputGUI::on_hwInterp_currentIndexChanged(int index) | ||||
| 
 | ||||
| void LimeSDROutputGUI::on_swInterp_currentIndexChanged(int index) | ||||
| { | ||||
|     if ((index <0) || (index > 5)) | ||||
|     if ((index <0) || (index > 6)) | ||||
|         return; | ||||
|     m_settings.m_log2SoftInterp = index; | ||||
|     sendSettings(); | ||||
|  | ||||
| @ -295,7 +295,7 @@ | ||||
|         <string>TSP hardware interpolation factor</string> | ||||
|        </property> | ||||
|        <property name="currentIndex"> | ||||
|         <number>2</number> | ||||
|         <number>0</number> | ||||
|        </property> | ||||
|        <item> | ||||
|         <property name="text"> | ||||
| @ -383,6 +383,11 @@ | ||||
|          <string>32</string> | ||||
|         </property> | ||||
|        </item> | ||||
|        <item> | ||||
|         <property name="text"> | ||||
|          <string>64</string> | ||||
|         </property> | ||||
|        </item> | ||||
|       </widget> | ||||
|      </item> | ||||
|      <item> | ||||
|  | ||||
| @ -30,7 +30,7 @@ | ||||
| 
 | ||||
| const PluginDescriptor LimeSDROutputPlugin::m_pluginDescriptor = { | ||||
|     QString("LimeSDR Output"), | ||||
|     QString("3.4.0"), | ||||
|     QString("3.4.4"), | ||||
|     QString("(c) Edouard Griffiths, F4EXB"), | ||||
|     QString("https://github.com/f4exb/sdrangel"), | ||||
|     true, | ||||
|  | ||||
| @ -84,9 +84,9 @@ void LimeSDROutputThread::run() | ||||
|     } | ||||
| 
 | ||||
|     count = 0; | ||||
|     msleep = LIMESDROUTPUT_BLOCKSIZE/(m_sampleRate/1e6f); | ||||
|     mdelta = msleep/100; | ||||
|     msleep = (3*msleep)/4; // to start faster
 | ||||
| //    msleep = LIMESDROUTPUT_BLOCKSIZE/(m_sampleRate/1e6f);
 | ||||
| //    mdelta = msleep/100;
 | ||||
| //    msleep = (3*msleep)/4; // to start faster
 | ||||
| 
 | ||||
|     while (m_running) | ||||
|     { | ||||
| @ -104,25 +104,25 @@ void LimeSDROutputThread::run() | ||||
|             qDebug("LimeSDROutputThread::run written %d/%d samples", res, LIMESDROUTPUT_BLOCKSIZE); | ||||
|         } | ||||
| 
 | ||||
|         usleep(msleep); | ||||
| 
 | ||||
|         if (count < 10) | ||||
|         { | ||||
|             count++; | ||||
|         } | ||||
|         else | ||||
|         { | ||||
|             if (LMS_GetStreamStatus(m_stream, &streamStatus) == 0) | ||||
|             { | ||||
|                 if (streamStatus.fifoFilledCount < (4*streamStatus.fifoSize)/5) { // FIFO at 80%
 | ||||
|                     msleep -= mdelta; | ||||
|                 } else { | ||||
|                     msleep += mdelta; | ||||
|                 } | ||||
|             } | ||||
| 
 | ||||
|             count = 0; | ||||
|         } | ||||
| //        usleep(msleep);
 | ||||
| //
 | ||||
| //        if (count < 10)
 | ||||
| //        {
 | ||||
| //            count++;
 | ||||
| //        }
 | ||||
| //        else
 | ||||
| //        {
 | ||||
| //            if (LMS_GetStreamStatus(m_stream, &streamStatus) == 0)
 | ||||
| //            {
 | ||||
| //                if (streamStatus.fifoFilledCount < (4*streamStatus.fifoSize)/5) { // FIFO at 80%
 | ||||
| //                    msleep -= mdelta;
 | ||||
| //                } else {
 | ||||
| //                    msleep += mdelta;
 | ||||
| //                }
 | ||||
| //            }
 | ||||
| //
 | ||||
| //            count = 0;
 | ||||
| //        }
 | ||||
|     } | ||||
| 
 | ||||
|     if (LMS_StopStream(m_stream) < 0) { | ||||
|  | ||||
| @ -427,7 +427,7 @@ void LimeSDRInputGUI::on_hwDecim_currentIndexChanged(int index) | ||||
| 
 | ||||
| void LimeSDRInputGUI::on_swDecim_currentIndexChanged(int index) | ||||
| { | ||||
|     if ((index <0) || (index > 5)) | ||||
|     if ((index <0) || (index > 6)) | ||||
|         return; | ||||
|     m_settings.m_log2SoftDecim = index; | ||||
|     sendSettings(); | ||||
|  | ||||
| @ -330,7 +330,7 @@ | ||||
|         <string>TSP hardware decimation factor</string> | ||||
|        </property> | ||||
|        <property name="currentIndex"> | ||||
|         <number>2</number> | ||||
|         <number>0</number> | ||||
|        </property> | ||||
|        <item> | ||||
|         <property name="text"> | ||||
| @ -418,6 +418,11 @@ | ||||
|          <string>32</string> | ||||
|         </property> | ||||
|        </item> | ||||
|        <item> | ||||
|         <property name="text"> | ||||
|          <string>64</string> | ||||
|         </property> | ||||
|        </item> | ||||
|       </widget> | ||||
|      </item> | ||||
|      <item> | ||||
|  | ||||
| @ -31,7 +31,7 @@ | ||||
| 
 | ||||
| const PluginDescriptor LimeSDRInputPlugin::m_pluginDescriptor = { | ||||
|     QString("LimeSDR Input"), | ||||
|     QString("3.4.0"), | ||||
|     QString("3.4.4"), | ||||
|     QString("(c) Edouard Griffiths, F4EXB"), | ||||
|     QString("https://github.com/f4exb/sdrangel"), | ||||
|     true, | ||||
|  | ||||
| @ -132,6 +132,9 @@ void LimeSDRInputThread::callback(const qint16* buf, qint32 len) | ||||
|             case 5: | ||||
|                 m_decimators.decimate32_inf(&it, buf, len); | ||||
|                 break; | ||||
|             case 6: | ||||
|                 m_decimators.decimate64_inf(&it, buf, len); | ||||
|                 break; | ||||
|             default: | ||||
|                 break; | ||||
|             } | ||||
| @ -155,6 +158,9 @@ void LimeSDRInputThread::callback(const qint16* buf, qint32 len) | ||||
|             case 5: | ||||
|                 m_decimators.decimate32_sup(&it, buf, len); | ||||
|                 break; | ||||
|             case 6: | ||||
|                 m_decimators.decimate64_sup(&it, buf, len); | ||||
|                 break; | ||||
|             default: | ||||
|                 break; | ||||
|             } | ||||
| @ -178,6 +184,9 @@ void LimeSDRInputThread::callback(const qint16* buf, qint32 len) | ||||
|             case 5: | ||||
|                 m_decimators.decimate32_cen(&it, buf, len); | ||||
|                 break; | ||||
|             case 6: | ||||
|                 m_decimators.decimate64_cen(&it, buf, len); | ||||
|                 break; | ||||
|             default: | ||||
|                 break; | ||||
|             } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user