AP_ExternalAHRS: Allow multiple external AHRS GPS instances

Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
This commit is contained in:
Ryan Friedman 2023-08-18 11:17:22 -06:00 committed by Peter Barker
parent 01cd42d1e7
commit 1839db7c1f
2 changed files with 8 additions and 3 deletions

View File

@ -434,7 +434,10 @@ void AP_ExternalAHRS_MicroStrain::post_filter() const
state.have_origin = true;
}
AP::gps().handle_external(gps);
uint8_t instance;
if (AP::gps().get_first_external_instance(instance)) {
AP::gps().handle_external(gps, instance);
}
}
int8_t AP_ExternalAHRS_MicroStrain::get_port(void) const

View File

@ -581,8 +581,10 @@ void AP_ExternalAHRS_VectorNav::process_packet2(const uint8_t *b)
Location::AltFrame::ABSOLUTE};
state.have_origin = true;
}
AP::gps().handle_external(gps);
uint8_t instance;
if (AP::gps().get_first_external_instance(instance)) {
AP::gps().handle_external(gps, instance);
}
}
/*