Skip to content

Commit

Permalink
AP_Arming: allow precise wording of fence pre-arm messages
Browse files Browse the repository at this point in the history
  • Loading branch information
andyp1per committed Jun 23, 2024
1 parent 2225c87 commit 1ca1dd7
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions libraries/AP_Arming/AP_Arming.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1278,16 +1278,12 @@ bool AP_Arming::fence_checks(bool display_failure)
}

// check fence is ready
const char *fail_msg = nullptr;
if (fence->pre_arm_check(fail_msg)) {
char fail_msg[MAVLINK_MSG_STATUSTEXT_FIELD_TEXT_LEN+1];
if (fence->pre_arm_check(fail_msg, ARRAY_SIZE(fail_msg))) {
return true;
}

if (fail_msg == nullptr) {
check_failed(display_failure, "Check fence");
} else {
check_failed(display_failure, "%s", fail_msg);
}
check_failed(display_failure, "%s", fail_msg);

#if AP_SDCARD_STORAGE_ENABLED
if (fence->failed_sdcard_storage() || StorageManager::storage_failed()) {
Expand Down

0 comments on commit 1ca1dd7

Please sign in to comment.