aboutsummaryrefslogtreecommitdiffstats
path: root/src/fig
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2015-08-07 10:24:44 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2015-08-07 10:24:44 +0200
commitf5828b83d39757d24c8fe18eeac99fdd6e711fba (patch)
tree9f1958ef5fe1f34037a0f1c375953cb9bb4edb6b /src/fig
parentd423927765f72c8300f27a46d80452d54c39cbf9 (diff)
downloaddabmux-f5828b83d39757d24c8fe18eeac99fdd6e711fba.tar.gz
dabmux-f5828b83d39757d24c8fe18eeac99fdd6e711fba.tar.bz2
dabmux-f5828b83d39757d24c8fe18eeac99fdd6e711fba.zip
Correct deadline handling according to fillstatus
Diffstat (limited to 'src/fig')
-rw-r--r--src/fig/FIGCarousel.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/fig/FIGCarousel.cpp b/src/fig/FIGCarousel.cpp
index 8986a18..6a463c7 100644
--- a/src/fig/FIGCarousel.cpp
+++ b/src/fig/FIGCarousel.cpp
@@ -49,7 +49,7 @@ void FIGCarouselElement::reduce_deadline()
void FIGCarouselElement::increase_deadline()
{
- deadline += rate_increment_ms(fig->repetition_rate());
+ deadline = rate_increment_ms(fig->repetition_rate());
std::cerr << "FIG " << fig->name() <<
" deadline increased to: " << deadline << std::endl;
@@ -176,13 +176,14 @@ size_t FIGCarousel::carousel(
if (written > 0) {
available_size -= written;
pbuf += written;
- if (status.complete_fig_transmitted) {
- (*fig0_0)->increase_deadline();
- }
}
else {
throw std::runtime_error("Failed to write FIG0/0");
}
+
+ if (status.complete_fig_transmitted) {
+ (*fig0_0)->increase_deadline();
+ }
}
}
@@ -199,10 +200,10 @@ size_t FIGCarousel::carousel(
if (written > 0) {
available_size -= written;
pbuf += written;
+ }
- if (status.complete_fig_transmitted) {
- fig_el->increase_deadline();
- }
+ if (status.complete_fig_transmitted) {
+ fig_el->increase_deadline();
}
sorted_figs.pop_front();