diff options
author | Dimitri Stolnikov <horiz0n@gmx.net> | 2013-06-02 16:17:27 +0200 |
---|---|---|
committer | Dimitri Stolnikov <horiz0n@gmx.net> | 2013-06-02 16:17:27 +0200 |
commit | 17c2bda9f83de3d445ed75fe93dd4435f09ea65f (patch) | |
tree | fb77572148a84f8c3e28da647ea0065d5fef1295 /lib/hackrf/hackrf_source_c.cc | |
parent | 9714f9cd749d9715ef4aac3d55cb59dd5e821fc5 (diff) |
hackrf: disable start/stop as it has caused lock-ups
Diffstat (limited to 'lib/hackrf/hackrf_source_c.cc')
-rw-r--r-- | lib/hackrf/hackrf_source_c.cc | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/lib/hackrf/hackrf_source_c.cc b/lib/hackrf/hackrf_source_c.cc index 97cefcc..e28a09d 100644 --- a/lib/hackrf/hackrf_source_c.cc +++ b/lib/hackrf/hackrf_source_c.cc @@ -173,6 +173,11 @@ hackrf_source_c::hackrf_source_c (const std::string &args) } // _thread = gruel::thread(_hackrf_wait, this); + + ret = hackrf_start_rx( _dev, _hackrf_rx_callback, (void *)this ); + if (ret != HACKRF_SUCCESS) { + std::cerr << "Failed to start RX streaming (" << ret << ")" << std::endl; + } } /* @@ -182,6 +187,10 @@ hackrf_source_c::~hackrf_source_c () { if (_dev) { // _thread.join(); + int ret = hackrf_stop_rx( _dev ); + if (ret != HACKRF_SUCCESS) { + std::cerr << "Failed to stop RX streaming (" << ret << ")" << std::endl; + } hackrf_close( _dev ); _dev = NULL; @@ -246,13 +255,13 @@ bool hackrf_source_c::start() { if ( ! _dev ) return false; - +#if 0 int ret = hackrf_start_rx( _dev, _hackrf_rx_callback, (void *)this ); if (ret != HACKRF_SUCCESS) { std::cerr << "Failed to start RX streaming (" << ret << ")" << std::endl; return false; } - +#endif return true; } @@ -260,13 +269,13 @@ bool hackrf_source_c::stop() { if ( ! _dev ) return false; - +#if 0 int ret = hackrf_stop_rx( _dev ); if (ret != HACKRF_SUCCESS) { std::cerr << "Failed to stop RX streaming (" << ret << ")" << std::endl; return false; } - +#endif return true; } |