1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-12-23 01:55:48 -05:00

XTRX: more messages

This commit is contained in:
f4exb 2018-12-30 00:44:37 +01:00
parent 0200b51a74
commit 7d9b6f200e

View File

@ -14,6 +14,8 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
///////////////////////////////////////////////////////////////////////////////////
#include <QDebug>
#include "devicextrxshared.h"
MESSAGE_CLASS_DEFINITION(DeviceXTRXShared::MsgReportBuddyChange, Message)
@ -46,19 +48,36 @@ double DeviceXTRXShared::set_samplerate(double rate,
}
}
double actualcgen;
double actualrx;
double actualtx;
int res = xtrx_set_samplerate(m_deviceParams->getDevice(),
m_masterRate,
m_inputRate,
m_outputRate,
0,
0,
0,
0);
&actualcgen,
&actualrx,
&actualtx);
if (res) {
//fprintf(stderr, "Unable to set samplerate, error=%d\n", res);
if (res)
{
qCritical("DeviceXTRXShared::set_samplerate: Unable to set %s samplerate, m_masterRate: %f, m_inputRate: %f, m_outputRate: %f, error=%d\n",
output ? "output" : "input", m_masterRate, m_inputRate, m_outputRate, res);
return 0;
}
else
{
qDebug() << "DeviceXTRXShared::set_samplerate: sample rate set: "
<< "output: "<< output
<< "m_masterRate: " << m_masterRate
<< "m_inputRate: " << m_inputRate
<< "m_outputRate: " << m_outputRate
<< "actualcgen: " << actualcgen
<< "actualrx: " << actualrx
<< "actualtx: " << actualtx;
}
if (output) {
return m_outputRate;