diff options
author | Thomas Gubler <thomasgubler@gmail.com> | 2015-01-21 17:40:42 +0100 |
---|---|---|
committer | Thomas Gubler <thomasgubler@gmail.com> | 2015-01-21 17:40:42 +0100 |
commit | 2a2594a1717a5067ac1f209974851f9512e46415 (patch) | |
tree | f02ce39fccbac3d64d348fc1976f845bc7f1210b /src/platforms/px4_nodehandle.h | |
parent | 1511fd7b2dd19e0ae4c63553cbaf00e2a753148f (diff) | |
download | px4-firmware-2a2594a1717a5067ac1f209974851f9512e46415.tar.gz px4-firmware-2a2594a1717a5067ac1f209974851f9512e46415.tar.bz2 px4-firmware-2a2594a1717a5067ac1f209974851f9512e46415.zip |
re-enable adding of subscriber to list
Diffstat (limited to 'src/platforms/px4_nodehandle.h')
-rw-r--r-- | src/platforms/px4_nodehandle.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/platforms/px4_nodehandle.h b/src/platforms/px4_nodehandle.h index 5ae4f9325..4a1e70075 100644 --- a/src/platforms/px4_nodehandle.h +++ b/src/platforms/px4_nodehandle.h @@ -249,11 +249,11 @@ public: // SubscriberUORBCallback<T> *sub_px4 = new SubscriberUORBCallback<T>(uorb_sub, interval, callback); SubscriberUORBCallback<T> *sub_px4 = new SubscriberUORBCallback<T>(uorb_sub, interval, std::bind(fp, std::placeholders::_1)); - // [> Check if this is the smallest interval so far and update _sub_min_interval <] - // if (_sub_min_interval == nullptr || _sub_min_interval->get_interval() > interval) { - // _sub_min_interval = sub_px4; - // } - // _subs.add((SubscriberNode *)sub_px4); + /* Check if this is the smallest interval so far and update _sub_min_interval */ + if (_sub_min_interval == nullptr || _sub_min_interval->get_interval() > interval) { + _sub_min_interval = sub_px4; + } + _subs.add((SubscriberNode *)sub_px4); return (Subscriber<T> *)sub_px4; } |