Starting with this release we will no longer use "unknown" as the
default software version string used in cases where the version cannot
be determined from context. Instead we commit the release version string
to git so that any software built from the tagged commit will have the
appropriate release version string. After the release we will commit a
post-release version string as the new default.
We will continue to use the commit hash as version string when the
software is built inside a git repository.
This avoids a confusing condition when hackrf_transfer is reading from
stdin with -R in which it does not repeat previous data but repeatedly
restarts reading new data after the user types Ctrl-D to indicate EOF.
The -R option should repeat previous data or should do nothing if the
input file cannot be rewound.
Where our callback is called with a status other than COMPLETED,
something abnormal has happened and we no longer want to either
submit further transfers or await a flush. So clear the streaming
and flush flags, and proceed to transfer_finished.
Do the same in the case where libusb_submit_transfer fails when
called to submit the flush transfer.
Fixes a bug introduced in 8a9af7a: Statistics skipped for initial
buffers not only when preloaded in TX mode but also in RX mode with no
preloading.
The total bytes transferred may appear inflated in RX mode when
receiving a small number of samples with -n, but the stats represent
data transferred over USB, some of which may have been discarded by the
host.
Instead of sending a signal to the process group, get our own process ID
and send the signal to it. This fixes a bug that prevented termination
when called from a script.
dBFS is defined in AES Standard AES17-1998, IEC 61606, and ITU-T Recs.
P.381 and P.382, such that the RMS value of a full-scale sine wave is
designated 0 dBFS.
A full scale sine wave on HackRF has the range -127 to 127.
We calculate the full scale ratio relative to a signal in which both I
and Q are held at 127. This represents a signal with sqrt(2) times
the amplitude, and thus twice the power, of a full scale sine wave.
Therefore to obtain dBfs by the above definition, we add 3dB.
The power measurement depends on the number of bytes that were valid
from the previous use of the transfer buffer.
The number of bytes to be read to fill the next transfer, is the full
size of the buffer.
Firmware now detects the hardware it is running on at startup and
refuses to run if it is compiled for the wrong platform. The board ID
returned by firmware to the host is now derived from run-time detection
rather than a compile-time value. A separate method to retrieve
compile-time supported platform is added.
On HackRF One, pin straps are checked to determine hardware revision.
This is informational to aid troubleshooting and does not affect any
function.