mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-11 02:18:29 -04:00
AP_Compass_AK8963: Fix Rotation on the Bebop
This commit is contained in:
parent
6b22a59eff
commit
5602e4055b
@ -212,9 +212,6 @@ void AP_Compass_AK8963::read()
|
|||||||
_make_factory_sensitivity_adjustment(field);
|
_make_factory_sensitivity_adjustment(field);
|
||||||
_make_adc_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);
|
publish_filtered_field(field, _compass_instance);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,6 +33,8 @@
|
|||||||
# define MAG_BOARD_ORIENTATION ROTATION_ROLL_180
|
# define MAG_BOARD_ORIENTATION ROTATION_ROLL_180
|
||||||
#elif CONFIG_HAL_BOARD == HAL_BOARD_LINUX && CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_RASPILOT
|
#elif CONFIG_HAL_BOARD == HAL_BOARD_LINUX && CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_RASPILOT
|
||||||
# define MAG_BOARD_ORIENTATION ROTATION_ROLL_180
|
# 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
|
#else
|
||||||
# define MAG_BOARD_ORIENTATION ROTATION_NONE
|
# define MAG_BOARD_ORIENTATION ROTATION_NONE
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user