ArduPilot / ardupilot

ArduPlane, ArduCopter, ArduRover, ArduSub source
http://ardupilot.org/
GNU General Public License v3.0
11.02k stars 17.57k forks source link

Plane: BUG with auto_state.checked_for_autoland #12996

Open liang-tang opened 4 years ago

liang-tang commented 4 years ago

Bug report

Switch AUTO->RTL again an again, because checked_for_autoland always set to false when change mode

bool Mode::enter()
{
    // cancel inverted flight
    plane.auto_state.inverted_flight = false;

    // don't cross-track when starting a mission
    plane.auto_state.next_wp_crosstrack = false;

    // reset landing check
    plane.auto_state.checked_for_autoland = false;

Version 4.0 Platform [ ] All [ ] AntennaTracker [ ] Copter [*] Plane [ ] Rover [ ] Submarine

Airframe type What type of airframe (flying wing, glider, hex, Y6, octa etc)

Hardware type What autopilot hardware was used? (Pixhawk, Cube, Pixracer, Navio2, etc)

Logs Please provide a link to any relevant logs that show the issue

IamPete1 commented 2 years ago

maybe related to https://github.com/ArduPilot/ardupilot/issues/18496 ? In that case you can get stuck switching modes endlessly if you have a DO_LAND_START before a RETURN_TO_LAUNCH waypoint.