aboutsummaryrefslogtreecommitdiff
path: root/src/examples/subscriber
diff options
context:
space:
mode:
authorThomas Gubler <thomasgubler@gmail.com>2015-01-21 18:05:31 +0100
committerThomas Gubler <thomasgubler@gmail.com>2015-01-21 18:05:31 +0100
commitf60e65b38fd051595b465f619a19effa9c13efee (patch)
tree4ec2a58047f7fd868ef33752cc33690fe04f7c5a /src/examples/subscriber
parented526173bb4f6a809e725aeb8214cf24042edd76 (diff)
downloadpx4-firmware-f60e65b38fd051595b465f619a19effa9c13efee.tar.gz
px4-firmware-f60e65b38fd051595b465f619a19effa9c13efee.tar.bz2
px4-firmware-f60e65b38fd051595b465f619a19effa9c13efee.zip
clean up subscriber example
Diffstat (limited to 'src/examples/subscriber')
-rw-r--r--src/examples/subscriber/subscriber_example.cpp5
-rw-r--r--src/examples/subscriber/subscriber_example.h3
2 files changed, 2 insertions, 6 deletions
diff --git a/src/examples/subscriber/subscriber_example.cpp b/src/examples/subscriber/subscriber_example.cpp
index fd462cd2d..18f1a9eb9 100644
--- a/src/examples/subscriber/subscriber_example.cpp
+++ b/src/examples/subscriber/subscriber_example.cpp
@@ -43,8 +43,6 @@
using namespace px4;
-// void rc_channels_callback_function(const PX4_TOPIC_T(rc_channels) &msg) {
-void rc_channels_callback_function(const px4_rc_channels &msg);
void rc_channels_callback_function(const px4_rc_channels &msg) {
PX4_INFO("I heard: [%llu]", msg.data().timestamp_last_valid);
}
@@ -64,9 +62,8 @@ SubscriberExample::SubscriberExample() :
/* Do some subscriptions */
/* Function */
- // PX4_SUBSCRIBE(_n, rc_channels, rc_channels_callback_function, _interval);
_n.subscribe<px4_rc_channels>(rc_channels_callback_function); //ROS version
-
+
// [> Class Method <]
// PX4_SUBSCRIBE(_n, rc_channels, SubscriberExample::rc_channels_callback, this, 1000);
// [> No callback <]
diff --git a/src/examples/subscriber/subscriber_example.h b/src/examples/subscriber/subscriber_example.h
index 43dafe010..883d83be7 100644
--- a/src/examples/subscriber/subscriber_example.h
+++ b/src/examples/subscriber/subscriber_example.h
@@ -41,7 +41,7 @@
using namespace px4;
-void rc_channels_callback_function(const PX4_TOPIC_T(rc_channels) &msg);
+void rc_channels_callback_function(const px4_rc_channels &msg);
class SubscriberExample {
public:
@@ -56,7 +56,6 @@ protected:
int32_t _interval;
px4_param_t _p_test_float;
float _test_float;
- // px4::PX4_SUBSCRIBER(rc_channels) * _sub_rc_chan;
px4::Subscriber<px4_rc_channels> * _sub_rc_chan;
// void rc_channels_callback(const PX4_TOPIC_T(rc_channels) &msg);