Scope: fixed channel rate affecting scope rate in memory mode

pull/228/head
f4exb 2018-10-16 00:31:45 +02:00
rodzic be36430057
commit 966d957f89
9 zmienionych plików z 41 dodań i 10 usunięć

Wyświetl plik

@ -35,7 +35,7 @@ static int runQtApplication(int argc, char* argv[], qtwebapp::LoggerWithFile *lo
*/
QCoreApplication::setOrganizationName("f4exb");
QCoreApplication::setApplicationName("SDRangel");
QCoreApplication::setApplicationVersion("4.2.2");
QCoreApplication::setApplicationVersion("4.2.3");
#if 1
qApp->setStyle(QStyleFactory::create("fusion"));

Wyświetl plik

@ -57,7 +57,7 @@ static int runQtApplication(int argc, char* argv[], qtwebapp::LoggerWithFile *lo
QCoreApplication::setOrganizationName("f4exb");
QCoreApplication::setApplicationName("SDRangelBench");
QCoreApplication::setApplicationVersion("4.2.2");
QCoreApplication::setApplicationVersion("4.2.3");
int catchSignals[] = {SIGQUIT, SIGINT, SIGTERM, SIGHUP};
std::vector<int> vsig(catchSignals, catchSignals + sizeof(catchSignals) / sizeof(int));

Wyświetl plik

@ -56,7 +56,7 @@ static int runQtApplication(int argc, char* argv[], qtwebapp::LoggerWithFile *lo
QCoreApplication::setOrganizationName("f4exb");
QCoreApplication::setApplicationName("SDRangelSrv");
QCoreApplication::setApplicationVersion("4.2.2");
QCoreApplication::setApplicationVersion("4.2.3");
int catchSignals[] = {SIGQUIT, SIGINT, SIGTERM, SIGHUP};
std::vector<int> vsig(catchSignals, catchSignals + sizeof(catchSignals) / sizeof(int));

6
debian/changelog vendored
Wyświetl plik

@ -1,3 +1,9 @@
sdrangel (4.2.3-1) unstable; urgency=medium
* Scope: fixed channel rate affecting scope in memory mode. Issue #227
-- Edouard Griffiths, F4EXB <f4exb06@gmail.com> Sun, 21 Oct 2018 21:14:18 +0200
sdrangel (4.2.2-1) unstable; urgency=medium
* Spectrum: option to get max over a number of FFTs. Implements issue #207

Wyświetl plik

@ -462,7 +462,7 @@ void ChannelAnalyzerGUI::setNewFinalRate()
QString s = QString::number(m_rate/1000.0, 'f', 1);
ui->spanText->setText(tr("%1 kS/s").arg(s));
m_scopeVis->setSampleRate(m_rate);
m_scopeVis->setLiveRate(m_rate);
}
void ChannelAnalyzerGUI::setFiltersUIBoundaries()

Wyświetl plik

@ -211,7 +211,7 @@ bool ATVDemodGUI::handleMessage(const Message& objMessage)
int nbPointsPerLine = ((ATVDemod::MsgReportEffectiveSampleRate&)objMessage).getNbPointsPerLine();
ui->channelSampleRateText->setText(tr("%1k").arg(sampleRate/1000.0f, 0, 'f', 2));
ui->nbPointsPerLineText->setText(tr("%1p").arg(nbPointsPerLine));
m_scopeVis->setSampleRate(sampleRate);
m_scopeVis->setLiveRate(sampleRate);
setRFFiltersSlidersRange(sampleRate);
lineTimeUpdate();
topTimeUpdate();

Wyświetl plik

@ -27,7 +27,7 @@
const PluginDescriptor ATVDemodPlugin::m_ptrPluginDescriptor =
{
QString("ATV Demodulator"),
QString("3.14.5"),
QString("4.2.3"),
QString("(c) F4HKW for F4EXB / SDRAngel"),
QString("https://github.com/f4exb/sdrangel"),
true,

Wyświetl plik

@ -52,6 +52,8 @@ ScopeVis::ScopeVis(GLScope* glScope) :
m_timeOfsProMill(0),
m_traceStart(true),
m_sampleRate(0),
m_liveRate(0),
m_memoryRate(0),
m_traceDiscreteMemory(m_nbTraceMemories),
m_freeRun(true),
m_maxTraceDelay(0),
@ -74,6 +76,15 @@ ScopeVis::~ScopeVis()
}
}
void ScopeVis::setLiveRate(int sampleRate)
{
m_liveRate = sampleRate;
if (m_currentTraceMemoryIndex == 0) { // update only in live mode
setSampleRate(m_liveRate);
}
}
void ScopeVis::setSampleRate(int sampleRate)
{
m_sampleRate = sampleRate;
@ -589,7 +600,7 @@ bool ScopeVis::handleMessage(const Message& message)
if (DSPSignalNotification::match(message))
{
DSPSignalNotification& notif = (DSPSignalNotification&) message;
setSampleRate(notif.getSampleRate());
setLiveRate(notif.getSampleRate());
qDebug() << "ScopeVis::handleMessage: DSPSignalNotification: m_sampleRate: " << m_sampleRate;
return true;
}
@ -827,9 +838,16 @@ bool ScopeVis::handleMessage(const Message& message)
if (memoryIndex != m_currentTraceMemoryIndex)
{
// on transition from live rate initialize memory rate to live rate
if (memoryIndex == 0) {
m_memoryRate = m_liveRate;
}
m_currentTraceMemoryIndex = memoryIndex;
if (m_currentTraceMemoryIndex > 0) {
if (m_currentTraceMemoryIndex == 0) { // transition to live mode
setSampleRate(m_liveRate); // reset to live rate
} else {
processMemoryTrace();
}
}

Wyświetl plik

@ -152,7 +152,7 @@ public:
ScopeVis(GLScope* glScope = 0);
virtual ~ScopeVis();
void setSampleRate(int sampleRate);
void setLiveRate(int sampleRate);
void configure(uint32_t traceSize, uint32_t timeBase, uint32_t timeOfsProMill, uint32_t triggerPre, bool freeRun);
void addTrace(const TraceData& traceData);
void changeTrace(const TraceData& traceData, uint32_t traceIndex);
@ -1049,7 +1049,9 @@ private:
uint32_t m_timeOfsProMill; //!< Start trace shift in 1/1000 trace size
bool m_traceStart; //!< Trace is at start point
SampleVector::const_iterator m_triggerPoint; //!< Trigger start location in the samples vector
int m_sampleRate;
int m_sampleRate; //!< Actual sample rate being used
int m_liveRate; //!< Sample rate in live mode
int m_memoryRate; //!< Sample rate in memory mode
TraceBackDiscreteMemory m_traceDiscreteMemory; //!< Complex trace memory for triggered states TODO: vectorize when more than on input is allowed
bool m_freeRun; //!< True if free running (trigger globally disabled)
int m_maxTraceDelay; //!< Maximum trace delay
@ -1109,6 +1111,11 @@ private:
* - Trace in memory: call process memory trace
*/
void updateGLScopeDisplay();
/**
* Set the actual sample rate
*/
void setSampleRate(int sampleRate);
};