use interval setting correctly, improve px4::spin

This commit is contained in:
Thomas Gubler
2014-11-28 14:00:02 +01:00
parent b0cfc2d122
commit 1b416a8e1f
3 changed files with 35 additions and 20 deletions
+1 -10
View File
@@ -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");
/**