Skip to content

Commit

Permalink
Merge pull request #750 from tadscottsmith/rdio-scanner-log-cleanup
Browse files Browse the repository at this point in the history
Cleaned up Rdio Scanner talkgroup display logs.
  • Loading branch information
robotastic authored Dec 22, 2022
2 parents 32ef090 + fe6a903 commit 42f3030
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions plugins/rdioscanner_uploader/rdioscanner_uploader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,6 @@ class Rdio_Scanner_Uploader : public Plugin_Api {
boost::filesystem::path audioPath(compress_wav ? call_info.converted : call_info.filename);
boost::filesystem::path audioName = audioPath.filename();

char formattedTalkgroup[62];
snprintf(formattedTalkgroup, 61, "%c[%dm%10ld%c[0m", 0x1B, 35, call_info.talkgroup, 0x1B);
std::string talkgroup_display = boost::lexical_cast<std::string>(formattedTalkgroup);

if (call_info.transmission_source_list.size() != 0) {
for (int i = 0; i < call_info.transmission_source_list.size(); i++) {
source_list << "{ \"pos\": " << std::setprecision(2) << call_info.transmission_source_list[i].position << ", \"src\": " << std::setprecision(0) << call_info.transmission_source_list[i].source << " }";
Expand Down Expand Up @@ -364,12 +360,12 @@ class Rdio_Scanner_Uploader : public Plugin_Api {
struct stat file_info;
stat(compress_wav ? call_info.converted : call_info.filename, &file_info);

BOOST_LOG_TRIVIAL(info) << "[" << call_info.short_name << "]\t\033[0;34m" << call_info.call_num << "C\033[0m\tTG: " << talkgroup_display << "\tFreq: " << format_freq(call_info.freq) << "\tRdio Scanner Upload Success - file size: " << file_info.st_size;
BOOST_LOG_TRIVIAL(info) << "[" << call_info.short_name << "]\t\033[0;34m" << call_info.call_num << "C\033[0m\tTG: " << call_info.talkgroup_display << "\tFreq: " << format_freq(call_info.freq) << "\tRdio Scanner Upload Success - file size: " << file_info.st_size;
;
return 0;
}
}
BOOST_LOG_TRIVIAL(error) << "[" << call_info.short_name << "]\t\033[0;34m" << call_info.call_num << "C\033[0m\tTG: " << talkgroup_display << "\tFreq: " << format_freq(call_info.freq) << "\tRdio Scanner Upload Error: " << response_buffer;
BOOST_LOG_TRIVIAL(error) << "[" << call_info.short_name << "]\t\033[0;34m" << call_info.call_num << "C\033[0m\tTG: " << call_info.talkgroup_display << "\tFreq: " << format_freq(call_info.freq) << "\tRdio Scanner Upload Error: " << response_buffer;
return 1;
}

Expand Down

0 comments on commit 42f3030

Please sign in to comment.