From d2df0a73e9e1b2d7eaa531c03c3f219c8c337ae0 Mon Sep 17 00:00:00 2001 From: Hamish Willee Date: Wed, 24 Jun 2026 11:11:55 +1000 Subject: [PATCH] docs(docs): Subscription handle is orb_sub_t type in example --- docs/en/modules/hello_sky.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/en/modules/hello_sky.md b/docs/en/modules/hello_sky.md index 31dbbfc6e4..02dabbb4d8 100644 --- a/docs/en/modules/hello_sky.md +++ b/docs/en/modules/hello_sky.md @@ -311,7 +311,7 @@ Subscribing to a topic is straightforward: ```cpp #include .. -int sensor_sub_fd = orb_subscribe(ORB_ID(vehicle_acceleration)); +orb_sub_t sensor_sub_fd = orb_subscribe(ORB_ID(vehicle_acceleration)); ``` The `sensor_sub_fd` is a topic handle and can be used to very efficiently perform a blocking wait for new data. @@ -324,7 +324,7 @@ Adding `poll()` to the subscription looks like (_pseudocode, look for the full i #include #include .. -int sensor_sub_fd = orb_subscribe(ORB_ID(vehicle_acceleration)); +orb_sub_t sensor_sub_fd = orb_subscribe(ORB_ID(vehicle_acceleration)); /* one could wait for multiple topics with this technique, just using one here */ px4_pollfd_struct_t fds[] = { @@ -469,7 +469,7 @@ int px4_simple_app_main(int argc, char *argv[]) PX4_INFO("Hello Sky!"); /* subscribe to vehicle_acceleration topic */ - int sensor_sub_fd = orb_subscribe(ORB_ID(vehicle_acceleration)); + orb_sub_t sensor_sub_fd = orb_subscribe(ORB_ID(vehicle_acceleration)); /* limit the update rate to 5 Hz */ orb_set_interval(sensor_sub_fd, 200);