aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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();