mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-05 08:21:16 -05:00
Fix gcc warnings
This commit is contained in:
parent
52c0907135
commit
b35b3d2c1b
@ -41,9 +41,9 @@ RemoteTCPInputGui::RemoteTCPInputGui(DeviceUISet *deviceUISet, QWidget* parent)
|
|||||||
ui(new Ui::RemoteTCPInputGui),
|
ui(new Ui::RemoteTCPInputGui),
|
||||||
m_settings(),
|
m_settings(),
|
||||||
m_sampleSource(0),
|
m_sampleSource(0),
|
||||||
|
m_lastEngineState(DeviceAPI::StNotStarted),
|
||||||
m_sampleRate(0),
|
m_sampleRate(0),
|
||||||
m_centerFrequency(0),
|
m_centerFrequency(0),
|
||||||
m_lastEngineState(DeviceAPI::StNotStarted),
|
|
||||||
m_doApplySettings(true),
|
m_doApplySettings(true),
|
||||||
m_forceSettings(true),
|
m_forceSettings(true),
|
||||||
m_deviceGains(nullptr),
|
m_deviceGains(nullptr),
|
||||||
@ -171,6 +171,7 @@ bool RemoteTCPInputGui::handleMessage(const Message& message)
|
|||||||
ui->outGauge->setMaximum((int)report.getOutSize());
|
ui->outGauge->setMaximum((int)report.getOutSize());
|
||||||
ui->outGauge->setValue((int)report.getOutBytesAvailable());
|
ui->outGauge->setValue((int)report.getOutBytesAvailable());
|
||||||
ui->outBufferLenSecsText->setText(QString("%1s").arg(report.getOutSeconds(), 0, 'f', 2));
|
ui->outBufferLenSecsText->setText(QString("%1s").arg(report.getOutSeconds(), 0, 'f', 2));
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
else if (RemoteTCPInputTCPHandler::MsgReportRemoteDevice::match(message))
|
else if (RemoteTCPInputTCPHandler::MsgReportRemoteDevice::match(message))
|
||||||
{
|
{
|
||||||
@ -259,6 +260,7 @@ bool RemoteTCPInputGui::handleMessage(const Message& message)
|
|||||||
ui->decimation->setEnabled(sdra);
|
ui->decimation->setEnabled(sdra);
|
||||||
|
|
||||||
displayGains();
|
displayGains();
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
else if (RemoteTCPInputTCPHandler::MsgReportConnection::match(message))
|
else if (RemoteTCPInputTCPHandler::MsgReportConnection::match(message))
|
||||||
{
|
{
|
||||||
@ -274,6 +276,7 @@ bool RemoteTCPInputGui::handleMessage(const Message& message)
|
|||||||
m_connectionError = true;
|
m_connectionError = true;
|
||||||
ui->startStop->setStyleSheet("QToolButton { background-color : red; }");
|
ui->startStop->setStyleSheet("QToolButton { background-color : red; }");
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -437,7 +437,7 @@ void RemoteTCPInputTCPHandler::applySettings(const RemoteTCPInputSettings& setti
|
|||||||
{
|
{
|
||||||
// Resize FIFO to give us 1 second
|
// Resize FIFO to give us 1 second
|
||||||
// Can't do this while running
|
// Can't do this while running
|
||||||
if (!m_running && settings.m_channelSampleRate > m_sampleFifo->size())
|
if (!m_running && settings.m_channelSampleRate > (qint32)m_sampleFifo->size())
|
||||||
{
|
{
|
||||||
qDebug() << "RemoteTCPInputTCPHandler::applySettings: Resizing sample FIFO from " << m_sampleFifo->size() << "to" << settings.m_channelSampleRate;
|
qDebug() << "RemoteTCPInputTCPHandler::applySettings: Resizing sample FIFO from " << m_sampleFifo->size() << "to" << settings.m_channelSampleRate;
|
||||||
m_sampleFifo->setSize(settings.m_channelSampleRate);
|
m_sampleFifo->setSize(settings.m_channelSampleRate);
|
||||||
@ -522,7 +522,7 @@ void RemoteTCPInputTCPHandler::dataReadyRead()
|
|||||||
if (!m_readMetaData)
|
if (!m_readMetaData)
|
||||||
{
|
{
|
||||||
quint8 metaData[RemoteTCPProtocol::m_sdraMetaDataSize];
|
quint8 metaData[RemoteTCPProtocol::m_sdraMetaDataSize];
|
||||||
if (m_dataSocket->bytesAvailable() >= sizeof(metaData))
|
if (m_dataSocket->bytesAvailable() >= (qint64)sizeof(metaData))
|
||||||
{
|
{
|
||||||
qint64 bytesRead = m_dataSocket->read((char *)&metaData[0], 4);
|
qint64 bytesRead = m_dataSocket->read((char *)&metaData[0], 4);
|
||||||
if (bytesRead == 4)
|
if (bytesRead == 4)
|
||||||
@ -539,7 +539,6 @@ void RemoteTCPInputTCPHandler::dataReadyRead()
|
|||||||
bytesRead = m_dataSocket->read((char *)&metaData[4], RemoteTCPProtocol::m_rtl0MetaDataSize-4);
|
bytesRead = m_dataSocket->read((char *)&metaData[4], RemoteTCPProtocol::m_rtl0MetaDataSize-4);
|
||||||
|
|
||||||
RemoteTCPProtocol::Device tuner = (RemoteTCPProtocol::Device)RemoteTCPProtocol::extractUInt32(&metaData[4]);
|
RemoteTCPProtocol::Device tuner = (RemoteTCPProtocol::Device)RemoteTCPProtocol::extractUInt32(&metaData[4]);
|
||||||
quint32 gainStages = RemoteTCPProtocol::extractUInt32(&metaData[8]);
|
|
||||||
if (m_messageQueueToGUI) {
|
if (m_messageQueueToGUI) {
|
||||||
m_messageQueueToGUI->push(MsgReportRemoteDevice::create(tuner, protocol));
|
m_messageQueueToGUI->push(MsgReportRemoteDevice::create(tuner, protocol));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user