add ctor to radio_multi, fix tearing down radio when not initialized

master
Andre Puschmann 6 years ago
parent 5d2a947aac
commit ecfa685dde

@ -45,7 +45,8 @@ namespace srslte {
class radio_multi : public radio class radio_multi : public radio
{ {
public: public:
radio_multi() {}
~radio_multi() {}
bool init_multi(uint32_t nof_rx_antennas, char *args = NULL, char *devname = NULL); bool init_multi(uint32_t nof_rx_antennas, char *args = NULL, char *devname = NULL);
bool rx_now(cf_t *buffer[SRSLTE_MAX_PORTS], uint32_t nof_samples, srslte_timestamp_t *rxd_time); bool rx_now(cf_t *buffer[SRSLTE_MAX_PORTS], uint32_t nof_samples, srslte_timestamp_t *rxd_time);
}; };

@ -81,7 +81,9 @@ bool radio::is_init() {
void radio::stop() void radio::stop()
{ {
srslte_rf_close(&rf_device); if (is_initialized) {
srslte_rf_close(&rf_device);
}
} }
void radio::reset() void radio::reset()

Loading…
Cancel
Save