Skip to content

Commit

Permalink
AC_Fence: address minor review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
andyp1per authored and peterbarker committed Jul 23, 2024
1 parent 5507596 commit ccfbfdd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ArduCopter/fence.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ void Copter::fence_check()
LOGGER_WRITE_ERROR(LogErrorSubsystem::FAILSAFE_FENCE, LogErrorCode(new_breaches));

} else if (orig_breaches && fence.get_breaches() == 0) {
if (!copter.ap.land_complete) {
if (!copter.ap.land_complete) {
GCS_SEND_TEXT(MAV_SEVERITY_NOTICE, "Fence breach cleared");
}
// record clearing of breach
Expand Down
6 changes: 4 additions & 2 deletions libraries/AC_Fence/AC_Fence.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ const AP_Param::GroupInfo AC_Fence::var_info[] = {
// @Description: When bit 0 is set sisable mode change following fence action until fence breach is cleared. When bit 1 is set the allowable flight areas is the union of all polygon and circle fence areas instead of the intersection, which means a fence breach occurs only if you are outside all of the fence areas.
// @Bitmask: 0:Disable mode change following fence action until fence breach is cleared, 1:Allow union of inclusion areas
// @User: Standard
AP_GROUPINFO_FRAME("OPTIONS", 11, AC_Fence, _options, static_cast<uint16_t>(AC_FENCE_OPTIONS_DEFAULT), AP_PARAM_FRAME_PLANE | AP_PARAM_FRAME_COPTER),
AP_GROUPINFO_FRAME("OPTIONS", 11, AC_Fence, _options, static_cast<uint16_t>(AC_FENCE_OPTIONS_DEFAULT), AP_PARAM_FRAME_PLANE | AP_PARAM_FRAME_COPTER | AP_PARAM_FRAME_TRICOPTER | AP_PARAM_FRAME_HELI),

AP_GROUPEND
};
Expand Down Expand Up @@ -237,7 +237,9 @@ void AC_Fence::update()
#endif
}

/// enable the Fence code generally; a master switch for all fences
// enable or disable configured fences present in fence_types
// also updates the bitmask of auto enabled fences if update_auto_mask is true
// returns a bitmask of fences that were changed
uint8_t AC_Fence::enable(bool value, uint8_t fence_types, bool update_auto_mask)
{
uint8_t fences = _configured_fences.get() & fence_types;
Expand Down

0 comments on commit ccfbfdd

Please sign in to comment.