1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-09-30 07:50:51 +00:00

fix the control of the FPGA acquisition HW accelerator

This commit is contained in:
Marc Majoral 2022-06-01 15:56:51 +02:00 committed by Carles Fernandez
parent 8aeb4bf3ea
commit 918477d61f

View File

@ -481,7 +481,20 @@ int GNSSFlowgraph::connect_desktop_flowgraph()
LOG(INFO) << "Channel " << i << " assigned to " << channels_.at(i)->get_signal();
if (channels_state_[i] == 1)
{
#if ENABLE_FPGA
if (enable_fpga_offloading_)
{
// create a task for the FPGA such that it doesn't stop the flow
std::thread tmp_thread(&ChannelInterface::start_acquisition, channels_[i]);
tmp_thread.detach();
}
else
{
channels_.at(i)->start_acquisition();
}
#else
channels_.at(i)->start_acquisition();
#endif
LOG(INFO) << "Channel " << i << " connected to observables and ready for acquisition";
}
else
@ -1785,9 +1798,16 @@ void GNSSFlowgraph::acquisition_manager(unsigned int who)
channels_[current_channel]->assist_acquisition_doppler(0);
}
#if ENABLE_FPGA
// create a task for the FPGA such that it doesn't stop the flow
std::thread tmp_thread(&ChannelInterface::start_acquisition, channels_[current_channel]);
tmp_thread.detach();
if (enable_fpga_offloading_)
{
// create a task for the FPGA such that it doesn't stop the flow
std::thread tmp_thread(&ChannelInterface::start_acquisition, channels_[current_channel]);
tmp_thread.detach();
}
else
{
channels_[current_channel]->start_acquisition();
}
#else
channels_[current_channel]->start_acquisition();
#endif
@ -1891,9 +1911,16 @@ void GNSSFlowgraph::apply_action(unsigned int who, unsigned int what)
channels_[who]->set_signal(channels_[who]->get_signal());
#if ENABLE_FPGA
// create a task for the FPGA such that it doesn't stop the flow
std::thread tmp_thread(&ChannelInterface::start_acquisition, channels_[who]);
tmp_thread.detach();
if (enable_fpga_offloading_)
{
// create a task for the FPGA such that it doesn't stop the flow
std::thread tmp_thread(&ChannelInterface::start_acquisition, channels_[who]);
tmp_thread.detach();
}
else
{
channels_[who]->start_acquisition();
}
#else
channels_[who]->start_acquisition();
#endif
@ -2021,7 +2048,20 @@ void GNSSFlowgraph::start_acquisition_helper()
{
if (channels_state_[i] == 1)
{
#if ENABLE_FPGA
if (enable_fpga_offloading_)
{
// create a task for the FPGA such that it doesn't stop the flow
std::thread tmp_thread(&ChannelInterface::start_acquisition, channels_[i]);
tmp_thread.detach();
}
else
{
channels_.at(i)->start_acquisition();
}
#else
channels_.at(i)->start_acquisition();
#endif
}
}
}