Commit 64d68858 authored by Ian McInerney's avatar Ian McInerney

Added check to make sure takeoff profile is set before use

parent c905b104
......@@ -13,6 +13,12 @@ void CCrazyflie::takeoffCycle() {
// The current time
double time = this->currentTime();
// Make sure the takeoff profile is initialized
if (this->takeoffProfile == NULL) {
// The takeoff profile hasn't been initialized, return and don't do anything
// Check if the next step uses time or altitude
switch ( this->takeoffProfile[this->currentStep].type ) {
case step_time:
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment