AP_Compass: add an extra rotation for internal LSM9DS1 on Navio2

In order not to force users to set rotation themselves, we need this
hack to make an extra rotation needed for a second compass.
This commit is contained in:
Staroselskii Georgii 2016-05-10 18:29:26 +03:00 committed by Lucas De Marchi
parent 2e5cfc2849
commit a2ae662b3e

View File

@ -200,6 +200,10 @@ void AP_Compass_LSM9DS1::read()
hal.scheduler->resume_timer_procs();
#if CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_NAVIO2
field.rotate(ROTATION_ROLL_180);
#endif
publish_filtered_field(field, _compass_instance);
}