mirror of https://github.com/ArduPilot/ardupilot
Plane: use generic fence handling in missions
This commit is contained in:
parent
255fac215f
commit
a11cc6ea66
|
@ -144,21 +144,6 @@ bool Plane::start_command(const AP_Mission::Mission_Command& cmd)
|
|||
case MAV_CMD_DO_LAND_START:
|
||||
break;
|
||||
|
||||
case MAV_CMD_DO_FENCE_ENABLE:
|
||||
#if AP_FENCE_ENABLED
|
||||
if (cmd.p1 == 0) { // disable fence
|
||||
plane.fence.enable_configured(false);
|
||||
gcs().send_text(MAV_SEVERITY_INFO, "Fence disabled");
|
||||
} else if (cmd.p1 == 1) { // enable fence
|
||||
plane.fence.enable_configured(true);
|
||||
gcs().send_text(MAV_SEVERITY_INFO, "Fence enabled");
|
||||
} else if (cmd.p1 == 2) { // disable fence floor only
|
||||
plane.fence.disable_floor();
|
||||
gcs().send_text(MAV_SEVERITY_INFO, "Fence floor disabled");
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
|
||||
case MAV_CMD_DO_AUTOTUNE_ENABLE:
|
||||
autotune_enable(cmd.p1);
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue