File tree 1 file changed +9
-0
lines changed 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,9 @@ void Mode::_TakeOff::start(float alt_cm)
54
54
_running = true ;
55
55
take_off_start_alt = copter.pos_control ->get_pos_target_z_cm ();
56
56
take_off_complete_alt = take_off_start_alt + alt_cm;
57
+ #if AP_LANDINGGEAR_ENABLED
58
+ copter.landinggear .tie_down_release ();
59
+ #endif
57
60
}
58
61
59
62
// stop takeoff
@@ -218,6 +221,9 @@ void _AutoTakeoff::run()
218
221
if (complete) {
219
222
const Vector3p& _complete_pos = copter.pos_control ->get_pos_target_cm ();
220
223
complete_pos = Vector3p{_complete_pos.x , _complete_pos.y , pos_z};
224
+ #if AP_LANDINGGEAR_ENABLED
225
+ copter.landinggear .tie_down_secure ();
226
+ #endif
221
227
}
222
228
}
223
229
@@ -237,6 +243,9 @@ void _AutoTakeoff::start(float _complete_alt_cm, bool _terrain_alt)
237
243
} else {
238
244
no_nav_active = false ;
239
245
}
246
+ #if AP_LANDINGGEAR_ENABLED
247
+ copter.landinggear .tie_down_release ();
248
+ #endif
240
249
}
241
250
242
251
// return takeoff final position if takeoff has completed successfully
You can’t perform that action at this time.
0 commit comments