mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-17 06:23:34 +08:00
move spin functions to nodehandle
This commit is contained in:
@@ -51,10 +51,6 @@ __EXPORT uint64_t get_time_micros();
|
||||
|
||||
__EXPORT bool ok();
|
||||
|
||||
__EXPORT void spin_once();
|
||||
|
||||
__EXPORT void spin();
|
||||
|
||||
class Rate
|
||||
{
|
||||
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
|
||||
namespace px4
|
||||
{
|
||||
//XXX create abstract base class
|
||||
#if defined(__linux) || (defined(__APPLE__) && defined(__MACH__))
|
||||
class NodeHandle :
|
||||
private ros::NodeHandle
|
||||
@@ -83,6 +84,10 @@ public:
|
||||
_pubs.push_back(pub);
|
||||
return pub;
|
||||
}
|
||||
|
||||
void spin() { ros::spin(); }
|
||||
|
||||
void spinOnce() { ros::spinOnce(); }
|
||||
private:
|
||||
static const uint32_t kQueueSizeDefault = 1000;
|
||||
std::list<Subscriber*> _subs;
|
||||
|
||||
@@ -58,14 +58,4 @@ bool ok()
|
||||
return ros::ok();
|
||||
}
|
||||
|
||||
void spin_once()
|
||||
{
|
||||
ros::spinOnce();
|
||||
}
|
||||
|
||||
void spin()
|
||||
{
|
||||
ros::spin();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user