Remove delays from hackrf_stop_rx_cmd and hackrf_stop_tx_cmd.
These were added in #805, as a workaround to prevent their parent functions from returning before transfer cancellations had completed. This has since been fixed properly in #1029.
This commit is contained in:
@ -1887,13 +1887,7 @@ int ADDCALL hackrf_start_rx(hackrf_device* device, hackrf_sample_block_cb_fn cal
|
|||||||
static int hackrf_stop_rx_cmd(hackrf_device* device)
|
static int hackrf_stop_rx_cmd(hackrf_device* device)
|
||||||
{
|
{
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
result = hackrf_set_transceiver_mode(device, HACKRF_TRANSCEIVER_MODE_OFF);
|
result = hackrf_set_transceiver_mode(device, HACKRF_TRANSCEIVER_MODE_OFF);
|
||||||
#ifdef _WIN32
|
|
||||||
Sleep(10);
|
|
||||||
#else
|
|
||||||
usleep(10 * 1000);
|
|
||||||
#endif
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1935,11 +1929,6 @@ static int hackrf_stop_tx_cmd(hackrf_device* device)
|
|||||||
{
|
{
|
||||||
int result;
|
int result;
|
||||||
result = hackrf_set_transceiver_mode(device, HACKRF_TRANSCEIVER_MODE_OFF);
|
result = hackrf_set_transceiver_mode(device, HACKRF_TRANSCEIVER_MODE_OFF);
|
||||||
#ifdef _WIN32
|
|
||||||
Sleep(10);
|
|
||||||
#else
|
|
||||||
usleep(10 * 1000);
|
|
||||||
#endif
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user