mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-22 08:38:36 -04:00
AP_ExternalAHRS: honour AP_COMPASS_EXTERNALAHRS_ENABLED
This commit is contained in:
parent
2c93b7809c
commit
c47a698edd
@ -262,12 +262,14 @@ void AP_ExternalAHRS_LORD::post_imu() const
|
||||
AP::ins().handle_external(ins);
|
||||
}
|
||||
|
||||
#if AP_COMPASS_EXTERNALAHRS_ENABLED
|
||||
{
|
||||
AP_ExternalAHRS::mag_data_message_t mag {
|
||||
field: imu_data.mag
|
||||
};
|
||||
AP::compass().handle_external(mag);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if AP_BARO_EXTERNALAHRS_ENABLED
|
||||
{
|
||||
|
@ -486,6 +486,7 @@ void AP_ExternalAHRS_VectorNav::process_packet1(const uint8_t *b)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if AP_COMPASS_EXTERNALAHRS_ENABLED
|
||||
{
|
||||
AP_ExternalAHRS::mag_data_message_t mag;
|
||||
mag.field = Vector3f{pkt1.mag[0], pkt1.mag[1], pkt1.mag[2]};
|
||||
@ -493,6 +494,7 @@ void AP_ExternalAHRS_VectorNav::process_packet1(const uint8_t *b)
|
||||
|
||||
AP::compass().handle_external(mag);
|
||||
}
|
||||
#endif
|
||||
|
||||
{
|
||||
AP_ExternalAHRS::ins_data_message_t ins;
|
||||
@ -617,6 +619,7 @@ void AP_ExternalAHRS_VectorNav::process_packet_VN_100(const uint8_t *b)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if AP_COMPASS_EXTERNALAHRS_ENABLED
|
||||
{
|
||||
AP_ExternalAHRS::mag_data_message_t mag;
|
||||
if (use_uncomp) {
|
||||
@ -628,6 +631,7 @@ void AP_ExternalAHRS_VectorNav::process_packet_VN_100(const uint8_t *b)
|
||||
|
||||
AP::compass().handle_external(mag);
|
||||
}
|
||||
#endif
|
||||
|
||||
{
|
||||
AP_ExternalAHRS::ins_data_message_t ins;
|
||||
|
Loading…
Reference in New Issue
Block a user