sdr: fixed enumeration output
This commit is contained in:
parent
96f10f7fb6
commit
2d0bf7eeda
|
@ -72,20 +72,20 @@ result_t sdr_init(sdr_ctx_t *ctx)
|
||||||
//query device info
|
//query device info
|
||||||
char** names = SoapySDRDevice_listAntennas(ctx->sdr, SOAPY_SDR_RX, 0, &length);
|
char** names = SoapySDRDevice_listAntennas(ctx->sdr, SOAPY_SDR_RX, 0, &length);
|
||||||
fprintf(stderr, "sdr: Rx antennas: ");
|
fprintf(stderr, "sdr: Rx antennas: ");
|
||||||
for (size_t i = 0; i < length; i++) fprintf(stderr, "sdr: %s, ", names[i]);
|
for (size_t i = 0; i < length; i++) fprintf(stderr, "%s, ", names[i]);
|
||||||
fprintf(stderr, "sdr: \n");
|
fprintf(stderr, "\n");
|
||||||
SoapySDRStrings_clear(&names, length);
|
SoapySDRStrings_clear(&names, length);
|
||||||
|
|
||||||
names = SoapySDRDevice_listGains(ctx->sdr, SOAPY_SDR_RX, 0, &length);
|
names = SoapySDRDevice_listGains(ctx->sdr, SOAPY_SDR_RX, 0, &length);
|
||||||
fprintf(stderr, "sdr: Rx gains: ");
|
fprintf(stderr, "sdr: Rx gains: ");
|
||||||
for (size_t i = 0; i < length; i++) fprintf(stderr, "sdr: %s, ", names[i]);
|
for (size_t i = 0; i < length; i++) fprintf(stderr, "%s, ", names[i]);
|
||||||
fprintf(stderr, "sdr: \n");
|
fprintf(stderr, "\n");
|
||||||
SoapySDRStrings_clear(&names, length);
|
SoapySDRStrings_clear(&names, length);
|
||||||
|
|
||||||
SoapySDRRange *ranges = SoapySDRDevice_getFrequencyRange(ctx->sdr, SOAPY_SDR_RX, 0, &length);
|
SoapySDRRange *ranges = SoapySDRDevice_getFrequencyRange(ctx->sdr, SOAPY_SDR_RX, 0, &length);
|
||||||
fprintf(stderr, "sdr: Rx freq ranges: ");
|
fprintf(stderr, "sdr: Rx freq ranges: ");
|
||||||
for (size_t i = 0; i < length; i++) fprintf(stderr, "sdr: [%g Hz -> %g Hz], ", ranges[i].minimum, ranges[i].maximum);
|
for (size_t i = 0; i < length; i++) fprintf(stderr, "[%g Hz -> %g Hz], ", ranges[i].minimum, ranges[i].maximum);
|
||||||
fprintf(stderr, "sdr: \n");
|
fprintf(stderr, "\n");
|
||||||
free(ranges);
|
free(ranges);
|
||||||
|
|
||||||
//apply settings
|
//apply settings
|
||||||
|
|
Loading…
Reference in a new issue