Compass_HMC5843: use instance specific orient and external

This commit is contained in:
Randy Mackay 2014-09-24 22:28:49 +09:00 committed by Andrew Tridgell
parent 900896977c
commit 86aac4f40c

View File

@ -364,9 +364,9 @@ bool AP_Compass_HMC5843::read()
_field[0].rotate(MAG_BOARD_ORIENTATION);
// add user selectable orientation
_field[0].rotate((enum Rotation)_orientation.get());
_field[0].rotate((enum Rotation)_orientation[0].get());
if (!_external) {
if (!_external[0]) {
// and add in AHRS_ORIENTATION setting if not an external compass
_field[0].rotate(_board_orientation);
}