Skip to content

Commit 18e4914

Browse files
lthallpeterbarker
authored andcommitted
Copter: Release Tie Down on take-off
1 parent 610f623 commit 18e4914

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

ArduCopter/takeoff.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ void Mode::_TakeOff::start(float alt_cm)
5454
_running = true;
5555
take_off_start_alt = copter.pos_control->get_pos_target_z_cm();
5656
take_off_complete_alt = take_off_start_alt + alt_cm;
57+
#if AP_LANDINGGEAR_ENABLED
58+
copter.landinggear.tie_down_release();
59+
#endif
5760
}
5861

5962
// stop takeoff
@@ -218,6 +221,9 @@ void _AutoTakeoff::run()
218221
if (complete) {
219222
const Vector3p& _complete_pos = copter.pos_control->get_pos_target_cm();
220223
complete_pos = Vector3p{_complete_pos.x, _complete_pos.y, pos_z};
224+
#if AP_LANDINGGEAR_ENABLED
225+
copter.landinggear.tie_down_secure();
226+
#endif
221227
}
222228
}
223229

@@ -237,6 +243,9 @@ void _AutoTakeoff::start(float _complete_alt_cm, bool _terrain_alt)
237243
} else {
238244
no_nav_active = false;
239245
}
246+
#if AP_LANDINGGEAR_ENABLED
247+
copter.landinggear.tie_down_release();
248+
#endif
240249
}
241250

242251
// return takeoff final position if takeoff has completed successfully

0 commit comments

Comments
 (0)