diff options
author | Thomas Gubler <thomasgubler@gmail.com> | 2014-11-24 17:38:27 +0100 |
---|---|---|
committer | Thomas Gubler <thomasgubler@gmail.com> | 2014-11-24 17:38:27 +0100 |
commit | 1826fa5d39a5feb2a7c044102c899c23c1f12453 (patch) | |
tree | fac6bd06ecaa4884c6b7477c2700f87743a6ea76 /src/platforms/px4_nodehandle.h | |
parent | 3f36d30a3413cd70096e953a2c9ea0ded65bf24e (diff) | |
download | px4-firmware-1826fa5d39a5feb2a7c044102c899c23c1f12453.tar.gz px4-firmware-1826fa5d39a5feb2a7c044102c899c23c1f12453.tar.bz2 px4-firmware-1826fa5d39a5feb2a7c044102c899c23c1f12453.zip |
improve subsciber api
Diffstat (limited to 'src/platforms/px4_nodehandle.h')
-rw-r--r-- | src/platforms/px4_nodehandle.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/platforms/px4_nodehandle.h b/src/platforms/px4_nodehandle.h index df198615c..809d0eb15 100644 --- a/src/platforms/px4_nodehandle.h +++ b/src/platforms/px4_nodehandle.h @@ -50,8 +50,9 @@ class NodeHandle : private ros::NodeHandle public: template<class M> Subscriber* subscribe(const char *topic, void(*fp)(M)) { - ros::NodeHandle::subscribe("rc_channels", 1000, fp); - return new Subscriber(); + ros::Subscriber ros_sub = ros::NodeHandle::subscribe(topic, 1000, fp); + //XXX create list here, for ros and nuttx + return new Subscriber(ros_sub); } }; #else |