[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 02/06: blocks: throttle resets the timer st
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 02/06: blocks: throttle resets the timer state when the topblock starts each block, including during a lock/unlock restart. |
Date: |
Wed, 1 Oct 2014 15:49:25 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
trondeau pushed a commit to branch master
in repository gnuradio.
commit 4ecfc89678f69692ca9197f047b9ab245136c8f4
Author: Tom Rondeau <address@hidden>
Date: Tue Sep 30 21:27:14 2014 -0400
blocks: throttle resets the timer state when the topblock starts each
block, including during a lock/unlock restart.
Addresses issue #649.
---
gr-blocks/lib/throttle_impl.cc | 8 ++++++++
gr-blocks/lib/throttle_impl.h | 3 +++
2 files changed, 11 insertions(+)
diff --git a/gr-blocks/lib/throttle_impl.cc b/gr-blocks/lib/throttle_impl.cc
index f46dece..7c24f80 100644
--- a/gr-blocks/lib/throttle_impl.cc
+++ b/gr-blocks/lib/throttle_impl.cc
@@ -57,6 +57,14 @@ namespace gr {
{
}
+ bool
+ throttle_impl::start()
+ {
+ d_start = boost::get_system_time();
+ d_total_samples = 0;
+ return block::start();
+ }
+
void
throttle_impl::set_sample_rate(double rate)
{
diff --git a/gr-blocks/lib/throttle_impl.h b/gr-blocks/lib/throttle_impl.h
index c5e43d7..6afacbb 100644
--- a/gr-blocks/lib/throttle_impl.h
+++ b/gr-blocks/lib/throttle_impl.h
@@ -41,6 +41,9 @@ namespace gr {
throttle_impl(size_t itemsize, double samples_per_sec, bool
ignore_tags=true);
~throttle_impl();
+ // Overloading gr::block::start to reset timer
+ bool start();
+
void setup_rpc();
void set_sample_rate(double rate);
- [Commit-gnuradio] [gnuradio] branch master updated (cecf6f7 -> 8b16d52), git, 2014/10/01
- [Commit-gnuradio] [gnuradio] 01/06: uhd: Amends 2fd13c0c, LO lock checks need to be removed from source as well as sink, git, 2014/10/01
- [Commit-gnuradio] [gnuradio] 06/06: Merge branch 'maint', git, 2014/10/01
- [Commit-gnuradio] [gnuradio] 02/06: blocks: throttle resets the timer state when the topblock starts each block, including during a lock/unlock restart.,
git <=
- [Commit-gnuradio] [gnuradio] 04/06: blocks: switching last calls from boost::thread to gr::thread., git, 2014/10/01
- [Commit-gnuradio] [gnuradio] 05/06: Merge remote-tracking branch 'mbant/uhd/even_less_checks', git, 2014/10/01
- [Commit-gnuradio] [gnuradio] 03/06: docs: Adds a brief explanation about adding and getting items tags inside/outside calls to work., git, 2014/10/01