Skip to content

Commit

Permalink
AP_ExternalAHRS: added option to disable GNSS fusion
Browse files Browse the repository at this point in the history
  • Loading branch information
tridge committed Apr 18, 2024
1 parent 5b2d291 commit 45a97b6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions libraries/AP_ExternalAHRS/AP_ExternalAHRS.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ class AP_ExternalAHRS {
enum class OPTIONS {
VN_UNCOMP_IMU = 1U << 0,
AN_ARSP_AID = 1U << 1,
GNSS_DISABLE = 1U << 2,
};
bool option_is_set(OPTIONS option) const { return (options.get() & int32_t(option)) != 0; }

Expand Down
2 changes: 1 addition & 1 deletion libraries/AP_ExternalAHRS/AP_ExternalAHRS_backend.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class AP_ExternalAHRS_backend {
return true if the GNSS is disabled
*/
bool gnss_is_disabled(void) const {
return frontend.gnss_is_disabled;
return frontend.gnss_is_disabled || option_is_set(AP_ExternalAHRS::OPTIONS::GNSS_DISABLE);
}

/*
Expand Down

0 comments on commit 45a97b6

Please sign in to comment.