aboutsummaryrefslogtreecommitdiff
path: root/src/examples
diff options
context:
space:
mode:
Diffstat (limited to 'src/examples')
-rw-r--r--src/examples/publisher/publisher.cpp2
-rw-r--r--src/examples/subscriber/subscriber.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/examples/publisher/publisher.cpp b/src/examples/publisher/publisher.cpp
index 6869e765b..c09cca1fc 100644
--- a/src/examples/publisher/publisher.cpp
+++ b/src/examples/publisher/publisher.cpp
@@ -57,7 +57,7 @@ int main(int argc, char **argv)
* than we can send them, the number here specifies how many messages to
* buffer up before throwing some away.
*/
- px4::Publisher rc_channels_pub = n.advertise<px4::rc_channels>("rc_channels");
+ px4::Publisher rc_channels_pub = n.advertise<px4::rc_channels>(PX4_TOPIC(rc_channels));
px4::Rate loop_rate(10);
diff --git a/src/examples/subscriber/subscriber.cpp b/src/examples/subscriber/subscriber.cpp
index 828b1f937..b91859027 100644
--- a/src/examples/subscriber/subscriber.cpp
+++ b/src/examples/subscriber/subscriber.cpp
@@ -74,7 +74,7 @@ int main(int argc, char **argv)
* is the number of messages that will be buffered up before beginning to throw
* away the oldest ones.
*/
- px4::Subscriber sub = n.subscribe("rc_channels", rc_channels_callback);
+ px4::Subscriber sub = n.subscribe(PX4_TOPIC(rc_channels), rc_channels_callback);
PX4_INFO("subscribed");
/**