aboutsummaryrefslogtreecommitdiff
path: root/src/examples/subscriber
diff options
context:
space:
mode:
authorThomas Gubler <thomasgubler@gmail.com>2014-11-28 14:00:02 +0100
committerThomas Gubler <thomasgubler@gmail.com>2014-11-28 14:00:02 +0100
commit1b416a8e1f2b54e183d61a0022bb48de47576a6c (patch)
tree57116a1dcb906d3a1226dd28200c1bcad57d7017 /src/examples/subscriber
parentb0cfc2d1226c2b62a6bf3aac1809458b04902728 (diff)
downloadpx4-firmware-1b416a8e1f2b54e183d61a0022bb48de47576a6c.tar.gz
px4-firmware-1b416a8e1f2b54e183d61a0022bb48de47576a6c.tar.bz2
px4-firmware-1b416a8e1f2b54e183d61a0022bb48de47576a6c.zip
use interval setting correctly, improve px4::spin
Diffstat (limited to 'src/examples/subscriber')
-rw-r--r--src/examples/subscriber/subscriber.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/examples/subscriber/subscriber.cpp b/src/examples/subscriber/subscriber.cpp
index fa863463b..ed0635f18 100644
--- a/src/examples/subscriber/subscriber.cpp
+++ b/src/examples/subscriber/subscriber.cpp
@@ -81,16 +81,7 @@ PX4_MAIN_FUNCTION(subscriber)
* is the number of messages that will be buffered up before beginning to throw
* away the oldest ones.
*/
- // n.subscribe(PX4_TOPIC(rc_channels), [&](const PX4_TOPIC_T(rc_channels) &msg){rc_channels_callback(msg);});
- // n.subscribe(PX4_TOPIC(rc_channels), [&](int i){ return rc_channels_callback(i);});
- // CallbackFunction cbf = [](int i){ return rc_channels_callback(i);};
- // std::function<void(const PX4_TOPIC_T(rc_channels)&)> cbf = [](const PX4_TOPIC_T(rc_channels)& msg){ return rc_channels_callback(msg);};
- // n.subscribe<PX4_TOPIC_T(rc_channels)>(PX4_TOPIC(rc_channels), cbf);
- // n.subscribe<PX4_TOPIC_T(rc_channels)>(PX4_TOPIC(rc_channels),
- // [](const PX4_TOPIC_T(rc_channels)& msg){ return rc_channels_callback(msg);});
- // n.subscribe<PX4_TOPIC_T(rc_channels)>(PX4_TOPIC(rc_channels),
- // [](const PX4_TOPIC_T(rc_channels)& msg){ return rc_channels_callback(msg);});
- PX4_SUBSCRIBE(n, rc_channels, rc_channels_callback);
+ PX4_SUBSCRIBE(n, rc_channels, rc_channels_callback, 1000);
PX4_INFO("subscribed");
/**