mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-04-06 03:29:12 -04: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),
|
||||
m_settings(),
|
||||
m_sampleSource(0),
|
||||
m_lastEngineState(DeviceAPI::StNotStarted),
|
||||
m_sampleRate(0),
|
||||
m_centerFrequency(0),
|
||||
m_lastEngineState(DeviceAPI::StNotStarted),
|
||||
m_doApplySettings(true),
|
||||
m_forceSettings(true),
|
||||
m_deviceGains(nullptr),
|
||||
@ -171,6 +171,7 @@ bool RemoteTCPInputGui::handleMessage(const Message& message)
|
||||
ui->outGauge->setMaximum((int)report.getOutSize());
|
||||
ui->outGauge->setValue((int)report.getOutBytesAvailable());
|
||||
ui->outBufferLenSecsText->setText(QString("%1s").arg(report.getOutSeconds(), 0, 'f', 2));
|
||||
return true;
|
||||
}
|
||||
else if (RemoteTCPInputTCPHandler::MsgReportRemoteDevice::match(message))
|
||||
{
|
||||
@ -259,6 +260,7 @@ bool RemoteTCPInputGui::handleMessage(const Message& message)
|
||||
ui->decimation->setEnabled(sdra);
|
||||
|
||||
displayGains();
|
||||
return true;
|
||||
}
|
||||
else if (RemoteTCPInputTCPHandler::MsgReportConnection::match(message))
|
||||
{
|
||||
@ -274,6 +276,7 @@ bool RemoteTCPInputGui::handleMessage(const Message& message)
|
||||
m_connectionError = true;
|
||||
ui->startStop->setStyleSheet("QToolButton { background-color : red; }");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -437,7 +437,7 @@ void RemoteTCPInputTCPHandler::applySettings(const RemoteTCPInputSettings& setti
|
||||
{
|
||||
// Resize FIFO to give us 1 second
|
||||
// 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;
|
||||
m_sampleFifo->setSize(settings.m_channelSampleRate);
|
||||
@ -522,7 +522,7 @@ void RemoteTCPInputTCPHandler::dataReadyRead()
|
||||
if (!m_readMetaData)
|
||||
{
|
||||
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);
|
||||
if (bytesRead == 4)
|
||||
@ -539,7 +539,6 @@ void RemoteTCPInputTCPHandler::dataReadyRead()
|
||||
bytesRead = m_dataSocket->read((char *)&metaData[4], RemoteTCPProtocol::m_rtl0MetaDataSize-4);
|
||||
|
||||
RemoteTCPProtocol::Device tuner = (RemoteTCPProtocol::Device)RemoteTCPProtocol::extractUInt32(&metaData[4]);
|
||||
quint32 gainStages = RemoteTCPProtocol::extractUInt32(&metaData[8]);
|
||||
if (m_messageQueueToGUI) {
|
||||
m_messageQueueToGUI->push(MsgReportRemoteDevice::create(tuner, protocol));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user