1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-15 21:01:45 -05:00

GLScope: set time 0 to pre-trigger point

This commit is contained in:
f4exb 2015-10-11 05:11:38 +02:00
parent 17c81fac0d
commit 23f773c111

View File

@ -780,7 +780,7 @@ void GLScope::applyConfig()
float pow_range = 100.0 / m_amp; float pow_range = 100.0 / m_amp;
float amp_range = 2.0 / m_amp; float amp_range = 2.0 / m_amp;
float amp_ofs = m_ofs; float amp_ofs = m_ofs;
float t_start = (m_timeOfsProMill / 1000.0) * ((float) m_displayTrace->size() / m_sampleRate); float t_start = ((m_timeOfsProMill / 1000.0) - m_triggerPre) * ((float) m_displayTrace->size() / m_sampleRate);
float t_len = ((float) m_displayTrace->size() / m_sampleRate) / (float) m_timeBase; float t_len = ((float) m_displayTrace->size() / m_sampleRate) / (float) m_timeBase;
m_x1Scale.setRange(Unit::Time, t_start, t_start + t_len); m_x1Scale.setRange(Unit::Time, t_start, t_start + t_len);
@ -1418,6 +1418,8 @@ void GLScope::setTriggerLevel(Real triggerLevel)
void GLScope::setTriggerPre(Real triggerPre) void GLScope::setTriggerPre(Real triggerPre)
{ {
m_triggerPre = triggerPre; m_triggerPre = triggerPre;
m_configChanged = true;
update();
} }
void GLScope::connectTimer(const QTimer& timer) void GLScope::connectTimer(const QTimer& timer)