mirror of
https://github.com/greatscottgadgets/hackrf.git
synced 2026-02-20 00:33:48 +01:00
hackrf_transfer: quieted more things
This commit is contained in:
@@ -974,7 +974,9 @@ int main(int argc, char** argv) {
|
|||||||
|
|
||||||
gettimeofday(&t_end, NULL);
|
gettimeofday(&t_end, NULL);
|
||||||
time_diff = TimevalDiff(&t_end, &t_start);
|
time_diff = TimevalDiff(&t_end, &t_start);
|
||||||
printf("Total time: %5.5f s\n", time_diff);
|
if (!quiet) {
|
||||||
|
printf("Total time: %5.5f s\n", time_diff);
|
||||||
|
}
|
||||||
|
|
||||||
if(device != NULL)
|
if(device != NULL)
|
||||||
{
|
{
|
||||||
@@ -982,8 +984,8 @@ int main(int argc, char** argv) {
|
|||||||
{
|
{
|
||||||
result = hackrf_stop_rx(device);
|
result = hackrf_stop_rx(device);
|
||||||
if( result != HACKRF_SUCCESS ) {
|
if( result != HACKRF_SUCCESS ) {
|
||||||
printf("hackrf_stop_rx() failed: %s (%d)\n", hackrf_error_name(result), result);
|
fprintf(stderr, "hackrf_stop_rx() failed: %s (%d)\n", hackrf_error_name(result), result);
|
||||||
}else {
|
} else if (!quiet) {
|
||||||
printf("hackrf_stop_rx() done\n");
|
printf("hackrf_stop_rx() done\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -992,8 +994,8 @@ int main(int argc, char** argv) {
|
|||||||
{
|
{
|
||||||
result = hackrf_stop_tx(device);
|
result = hackrf_stop_tx(device);
|
||||||
if( result != HACKRF_SUCCESS ) {
|
if( result != HACKRF_SUCCESS ) {
|
||||||
printf("hackrf_stop_tx() failed: %s (%d)\n", hackrf_error_name(result), result);
|
fprintf(stderr, "hackrf_stop_tx() failed: %s (%d)\n", hackrf_error_name(result), result);
|
||||||
}else {
|
} else if (!quiet) {
|
||||||
printf("hackrf_stop_tx() done\n");
|
printf("hackrf_stop_tx() done\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1001,13 +1003,15 @@ int main(int argc, char** argv) {
|
|||||||
result = hackrf_close(device);
|
result = hackrf_close(device);
|
||||||
if( result != HACKRF_SUCCESS )
|
if( result != HACKRF_SUCCESS )
|
||||||
{
|
{
|
||||||
printf("hackrf_close() failed: %s (%d)\n", hackrf_error_name(result), result);
|
fprintf(stderr, "hackrf_close() failed: %s (%d)\n", hackrf_error_name(result), result);
|
||||||
}else {
|
} else if (!quiet) {
|
||||||
printf("hackrf_close() done\n");
|
printf("hackrf_close() done\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
hackrf_exit();
|
hackrf_exit();
|
||||||
printf("hackrf_exit() done\n");
|
if (!quiet) {
|
||||||
|
printf("hackrf_exit() done\n");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(fd != NULL)
|
if(fd != NULL)
|
||||||
@@ -1027,7 +1031,9 @@ int main(int argc, char** argv) {
|
|||||||
}
|
}
|
||||||
fclose(fd);
|
fclose(fd);
|
||||||
fd = NULL;
|
fd = NULL;
|
||||||
printf("fclose(fd) done\n");
|
if (!quiet) {
|
||||||
|
printf("fclose(fd) done\n");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
printf("exit\n");
|
printf("exit\n");
|
||||||
return exit_code;
|
return exit_code;
|
||||||
|
|||||||
Reference in New Issue
Block a user