Copter: Guided: move to zero velocity after takeoff

This commit is contained in:
Leonard Hall 2021-07-10 13:36:59 +09:30 committed by Randy Mackay
parent 0ad493fdf7
commit f5a15dd85b
1 changed files with 4 additions and 5 deletions

View File

@ -513,9 +513,8 @@ void ModeGuided::takeoff_run()
copter.landinggear.retract_after_takeoff(); copter.landinggear.retract_after_takeoff();
#endif #endif
// switch to position control mode but maintain current target // change to velocity control after take off.
const Vector3f target = pos_control->get_pos_target_cm().tofloat(); init(true);
set_destination(target, false, 0, false, 0, false, wp_nav->origin_and_destination_are_terrain_alt());
} }
} }