Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AP_ExternalAHRS: Clarify public interface design intent #25628

Merged
merged 1 commit into from
Nov 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions libraries/AP_ExternalAHRS/AP_ExternalAHRS_backend.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,22 @@ class AP_ExternalAHRS_backend {
// Get model/type name
virtual const char* get_name() const = 0;

// accessors for AP_AHRS
// Accessors for AP_AHRS

// If not healthy, none of the other API's can be trusted.
// Example: Serial cable is severed.
virtual bool healthy(void) const = 0;
// The communication interface is up and the device has sent valid data.
virtual bool initialised(void) const = 0;
virtual bool pre_arm_check(char *failure_msg, uint8_t failure_msg_len) const = 0;
virtual void get_filter_status(nav_filter_status &status) const {}
virtual void send_status_report(class GCS_MAVLINK &link) const {}

// check for new data
// Check for new data.
// This is used when there's not a separate thread for EAHRS.
// This can also copy interim state protected by locking.
virtual void update() = 0;

protected:
AP_ExternalAHRS::state_t &state;
uint16_t get_rate(void) const;
Expand Down