mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-15 16:43:34 +08:00
use interval setting correctly, improve px4::spin
This commit is contained in:
@@ -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");
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user