Compass_HIL: use instance specific orient and external

This commit is contained in:
Randy Mackay 2014-09-24 22:29:03 +09:00 committed by Andrew Tridgell
parent 86aac4f40c
commit 7caa611eb1

View File

@ -96,9 +96,9 @@ void AP_Compass_HIL::setHIL(float roll, float pitch, float yaw)
_hil_mag.rotate(MAG_BOARD_ORIENTATION);
// add user selectable orientation
_hil_mag.rotate((enum Rotation)_orientation.get());
_hil_mag.rotate((enum Rotation)_orientation[0].get());
if (!_external) {
if (!_external[0]) {
// and add in AHRS_ORIENTATION setting if not an external compass
_hil_mag.rotate(_board_orientation);
}