mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-30 08:10:35 +08:00
simulator: uorb and initialization cleanup (#11825)
* Cherry pick the vehicle_imu PR #9756 src/modules/simulator directory work to submit as standalone PR. * Modify the accelsim init method mag_report usage to match usage in measure() and mag_measure() methods in the class. * Incorporate review comments in the accelsim.cpp init() method and also make the same modifications in gyrosim.cpp. * Delete unneeded mag_report initialization from accelsim init() method. * Deprecate unneeded measure() call from accelsim.cpp init() and gyrosim.cpp init().
This commit is contained in:
@@ -452,8 +452,7 @@ void Simulator::handle_message_hil_state_quaternion(const mavlink_message_t *msg
|
||||
|
||||
// always publish ground truth attitude message
|
||||
int hil_gpos_multi;
|
||||
orb_publish_auto(ORB_ID(vehicle_global_position_groundtruth), &_gpos_pub, &hil_gpos, &hil_gpos_multi,
|
||||
ORB_PRIO_HIGH);
|
||||
orb_publish_auto(ORB_ID(vehicle_global_position_groundtruth), &_gpos_pub, &hil_gpos, &hil_gpos_multi, ORB_PRIO_HIGH);
|
||||
}
|
||||
|
||||
/* local position */
|
||||
@@ -502,8 +501,7 @@ void Simulator::handle_message_hil_state_quaternion(const mavlink_message_t *msg
|
||||
|
||||
// always publish ground truth attitude message
|
||||
int hil_lpos_multi;
|
||||
orb_publish_auto(ORB_ID(vehicle_local_position_groundtruth), &_lpos_pub, &hil_lpos, &hil_lpos_multi,
|
||||
ORB_PRIO_HIGH);
|
||||
orb_publish_auto(ORB_ID(vehicle_local_position_groundtruth), &_lpos_pub, &hil_lpos, &hil_lpos_multi, ORB_PRIO_HIGH);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user