Skip to content

Commit

Permalink
Include TDMA slot number in transmission_sink(). (#835)
Browse files Browse the repository at this point in the history
  • Loading branch information
tadscottsmith committed Jul 12, 2023
1 parent a84090b commit 767455b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion trunk-recorder/call_concluder/call_concluder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ Call_Data_t Call_Concluder::create_base_filename(Call *call, Call_Data_t call_in
if (call->get_tdma_slot() == -1) {
nchars = snprintf(base_filename, 255, "%s/%ld-%ld_%.0f", base_path_string.c_str(), call->get_talkgroup(), work_start_time, call->get_freq());
} else {
// this is for the case when it is a DMR recorder and 2 wav files are created, the slot is needed to keep them separate.
// this is for the case when it is a P25P2 TDMA or DMR recorder and 2 wav files are created, the slot is needed to keep them separate.
nchars = snprintf(base_filename, 255, "%s/%ld-%ld_%.0f.%d", base_path_string.c_str(), call->get_talkgroup(), work_start_time, call->get_freq(), call->get_tdma_slot());
}
if (nchars >= 255) {
Expand Down
2 changes: 1 addition & 1 deletion trunk-recorder/gr_blocks/transmission_sink.cc
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ void transmission_sink::create_filename() {
if (d_slot == -1) {
nchars = snprintf(current_filename, 255, "%s/%ld-%ld_%.0f.wav", temp_path_string.c_str(), d_current_call_talkgroup, work_start_time, d_current_call_freq);
} else {
// this is for the case when it is a DMR recorder and 2 wav files are created, the slot is needed to keep them separate.
// this is for the case when it is a P25P2 TDMA or DMR recorder and 2 wav files are created, the slot is needed to keep them separate.
nchars = snprintf(current_filename, 255, "%s/%ld-%ld_%.0f.%d.wav", temp_path_string.c_str(), d_current_call_talkgroup, work_start_time, d_current_call_freq, d_slot);
}
if (nchars >= 255) {
Expand Down
8 changes: 7 additions & 1 deletion trunk-recorder/recorders/p25_recorder_decode.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,13 @@ void p25_recorder_decode::stop() {

void p25_recorder_decode::start(Call *call) {
levels->set_k(call->get_system()->get_digital_levels());
wav_sink->start_recording(call);

if(call->get_phase2_tdma()){
wav_sink->start_recording(call, call->get_tdma_slot());
} else {
wav_sink->start_recording(call);
}

d_call = call;
}

Expand Down

0 comments on commit 767455b

Please sign in to comment.