Commit b28daaee authored by Ian McInerney's avatar Ian McInerney

Added variable describing number of takeoff steps

parent bd47b053
......@@ -96,6 +96,7 @@ extern RADIOS_t radios[];
// Array to hold the hand data
extern HAND_t hand;
extern int quad1_numTakeoffSteps;
extern takeoffProfileStep quad1_takeoffSteps[];
// Array to hold the offsets for mirror flight
......
......@@ -8,11 +8,12 @@
// First column is the desired base thrust to use
// Second column is what type of end condition this is
// Third column is the condition to end the step
int quad1_numTakeoffSteps = 3;
takeoffProfileStep quad1_takeoffSteps[] = {
{19000, step_time, 1},
{52000, step_height, -0.3},
// {52000, step_time, 1},
{42000, step_final, 0}
// {50000, step_height, -0.3},
{52000, step_time, 1},
{48739, step_final, 0}
};
// Offsets to be used during mirror flight
......
......@@ -142,7 +142,7 @@ void parseCommand() {
SET_Z(quadcopterNumber, defaultSetpoints[quadcopterNumber-1][2]);
// Get the quad ready to takeoff
crazyflie_info[quadcopterNumber-1].cflieCopter->setTakeoffProfile( quad1_takeoffSteps, 3 );
crazyflie_info[quadcopterNumber-1].cflieCopter->setTakeoffProfile( quad1_takeoffSteps, quad1_numTakeoffSteps );
crazyflie_info[quadcopterNumber-1].cflieCopter->disableThrustController();
crazyflie_info[quadcopterNumber-1].cflieCopter->resetController();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment