Massive changes to bladeRF_rx_gui to allow it to work with the new gain methods
and also allow it to properly inform the user of problems setting gains when
the gain mode (AGC) is set to automatic.
Some platforms have power and temperature monitoring, provide a way for them to
be exposed in matlab. To read the temperature of a device run the following:
> b = bladeRF()
> b.misc.temperature
misc.dc_power can be used to read the current power consumption
misc.dc_source be used to determine if the power is coming from USB or AC
bladeRF_XCVR has to catch up to the new way of doing things in libbladeRF. Low
level gain settings like directly RXLNA, RXVGA1, RXVGA2, TXVGA1, and TXVGA2 have
all been removed to make way for the unified gain setting based on
bladerf_set_gain(). Setting the gain value to 60 for RX indicates maximum RX
gain, while a value of 60 for TX indicates a output power of 0dBm.
Adding the new A4 and A9 boards. Currently some decisions are being made by
identifying the generation of the device. In the future this should be replaced
with a feature and capability mask.
Most of the changes that make libbladeRF return -8 still allow scripts to run
without serious issues. This commit should be changed back after a few releases
once developers have had a chance to update their scripts.
log_get_verbosity returns the current logging level, which may be useful
for situations where a lot of processing is required for verbose
logging, etc.
Fix up the verbose logging on nios_ad9361_spi_read/write so that the
numbers line up, and so that it expands out multi-reads and multi-writes
in a useful fashion.
In the event of a timeout, an error is emitted from the actual place where the timeout occurred.
Also, if ENABLE_LIBBLADERF_SYNC_LOG_VERBOSE is defined, it will now print out a condensed status of all the buffers on each run through the sync state machine.
* host: sync: add error message when wait_for_buffer times out
* host: libusb: add error message for timeout
* clean up wording on libusb.c err a bit
* host: sync_worker: add debug prints on init failures
* host: bladerf2: print wallclock time on enable_module
* host: sync: add more super-verbose debug print
* host: sync: simplify ifdef
* host: libbladeRF: clang-format modified functions
Corrects an issue where enabling multiple RX channels would create some confusing discontinuities in the sample stream.
The first RX channel configured would start samples buffering in the FIFO, but the second configuration would not be apparent until after those samples were read.
This PR also does a general refactoring of bladerf2_enable_module and associated helper functions to make the logic flow more clear.
Fixes:
host/utilities/bladeRF-cli/src/cmd/rx.c:137:13: error: ‘strncat’ output
may be truncated copying 31 bytes from a string of length 31
[-Werror=stringop-truncation]
by using fixed-sized buffers
Fixes:
host/common/src/parse.c:378:14: error: 'strncpy' specified bound depends
on the length of the source argument [-Werror=stringop-overflow=]
Allocating 128 bytes all the time resolves this.
* host: cmake: add function to set SHORT_FILE_ def
The function, based heavily off of a Stack Overflow example :), goes
through all of the source files defined for a given target and sets the
SHORT_FILE_ definition for them.
This results in debug log messages relative to the top directory of the
project, i.e.:
[DEBUG @ host/libraries/libbladeRF/src/board/bladerf2/bladerf2.c:930]
_set_tx_mute: muting TX1 (cached: 10000)
* host: libbladeRF: enable Shortfile for libbladerf_shared
I have a tendency to put 'const' in the middle of the type, e.g. struct bladerf_range const **range
I can argue that it is superior to do it that way, but I don't want to, as it makes no difference and just looks weird :)
* libbladeRF.h: put const at start of type
* board.h: move const to the start of types
* libbladeRF: brf_get_*_range expect bladerf_range**
Previously, the bladerf_get_*_range family of functions expected a
struct bladerf_range *
The gain-related functions turned out to require a double ptr to work
properly. For consistency, this commit changes libbladeRF to use a
double ptr on all the range functions, instead of just the gain ones.
* bladeRF-cli: update get-range function calls
* libbladeRF: add typedefs for common parameter types
This adds typedefs for, and changes libbladeRF.h to use said typedefs
for, the following:
bladerf_gain -> int
bladerf_sample_rate -> unsigned int
bladerf_bandwidth -> unsigned int
bladerf_frequency -> uint64_t
bladerf_timestamp -> uint64_t
bladerf_correction_value -> int16_t