mirror of
				https://github.com/f4exb/sdrangel.git
				synced 2025-10-30 20:40:20 -04:00 
			
		
		
		
	Show trigger line on phase display
This commit is contained in:
		
							parent
							
								
									9d9e419fd4
								
							
						
					
					
						commit
						c32f2b72f7
					
				| @ -60,6 +60,8 @@ public: | ||||
| 	void setDisplays(Displays displays); | ||||
| 	void setOrientation(Qt::Orientation orientation); | ||||
| 	void setDisplayGridIntensity(int intensity); | ||||
| 	void setTriggerChannel(ScopeVis::TriggerChannel triggerChannel); | ||||
| 	void setTriggerLevel(Real triggerLevel); | ||||
| 
 | ||||
| 	void newTrace(const std::vector<Complex>& trace, int sampleRate); | ||||
| 	int getTraceSize() const { return m_rawTrace.size(); } | ||||
|  | ||||
| @ -263,6 +263,7 @@ void GLScope::paintGL() | ||||
| 		glDisable(GL_TEXTURE_2D); | ||||
| 		glPopMatrix(); | ||||
| 
 | ||||
| 		// paint trigger level
 | ||||
| 		if(m_triggerChannel == ScopeVis::TriggerChannelI) { | ||||
| 			glPushMatrix(); | ||||
| 			glTranslatef(m_glScopeRect1.x(), m_glScopeRect1.y() + m_glScopeRect1.height() / 2.0, 0); | ||||
| @ -401,7 +402,8 @@ void GLScope::paintGL() | ||||
| 		glDisable(GL_TEXTURE_2D); | ||||
| 		glPopMatrix(); | ||||
| 
 | ||||
| 		if(m_triggerChannel == ScopeVis::TriggerChannelQ) { | ||||
| 		// paint trigger level
 | ||||
| 		if(m_triggerChannel == ScopeVis::TriggerPhase) { | ||||
| 			glPushMatrix(); | ||||
| 			glTranslatef(m_glScopeRect2.x(), m_glScopeRect2.y() + m_glScopeRect2.height() / 2.0, 0); | ||||
| 			glScalef(m_glScopeRect2.width(), -(m_glScopeRect2.height() / 2) * m_amp2, 1); | ||||
| @ -1239,3 +1241,13 @@ void GLScope::tick() | ||||
| 	if(m_dataChanged) | ||||
| 		update(); | ||||
| } | ||||
| 
 | ||||
| void GLScope::setTriggerChannel(ScopeVis::TriggerChannel triggerChannel) | ||||
| { | ||||
| 	m_triggerChannel = triggerChannel; | ||||
| } | ||||
| 
 | ||||
| void GLScope::setTriggerLevel(Real triggerLevel) | ||||
| { | ||||
| 	m_triggerLevel = triggerLevel; | ||||
| } | ||||
|  | ||||
| @ -174,6 +174,9 @@ void GLScopeGUI::applyTriggerSettings() | ||||
| 		triggerLevel = m_triggerLevel / 100.0; | ||||
| 	} | ||||
| 
 | ||||
| 	m_glScope->setTriggerChannel((ScopeVis::TriggerChannel) m_triggerChannel); | ||||
| 	m_glScope->setTriggerLevel(m_triggerLevel / 100.0); | ||||
| 
 | ||||
| 	m_scopeVis->configure(m_messageQueue, (ScopeVis::TriggerChannel) m_triggerChannel, triggerLevel, m_triggerPositiveEdge); | ||||
| } | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user