Fix argument parsing for num_samples
This commit is contained in:

committed by
Mike Walters

parent
1464454835
commit
6639ab3e09
@ -194,8 +194,7 @@ int rx_callback(hackrf_transfer* transfer) {
|
|||||||
float frequency;
|
float frequency;
|
||||||
int i, j;
|
int i, j;
|
||||||
|
|
||||||
if( fd != NULL )
|
if( fd != NULL ) {
|
||||||
{
|
|
||||||
byte_count += transfer->valid_length;
|
byte_count += transfer->valid_length;
|
||||||
bytes_to_write = transfer->valid_length;
|
bytes_to_write = transfer->valid_length;
|
||||||
buf = (int8_t*) transfer->buffer;
|
buf = (int8_t*) transfer->buffer;
|
||||||
@ -275,7 +274,7 @@ int main(int argc, char** argv) {
|
|||||||
uint16_t frequencies[MAX_FREQ_COUNT];
|
uint16_t frequencies[MAX_FREQ_COUNT];
|
||||||
uint32_t num_samples = DEFAULT_SAMPLE_COUNT;
|
uint32_t num_samples = DEFAULT_SAMPLE_COUNT;
|
||||||
|
|
||||||
while( (opt = getopt(argc, argv, "a:f:p:l:g:x:d:s:")) != EOF ) {
|
while( (opt = getopt(argc, argv, "a:f:p:l:g:x:d:n:")) != EOF ) {
|
||||||
result = HACKRF_SUCCESS;
|
result = HACKRF_SUCCESS;
|
||||||
switch( opt )
|
switch( opt )
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user