Browse Source

Compass_HMC5843: use instance specific orient and external

mission-4.1.18
Randy Mackay 11 years ago committed by Andrew Tridgell
parent
commit
86aac4f40c
  1. 4
      libraries/AP_Compass/AP_Compass_HMC5843.cpp

4
libraries/AP_Compass/AP_Compass_HMC5843.cpp

@ -364,9 +364,9 @@ bool AP_Compass_HMC5843::read()
_field[0].rotate(MAG_BOARD_ORIENTATION); _field[0].rotate(MAG_BOARD_ORIENTATION);
// add user selectable 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 // and add in AHRS_ORIENTATION setting if not an external compass
_field[0].rotate(_board_orientation); _field[0].rotate(_board_orientation);
} }

Loading…
Cancel
Save