mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-25 17:28:50 -05:00
Fix gcc warnings.
This commit is contained in:
parent
8ad555972e
commit
6d0500ccbf
@ -394,6 +394,9 @@ void RemoteTCPInput::webapiUpdateDeviceSettings(
|
||||
if (deviceSettingsKeys.contains("preFill")) {
|
||||
settings.m_preFill = response.getRemoteTcpInputSettings()->getPreFill() != 0;
|
||||
}
|
||||
if (deviceSettingsKeys.contains("protocol")) {
|
||||
settings.m_protocol = *response.getRemoteTcpInputSettings()->getProtocol();
|
||||
}
|
||||
if (deviceSettingsKeys.contains("useReverseAPI")) {
|
||||
settings.m_useReverseAPI = response.getRemoteTcpInputSettings()->getUseReverseApi() != 0;
|
||||
}
|
||||
@ -430,6 +433,7 @@ void RemoteTCPInput::webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings&
|
||||
response.getRemoteTcpInputSettings()->setDataPort(settings.m_dataPort);
|
||||
response.getRemoteTcpInputSettings()->setOverrideRemoteSettings(settings.m_overrideRemoteSettings ? 1 : 0);
|
||||
response.getRemoteTcpInputSettings()->setPreFill(settings.m_preFill ? 1 : 0);
|
||||
response.getRemoteTcpInputSettings()->setProtocol(new QString(settings.m_protocol));
|
||||
|
||||
response.getRemoteTcpInputSettings()->setUseReverseApi(settings.m_useReverseAPI ? 1 : 0);
|
||||
|
||||
|
@ -847,6 +847,8 @@ void RemoteTCPInputGui::on_preFill_valueChanged(int value)
|
||||
|
||||
void RemoteTCPInputGui::on_protocol_currentIndexChanged(int index)
|
||||
{
|
||||
(void) index;
|
||||
|
||||
m_settings.m_protocol = ui->protocol->currentText();
|
||||
m_settingsKeys.append("protocol");
|
||||
sendSettings();
|
||||
|
@ -407,7 +407,7 @@ void RemoteTCPInputTCPHandler::spyServerConnect()
|
||||
SpyServerProtocol::encodeUInt32(&request[0], 0);
|
||||
SpyServerProtocol::encodeUInt32(&request[4], 4+9);
|
||||
SpyServerProtocol::encodeUInt32(&request[8], SpyServerProtocol::ProtocolID);
|
||||
memcpy(&request[8+5], "SDRangel", 9);
|
||||
memcpy(&request[8+4], "SDRangel", 9);
|
||||
if (m_dataSocket) {
|
||||
m_dataSocket->write((char*)request, sizeof(request));
|
||||
}
|
||||
@ -876,7 +876,7 @@ void RemoteTCPInputTCPHandler::processSpyServerDevice(const SpyServerProtocol::D
|
||||
m_settings.m_devSampleRate = settings.m_devSampleRate = ssDevice->m_sampleRate;
|
||||
settingsKeys.append("devSampleRate");
|
||||
// Make sure decimation setting is at least the minimum
|
||||
if (!m_settings.m_overrideRemoteSettings || (settings.m_log2Decim < ssDevice->m_minDecimation))
|
||||
if (!m_settings.m_overrideRemoteSettings || (settings.m_log2Decim < (int) ssDevice->m_minDecimation))
|
||||
{
|
||||
m_settings.m_log2Decim = settings.m_log2Decim = ssDevice->m_minDecimation;
|
||||
settingsKeys.append("log2Decim");
|
||||
@ -914,7 +914,7 @@ void RemoteTCPInputTCPHandler::processSpyServerState(const SpyServerProtocol::St
|
||||
settings.m_centerFrequency = ssState->m_iqCenterFrequency;
|
||||
settingsKeys.append("centerFrequency");
|
||||
}
|
||||
if (m_settings.m_gain[0] != ssState->m_gain)
|
||||
if (m_settings.m_gain[0] != (qint32) ssState->m_gain)
|
||||
{
|
||||
settings.m_gain[0] = ssState->m_gain;
|
||||
settingsKeys.append("gain[0]");
|
||||
@ -943,7 +943,7 @@ void RemoteTCPInputTCPHandler::processSpyServerData(int requiredBytes, bool clea
|
||||
{
|
||||
if (m_state == HEADER)
|
||||
{
|
||||
if (m_dataSocket->bytesAvailable() >= sizeof(SpyServerProtocol::Header))
|
||||
if (m_dataSocket->bytesAvailable() >= (qint64) sizeof(SpyServerProtocol::Header))
|
||||
{
|
||||
qint64 bytesRead = m_dataSocket->read((char *) &m_spyServerHeader, sizeof(SpyServerProtocol::Header));
|
||||
if (bytesRead == sizeof(SpyServerProtocol::Header)) {
|
||||
|
Loading…
Reference in New Issue
Block a user