aboutsummaryrefslogtreecommitdiff
path: root/src/examples/subscriber
diff options
context:
space:
mode:
authorThomas Gubler <thomasgubler@gmail.com>2014-11-28 09:45:39 +0100
committerThomas Gubler <thomasgubler@gmail.com>2014-11-28 09:45:39 +0100
commit946d1203cfbbe522c61d6ed5dc1205c9f809f6f1 (patch)
tree309e94ae1c0db9e99c46d88fce7989daefe3edef /src/examples/subscriber
parent36bf0c04c8cb052c67e613eb051b0deb650eb216 (diff)
downloadpx4-firmware-946d1203cfbbe522c61d6ed5dc1205c9f809f6f1.tar.gz
px4-firmware-946d1203cfbbe522c61d6ed5dc1205c9f809f6f1.tar.bz2
px4-firmware-946d1203cfbbe522c61d6ed5dc1205c9f809f6f1.zip
remove unnecessary variable
Diffstat (limited to 'src/examples/subscriber')
-rw-r--r--src/examples/subscriber/subscriber.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/examples/subscriber/subscriber.cpp b/src/examples/subscriber/subscriber.cpp
index f8b138844..178fca4b5 100644
--- a/src/examples/subscriber/subscriber.cpp
+++ b/src/examples/subscriber/subscriber.cpp
@@ -84,8 +84,10 @@ PX4_MAIN_FUNCTION(subscriber)
// 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);
+ // 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);});
PX4_INFO("subscribed");
/**