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:
Mark Sauder
2019-04-16 00:29:53 -06:00
committed by Beat Küng
parent f9324fb76a
commit 74bc6870ed
5 changed files with 43 additions and 139 deletions

View File

@@ -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);
}
}