hackrf
hackrf copied to clipboard
hackrf_transfer should check input parameters against accepted ranges.
Currently, hackrf_transfer -s doesn't check the sample rate or return an error if it is out of range.
This has led to some user confusion e.g:
- Setting
-s 2for 2MHz without realising that the number is in Hz not Mhz. - Setting sample rates above 20MHz, which HackRF will try to use but fail to, resulting in uncontrolled behaviour.
The accepted ranges for all parameters are given in the usage message. We should check all of the parameters against these ranges.