aboutsummaryrefslogtreecommitdiffstats
path: root/src/fig/FIGCarousel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/fig/FIGCarousel.cpp')
-rw-r--r--src/fig/FIGCarousel.cpp34
1 files changed, 23 insertions, 11 deletions
diff --git a/src/fig/FIGCarousel.cpp b/src/fig/FIGCarousel.cpp
index ec5855f..8c7558a 100644
--- a/src/fig/FIGCarousel.cpp
+++ b/src/fig/FIGCarousel.cpp
@@ -44,7 +44,7 @@ void FIGCarouselElement::reduce_deadline()
deadline -= 24; //ms
if (deadline < 0) {
- etiLog.level(warn) << "Could not respect repetition rate for FIG " <<
+ etiLog.level(debug) << "Could not respect repetition rate for FIG " <<
fig->name() << " (" << deadline << "ms late)";
}
}
@@ -158,10 +158,6 @@ size_t FIGCarousel::write_fibs(
auto& fig = fib_fig.second;
for (auto& fig_el : fig) {
fig_el.reduce_deadline();
-#if CAROUSELDEBUG
- std::cerr << " * " << fig_el.fig->name() <<
- " d:" << fig_el.deadline << std::endl;
-#endif
}
}
@@ -231,6 +227,15 @@ size_t FIGCarousel::carousel(
return left->deadline < right->deadline;
});
+#if CAROUSELDEBUG
+ std::cerr << " ************** FIGs" << std::endl;
+ for (auto& f : sorted_figs) {
+ std::cerr << " FIG" << f->fig->figtype() << "/" <<
+ f->fig->figextension() << " deadline " <<
+ f->deadline << std::endl;
+ }
+#endif
+
/* Data structure to carry FIB */
size_t available_size = bufsize;
@@ -250,8 +255,10 @@ size_t FIGCarousel::carousel(
pbuf += written;
#if CAROUSELDEBUG
- std::cerr << " ****** FIG0/0(special) wrote\t" << written << " bytes"
- << std::endl;
+ if (written) {
+ std::cerr << " ****** FIG0/0(special) wrote\t" << written << " bytes"
+ << std::endl;
+ }
if ( (*fig0_0)->fig->figtype() != 0 or
(*fig0_0)->fig->figextension() != 0 or
@@ -302,10 +309,15 @@ size_t FIGCarousel::carousel(
pbuf += written;
}
#if CAROUSELDEBUG
- std::cerr << " ****** FIG" << fig_el->fig->figtype() << "/" <<
- fig_el->fig->figextension() << " wrote\t" << written <<
- " bytes" << (status.complete_fig_transmitted ? ", complete" :
- ", incomplete") << std::endl;
+ if (written) {
+ std::cerr <<
+ " ** FIB" << fib <<
+ " FIG" << fig_el->fig->figtype() << "/" <<
+ fig_el->fig->figextension() <<
+ " wrote\t" << written << " bytes" <<
+ (status.complete_fig_transmitted ? ", complete" : ", incomplete") <<
+ std::endl;
+ }
#endif
if (status.complete_fig_transmitted) {