AC_Fence: Disable fence floor when disabling the rest of the fence

This commit is contained in:
James O'Shannessy 2021-01-11 14:08:51 +11:00 committed by Peter Barker
parent f228adfa75
commit e4f1e26b5c

View File

@ -134,6 +134,7 @@ void AC_Fence::enable(bool value)
_enabled = value;
if (!value) {
clear_breach(AC_FENCE_TYPE_ALT_MIN | AC_FENCE_TYPE_ALT_MAX | AC_FENCE_TYPE_CIRCLE | AC_FENCE_TYPE_POLYGON);
disable_floor();
} else {
enable_floor();
}