mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-04 15:50:36 +08:00
uORB::Subscription minor API cleanup
* the forceInit() method was combined with the existing subscribe() * delete unused last_update()
This commit is contained in:
@@ -188,21 +188,18 @@ bool MicroBenchORB::time_px4_uorb_direct()
|
||||
|
||||
uORB::Subscription vstatus{ORB_ID(vehicle_status)};
|
||||
PERF("uORB::Subscription orb_check vehicle_status", ret = vstatus.updated(), 1000);
|
||||
PERF("uORB::Subscription orb_stat vehicle_status", time = vstatus.last_update(), 1000);
|
||||
PERF("uORB::Subscription orb_copy vehicle_status", ret = vstatus.copy(&status), 1000);
|
||||
|
||||
printf("\n");
|
||||
|
||||
uORB::Subscription local_pos{ORB_ID(vehicle_local_position)};
|
||||
PERF("uORB::Subscription orb_check vehicle_local_position", ret = local_pos.updated(), 1000);
|
||||
PERF("uORB::Subscription orb_stat vehicle_local_position", time = local_pos.last_update(), 1000);
|
||||
PERF("uORB::Subscription orb_copy vehicle_local_position", ret = local_pos.copy(&lpos), 1000);
|
||||
|
||||
printf("\n");
|
||||
|
||||
uORB::Subscription sens_gyro{ORB_ID(sensor_gyro)};
|
||||
PERF("uORB::Subscription orb_check sensor_gyro", ret = sens_gyro.updated(), 1000);
|
||||
PERF("uORB::Subscription orb_stat sensor_gyro", time = sens_gyro.last_update(), 1000);
|
||||
PERF("uORB::Subscription orb_copy sensor_gyro", ret = sens_gyro.copy(&gyro), 1000);
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user