diff options
author | Thomas Gubler <thomasgubler@gmail.com> | 2014-11-28 14:00:02 +0100 |
---|---|---|
committer | Thomas Gubler <thomasgubler@gmail.com> | 2014-11-28 14:00:02 +0100 |
commit | 1b416a8e1f2b54e183d61a0022bb48de47576a6c (patch) | |
tree | 57116a1dcb906d3a1226dd28200c1bcad57d7017 /src/examples | |
parent | b0cfc2d1226c2b62a6bf3aac1809458b04902728 (diff) | |
download | px4-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')
-rw-r--r-- | src/examples/subscriber/subscriber.cpp | 11 |
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"); /** |