1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-01 21:54:55 -04:00

Single DeviceAPI interface (1)

This commit is contained in:
f4exb
2019-05-08 22:11:53 +02:00
parent 69313daeae
commit 89e53cf179
255 changed files with 1632 additions and 1717 deletions
@@ -26,8 +26,7 @@
#include "gui/basicdevicesettingsdialog.h"
#include "dsp/dspengine.h"
#include "dsp/dspcommands.h"
#include "device/devicesinkapi.h"
#include "device/devicesourceapi.h"
#include "device/deviceapi.h"
#include "device/deviceuiset.h"
#include "hackrf/devicehackrfvalues.h"
#include "hackrf/devicehackrfshared.h"
@@ -43,10 +42,10 @@ HackRFOutputGui::HackRFOutputGui(DeviceUISet *deviceUISet, QWidget* parent) :
m_settings(),
m_sampleRateMode(true),
m_deviceSampleSink(0),
m_lastEngineState(DSPDeviceSinkEngine::StNotStarted),
m_lastEngineState(DeviceAPI::StNotStarted),
m_doApplySettings(true)
{
m_deviceSampleSink = (HackRFOutput*) m_deviceUISet->m_deviceSinkAPI->getSampleSink();
m_deviceSampleSink = (HackRFOutput*) m_deviceUISet->m_deviceAPI->getSampleSink();
ui->setupUi(this);
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
@@ -402,25 +401,25 @@ void HackRFOutputGui::updateHardware()
void HackRFOutputGui::updateStatus()
{
int state = m_deviceUISet->m_deviceSinkAPI->state();
int state = m_deviceUISet->m_deviceAPI->state();
if(m_lastEngineState != state)
{
switch(state)
{
case DSPDeviceSinkEngine::StNotStarted:
case DeviceAPI::StNotStarted:
ui->startStop->setStyleSheet("QToolButton { background:rgb(79,79,79); }");
break;
case DSPDeviceSinkEngine::StIdle:
case DeviceAPI::StIdle:
ui->startStop->setStyleSheet("QToolButton { background-color : blue; }");
ui->startStop->setChecked(false);
break;
case DSPDeviceSinkEngine::StRunning:
case DeviceAPI::StRunning:
ui->startStop->setStyleSheet("QToolButton { background-color : green; }");
break;
case DSPDeviceSinkEngine::StError:
case DeviceAPI::StError:
ui->startStop->setStyleSheet("QToolButton { background-color : red; }");
QMessageBox::information(this, tr("Message"), m_deviceUISet->m_deviceSinkAPI->errorMessage());
QMessageBox::information(this, tr("Message"), m_deviceUISet->m_deviceAPI->errorMessage());
break;
default:
break;