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: Fixed InertialLabs External AHRS driver #26153

Closed
wants to merge 9 commits into from
2 changes: 1 addition & 1 deletion libraries/AP_BoardConfig/AP_BoardConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ void AP_BoardConfig::init()
#endif

if (_boot_delay_ms > 0) {
uint16_t delay_ms = uint16_t(_boot_delay_ms.get());
uint32_t delay_ms = uint32_t(_boot_delay_ms.get());
if (hal.util->was_watchdog_armed() && delay_ms > 200) {
// don't delay a long time on watchdog reset, the pilot
// may be able to save the vehicle
Expand Down
2 changes: 1 addition & 1 deletion libraries/AP_BoardConfig/AP_BoardConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ class AP_BoardConfig {
AP_Int8 _sdcard_slowdown;
#endif

AP_Int16 _boot_delay_ms;
AP_Int32 _boot_delay_ms;

AP_Int32 _options;

Expand Down
10 changes: 8 additions & 2 deletions libraries/AP_ExternalAHRS/AP_ExternalAHRS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const AP_Param::GroupInfo AP_ExternalAHRS::var_info[] = {
// @Bitmask: 0:GPS,1:IMU,2:Baro,3:Compass
// @User: Advanced
AP_GROUPINFO("_SENSORS", 4, AP_ExternalAHRS, sensors, 0xF),

AP_GROUPEND
};

Expand Down Expand Up @@ -262,6 +262,13 @@ void AP_ExternalAHRS::send_status_report(GCS_MAVLINK &link) const
}
}

void AP_ExternalAHRS::write_bytes(const char *bytes, uint8_t len)
{
if (backend) {
backend->write_bytes(bytes, len);
}
}

void AP_ExternalAHRS::update(void)
{
if (backend) {
Expand Down Expand Up @@ -302,4 +309,3 @@ AP_ExternalAHRS &externalAHRS()
};

#endif // HAL_EXTERNAL_AHRS_ENABLED

4 changes: 2 additions & 2 deletions libraries/AP_ExternalAHRS/AP_ExternalAHRS.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ class AP_ExternalAHRS {
Vector3f get_gyro(void);
Vector3f get_accel(void);
void send_status_report(class GCS_MAVLINK &link) const;
void write_bytes(const char *bytes, uint8_t len);

// update backend
void update();
Expand Down Expand Up @@ -163,7 +164,7 @@ class AP_ExternalAHRS {
float differential_pressure; // Pa
float temperature; // degC
} airspeed_data_message_t;

protected:

enum class OPTIONS {
Expand Down Expand Up @@ -197,4 +198,3 @@ namespace AP {
};

#endif // HAL_EXTERNAL_AHRS_ENABLED

Loading