Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes retuning the CC when it has to move to a new source #810

Merged
merged 1 commit into from
May 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions trunk-recorder/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1342,22 +1342,18 @@ void retune_system(System *sys) {
// We must lock the flow graph in order to disconnect and reconnect blocks
tb->lock();
tb->disconnect(current_source->get_src_block(), 0, system->smartnet_trunking, 0);
system->smartnet_trunking = make_smartnet_trunking(control_channel_freq, source->get_center(), source->get_rate(), msg_queue, system->get_sys_num());
tb->connect(source->get_src_block(), 0, system->smartnet_trunking, 0);
tb->unlock();
system->smartnet_trunking->set_center(source->get_center());
system->smartnet_trunking->set_rate(source->get_rate());
system->smartnet_trunking->tune_freq(control_channel_freq);
system->smartnet_trunking->reset();
} else if (system->get_system_type() == "p25") {
system->set_source(source);
// We must lock the flow graph in order to disconnect and reconnect blocks
tb->lock();
tb->disconnect(current_source->get_src_block(), 0, system->p25_trunking, 0);
system->p25_trunking = make_p25_trunking(control_channel_freq, source->get_center(), source->get_rate(), msg_queue, system->get_qpsk_mod(), system->get_sys_num());
tb->connect(source->get_src_block(), 0, system->p25_trunking, 0);
tb->unlock();
system->p25_trunking->set_center(source->get_center());
system->p25_trunking->set_rate(source->get_rate());
system->p25_trunking->tune_freq(control_channel_freq);
} else {
BOOST_LOG_TRIVIAL(error) << "\t - Unkown system type for Retune";
}
Expand Down