AP_Compass_AK8963: Fix Rotation on the Bebop

This commit is contained in:
Julien BERAUD 2015-09-14 15:49:15 +02:00 committed by Randy Mackay
parent 6b22a59eff
commit 5602e4055b
2 changed files with 2 additions and 3 deletions

View File

@ -212,9 +212,6 @@ void AP_Compass_AK8963::read()
_make_factory_sensitivity_adjustment(field);
_make_adc_sensitivity_adjustment(field);
#if CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_BEBOP
field.rotate(ROTATION_YAW_90);
#endif
publish_filtered_field(field, _compass_instance);
}

View File

@ -33,6 +33,8 @@
# define MAG_BOARD_ORIENTATION ROTATION_ROLL_180
#elif CONFIG_HAL_BOARD == HAL_BOARD_LINUX && CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_RASPILOT
# define MAG_BOARD_ORIENTATION ROTATION_ROLL_180
#elif CONFIG_HAL_BOARD == HAL_BOARD_LINUX && CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_BEBOP
# define MAG_BOARD_ORIENTATION ROTATION_YAW_90
#else
# define MAG_BOARD_ORIENTATION ROTATION_NONE
#endif