Skip to content

Commit

Permalink
Sub: add arming check for backup origin
Browse files Browse the repository at this point in the history
Co-authored-by: Clyde McQueen <clyde@mcqueen.net>
  • Loading branch information
Williangalvani and clydemcqueen committed Jul 11, 2024
1 parent bd27edc commit 62d9b14
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion ArduSub/AP_Arming_Sub.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,11 @@ bool AP_Arming_Sub::arm(AP_Arming::Method method, bool do_arming_checks)
// if we do not have an ekf origin then we can't use the WMM tables
if (!sub.ensure_ekf_origin()) {
gcs().send_text(MAV_SEVERITY_WARNING, "Compass performance degraded");
if (check_enabled(ARMING_CHECK_PARAMETERS)) {
check_failed(ARMING_CHECK_PARAMETERS, true, "No world position, check ORIGIN_* parameters");
return false;
}
}

// return success
return true;
}
Expand Down
4 changes: 2 additions & 2 deletions ArduSub/Parameters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -709,14 +709,14 @@ const AP_Param::GroupInfo ParametersG2::var_info[] = {
// @Param: ORIGIN_LAT
// @DisplayName: Backup latitude for EKF origin
// @Description: Backup EKF origin latitude used when not using a positioning system.
// @Units: degrees
// @Units: deg
// @User: Standard
AP_GROUPINFO("ORIGIN_LAT", 19, ParametersG2, backup_origin_lat, 0),

// @Param: ORIGIN_LON
// @DisplayName: Backup longitude for EKF origin
// @Description: Backup EKF origin longitude used when not using a positioning system.
// @Units: degrees
// @Units: deg
// @User: Standard
AP_GROUPINFO("ORIGIN_LON", 20, ParametersG2, backup_origin_lon, 0),

Expand Down

0 comments on commit 62d9b14

Please sign in to comment.