1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-05 15:34:57 -04:00

XTRX input: removed useless status indicators and added GPS locked status

This commit is contained in:
f4exb
2018-12-29 11:07:14 +01:00
parent 7cef8cc2ab
commit f21dd8d6e5
9 changed files with 69 additions and 158 deletions
+15 -4
View File
@@ -67,17 +67,28 @@ double DeviceXTRXShared::set_samplerate(double rate,
return m_inputRate;
}
double DeviceXTRXShared::get_temperature()
double DeviceXTRXShared::get_board_temperature()
{
uint64_t val = 0;
int res = xtrx_val_get(m_deviceParams->getDevice(),
XTRX_TRX, XTRX_CH_AB, XTRX_BOARD_TEMP, &val);
int res = xtrx_val_get(m_deviceParams->getDevice(), XTRX_TRX, XTRX_CH_AB, XTRX_BOARD_TEMP, &val);
if (res) {
//fprintf(stderr, "Unable to set samplerate, error=%d\n", res);
return 0;
}
return val;
}
bool DeviceXTRXShared::get_gps_status()
{
uint64_t val = 0;
int res = xtrx_val_get(m_deviceParams->getDevice(), XTRX_TRX, XTRX_CH_AB, XTRX_WAIT_1PPS, &val);
if (res) {
return false;
}
return val != 0;
}