aboutsummaryrefslogtreecommitdiff
path: root/src/examples
diff options
context:
space:
mode:
authorThomas Gubler <thomasgubler@gmail.com>2014-11-26 13:18:28 +0100
committerThomas Gubler <thomasgubler@gmail.com>2014-11-26 13:18:28 +0100
commitee534b827a51a7356e565b665e280f765bd8d302 (patch)
tree26509aeeb1484826e91d3f292e55a4d218b4fcc0 /src/examples
parent818a49b5a81a5b821fa9a1a13db4591da5c33751 (diff)
downloadpx4-firmware-ee534b827a51a7356e565b665e280f765bd8d302.tar.gz
px4-firmware-ee534b827a51a7356e565b665e280f765bd8d302.tar.bz2
px4-firmware-ee534b827a51a7356e565b665e280f765bd8d302.zip
move spin functions to nodehandle
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 5ee8b459b..521c7c838 100644
--- a/src/examples/publisher/publisher.cpp
+++ b/src/examples/publisher/publisher.cpp
@@ -90,7 +90,7 @@ PX4_MAIN_FUNCTION(publisher)
*/
rc_channels_pub->publish(msg);
- px4::spin_once();
+ n.spinOnce();
loop_rate.sleep();
++count;
diff --git a/src/examples/subscriber/subscriber.cpp b/src/examples/subscriber/subscriber.cpp
index 093697d8e..0d0a81d7e 100644
--- a/src/examples/subscriber/subscriber.cpp
+++ b/src/examples/subscriber/subscriber.cpp
@@ -85,7 +85,7 @@ PX4_MAIN_FUNCTION(subscriber)
* callbacks will be called from within this thread (the main one). px4::spin()
* will exit when Ctrl-C is pressed, or the node is shutdown by the master.
*/
- px4::spin();
+ n.spin();
return 0;
}