mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-05 07:28:29 -04:00
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:
parent
2e5cfc2849
commit
a2ae662b3e
@ -200,6 +200,10 @@ void AP_Compass_LSM9DS1::read()
|
|||||||
|
|
||||||
hal.scheduler->resume_timer_procs();
|
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);
|
publish_filtered_field(field, _compass_instance);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user