mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-25 08:36:08 +08:00
move spin functions to nodehandle
This commit is contained in:
@@ -90,7 +90,7 @@ PX4_MAIN_FUNCTION(publisher)
|
||||
*/
|
||||
rc_channels_pub->publish(msg);
|
||||
|
||||
px4::spin_once();
|
||||
n.spinOnce();
|
||||
|
||||
loop_rate.sleep();
|
||||
++count;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user