macro for topic subscription

This commit is contained in:
Thomas Gubler
2014-11-28 10:18:28 +01:00
parent bfc0a52ea2
commit 59a9648bb6
2 changed files with 11 additions and 6 deletions
+5 -2
View File
@@ -86,8 +86,11 @@ PX4_MAIN_FUNCTION(subscriber)
// 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);});
// 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_INFO("subscribed");
/**