mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-01 21:54:55 -04:00
Remote input/sink implemented remote control. Implements #1074
This commit is contained in:
@@ -84,6 +84,7 @@ RemoteInputGui::RemoteInputGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
connect(&m_statusTimer, SIGNAL(timeout()), this, SLOT(updateStatus()));
|
||||
m_statusTimer.start(500);
|
||||
connect(&m_updateTimer, SIGNAL(timeout()), this, SLOT(updateHardware()));
|
||||
connect(&m_remoteUpdateTimer, SIGNAL(timeout()), this, SLOT(updateRemote()));
|
||||
|
||||
m_sampleSource = (RemoteInput*) m_deviceUISet->m_deviceAPI->getSampleSource();
|
||||
|
||||
@@ -351,19 +352,16 @@ void RemoteInputGui::applyPosition()
|
||||
|
||||
void RemoteInputGui::applyRemoteSettings()
|
||||
{
|
||||
if (m_doApplySettings)
|
||||
{
|
||||
qDebug() << "RemoteInputGui::applyRemoteSettings";
|
||||
RemoteInput::MsgConfigureRemoteChannel* message =
|
||||
RemoteInput::MsgConfigureRemoteChannel::create(m_remoteChannelSettings);
|
||||
m_sampleSource->getInputMessageQueue()->push(message);
|
||||
if (!m_remoteUpdateTimer.isActive()) {
|
||||
m_remoteUpdateTimer.start(100);
|
||||
}
|
||||
}
|
||||
|
||||
void RemoteInputGui::sendSettings()
|
||||
{
|
||||
if(!m_updateTimer.isActive())
|
||||
if (!m_updateTimer.isActive()) {
|
||||
m_updateTimer.start(100);
|
||||
}
|
||||
}
|
||||
|
||||
void RemoteInputGui::on_remoteDeviceFrequency_changed(quint64 value)
|
||||
@@ -615,6 +613,18 @@ void RemoteInputGui::updateHardware()
|
||||
}
|
||||
}
|
||||
|
||||
void RemoteInputGui::updateRemote()
|
||||
{
|
||||
if (m_doApplySettings)
|
||||
{
|
||||
qDebug() << "RemoteInputGui::updateRemote";
|
||||
RemoteInput::MsgConfigureRemoteChannel* message =
|
||||
RemoteInput::MsgConfigureRemoteChannel::create(m_remoteChannelSettings);
|
||||
m_sampleSource->getInputMessageQueue()->push(message);
|
||||
m_remoteUpdateTimer.stop();
|
||||
}
|
||||
}
|
||||
|
||||
void RemoteInputGui::updateStatus()
|
||||
{
|
||||
if (m_sampleSource->isStreaming())
|
||||
|
||||
Reference in New Issue
Block a user