mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-23 16:23:56 -04:00
AP_Compass_HIL: use new compass backend interface
This commit is contained in:
parent
cd5cf45ba8
commit
8800d03fce
@ -61,7 +61,11 @@ void AP_Compass_HIL::read()
|
|||||||
{
|
{
|
||||||
for (uint8_t i=0; i < ARRAY_SIZE(_compass_instance); i++) {
|
for (uint8_t i=0; i < ARRAY_SIZE(_compass_instance); i++) {
|
||||||
if (_compass._hil.healthy[i]) {
|
if (_compass._hil.healthy[i]) {
|
||||||
publish_field(_compass._hil.field[_compass_instance[i]], _compass_instance[i]);
|
uint8_t compass_instance = _compass_instance[i];
|
||||||
|
Vector3f field = _compass._hil.field[compass_instance];
|
||||||
|
rotate_field(field, compass_instance);
|
||||||
|
correct_field(field, compass_instance);
|
||||||
|
publish_filtered_field(field, compass_instance);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user