mirror of https://github.com/PentHertz/srsLTE.git
Restart rx_stream on radio error
This commit is contained in:
parent
91664ef2be
commit
ed52604d30
|
@ -87,11 +87,8 @@ void radio::stop()
|
||||||
void radio::reset()
|
void radio::reset()
|
||||||
{
|
{
|
||||||
printf("Resetting Radio...\n");
|
printf("Resetting Radio...\n");
|
||||||
srslte_rf_close(&rf_device);
|
srslte_rf_stop_rx_stream(&rf_device);
|
||||||
sleep(3);
|
radio_is_streaming = false;
|
||||||
if (srslte_rf_open_devname(&rf_device, saved_devname, saved_args, saved_nof_channels)) {
|
|
||||||
fprintf(stderr, "Error opening RF device\n");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void radio::set_manual_calibration(rf_cal_t* calibration)
|
void radio::set_manual_calibration(rf_cal_t* calibration)
|
||||||
|
|
|
@ -143,16 +143,10 @@ void phch_recv::reset()
|
||||||
void phch_recv::radio_error()
|
void phch_recv::radio_error()
|
||||||
{
|
{
|
||||||
log_h->error("SYNC: Receiving from radio.\n");
|
log_h->error("SYNC: Receiving from radio.\n");
|
||||||
phy_state = IDLE;
|
phy_state = CELL_SEARCH;
|
||||||
|
|
||||||
// Need to find a method to effectively reset radio, reloading the driver does not work
|
|
||||||
//radio_h->reset();
|
|
||||||
radio_h->stop();
|
|
||||||
|
|
||||||
fprintf(stdout, "Error while receiving samples. Restart srsUE\n");
|
|
||||||
exit(-1);
|
|
||||||
|
|
||||||
reset();
|
reset();
|
||||||
|
// Need to find a method to effectively reset radio, reloading the driver does not work
|
||||||
|
radio_h->reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
void phch_recv::set_cfo(float cfo) {
|
void phch_recv::set_cfo(float cfo) {
|
||||||
|
|
Loading…
Reference in New Issue