mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2025-01-11 18:57:11 +01:00
Merge pull request #167 from mbiette/hackrf_close_workaround
Added error log to the HackRF start and stop calls
This commit is contained in:
commit
6ef58f2e7c
@ -229,8 +229,8 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
int err = hackrf_open_by_serial(_this->selectedSerial.c_str(), &_this->openDev);
|
int err = hackrf_open_by_serial(_this->selectedSerial.c_str(), &_this->openDev);
|
||||||
if (err != 0) {
|
if (err != HACKRF_SUCCESS) {
|
||||||
spdlog::error("Could not open HackRF {0}", _this->selectedSerial);
|
spdlog::error("Could not open HackRF {0}: {1}", _this->selectedSerial, hackrf_error_name(err));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -257,7 +257,10 @@ private:
|
|||||||
_this->running = false;
|
_this->running = false;
|
||||||
_this->stream.stopWriter();
|
_this->stream.stopWriter();
|
||||||
// TODO: Stream stop
|
// TODO: Stream stop
|
||||||
hackrf_close(_this->openDev);
|
int err = hackrf_close(_this->openDev);
|
||||||
|
if (err != HACKRF_SUCCESS) {
|
||||||
|
spdlog::error("Could not close HackRF {0}: {1}", _this->selectedSerial, hackrf_error_name(err));
|
||||||
|
}
|
||||||
_this->stream.clearWriteStop();
|
_this->stream.clearWriteStop();
|
||||||
spdlog::info("HackRFSourceModule '{0}': Stop!", _this->name);
|
spdlog::info("HackRFSourceModule '{0}': Stop!", _this->name);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user