mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-14 20:31:53 -05:00
ATV demod: ATV screen: use internal 40ms (25 FPS) timer for refresh
This commit is contained in:
parent
a5df0a1ee4
commit
1d0cf9582d
@ -191,7 +191,7 @@ ATVDemodGUI::ATVDemodGUI(PluginAPI* objPluginAPI, DeviceSourceAPI *objDeviceAPI,
|
||||
m_objDeviceAPI->addChannelMarker(&m_objChannelMarker);
|
||||
m_objDeviceAPI->addRollupWidget(this);
|
||||
|
||||
ui->screenTV->connectTimer(m_objPluginAPI->getMainWindow()->getMasterTimer());
|
||||
//ui->screenTV->connectTimer(m_objPluginAPI->getMainWindow()->getMasterTimer());
|
||||
|
||||
//********** ATV Default values **********
|
||||
ui->horizontalSlider->setValue(100);
|
||||
@ -226,7 +226,7 @@ void ATVDemodGUI::applySettings()
|
||||
ATVModulation enmSelectedModulation;
|
||||
|
||||
if (m_blnDoApplySettings)
|
||||
{
|
||||
{
|
||||
setTitleColor(m_objChannelMarker.getColor());
|
||||
|
||||
m_objChannelizer->configure(m_objChannelizer->getInputMessageQueue(), m_objATVDemod->GetSampleRate(), m_objChannelMarker.getCenterFrequency());
|
||||
@ -301,7 +301,7 @@ void ATVDemodGUI::on_horizontalSlider_2_valueChanged(int value)
|
||||
void ATVDemodGUI::on_horizontalSlider_3_valueChanged(int value)
|
||||
{
|
||||
ui->label_6->setText(QString("%1 uS").arg(((float)value)/10.0f));
|
||||
applySettings();
|
||||
applySettings();
|
||||
|
||||
}
|
||||
|
||||
@ -317,7 +317,7 @@ void ATVDemodGUI::on_checkBox_clicked()
|
||||
}
|
||||
|
||||
void ATVDemodGUI::on_checkBox_2_clicked()
|
||||
{
|
||||
{
|
||||
applySettings();
|
||||
}
|
||||
|
||||
@ -328,7 +328,7 @@ void ATVDemodGUI::on_checkBox_3_clicked()
|
||||
|
||||
void ATVDemodGUI::on_comboBox_currentIndexChanged(int index)
|
||||
{
|
||||
applySettings();
|
||||
applySettings();
|
||||
}
|
||||
|
||||
void ATVDemodGUI::on_comboBox_2_currentIndexChanged(int index)
|
||||
|
@ -31,8 +31,8 @@ ATVScreen::ATVScreen(QWidget* parent) :
|
||||
QGLWidget(parent), m_objMutex(QMutex::NonRecursive)
|
||||
{
|
||||
setAttribute(Qt::WA_OpaquePaintEvent);
|
||||
//connect(&m_objTimer, SIGNAL(timeout()), this, SLOT(tick()));
|
||||
//m_objTimer.start(50);
|
||||
connect(&m_objTimer, SIGNAL(timeout()), this, SLOT(tick()));
|
||||
m_objTimer.start(40); // capped at 25 FPS
|
||||
|
||||
m_chrLastData = NULL;
|
||||
m_blnConfigChanged = false;
|
||||
@ -62,7 +62,8 @@ QRgb* ATVScreen::getRowBuffer(int intRow)
|
||||
void ATVScreen::renderImage(unsigned char * objData)
|
||||
{
|
||||
m_chrLastData = objData;
|
||||
update();
|
||||
m_blnDataChanged = true;
|
||||
//update();
|
||||
}
|
||||
|
||||
void ATVScreen::resetImage()
|
||||
@ -148,6 +149,8 @@ void ATVScreen::paintGL()
|
||||
{
|
||||
m_objMutex.lock();
|
||||
|
||||
m_blnDataChanged = false;
|
||||
|
||||
if (m_blnGLContextInitialized)
|
||||
{
|
||||
if ((m_intAskedCols != 0) && (m_intAskedRows != 0))
|
||||
@ -169,16 +172,17 @@ void ATVScreen::mousePressEvent(QMouseEvent* event)
|
||||
|
||||
void ATVScreen::tick()
|
||||
{
|
||||
if (m_blnDataChanged) {
|
||||
update();
|
||||
}
|
||||
}
|
||||
|
||||
void ATVScreen::connectTimer(const QTimer& objTimer)
|
||||
{
|
||||
/*
|
||||
qDebug() << "ATVScreen::connectTimer";
|
||||
disconnect(&m_objTimer, SIGNAL(timeout()), this, SLOT(tick()));
|
||||
connect(&objTimer, SIGNAL(timeout()), this, SLOT(tick()));
|
||||
m_objTimer.stop();
|
||||
*/
|
||||
}
|
||||
|
||||
void ATVScreen::cleanup()
|
||||
|
Loading…
Reference in New Issue
Block a user