change checking of ready to fly

This commit is contained in:
Sem van der Hoeven
2023-05-01 10:51:03 +02:00
parent 23a59a449c
commit 4449c6cc1f

View File

@@ -52,7 +52,7 @@ private:
bool has_swithed = false;
int setpoint_count = 0;
float thrust = 0.5;
bool ready_to_fly = setpoint_count == 20;
bool ready_to_fly = false;
void send_trajectory_setpoint()
{
@@ -138,6 +138,7 @@ private:
// increase amount of setpoints sent
setpoint_count++;
ready_to_fly = setpoint_count == 20;
// after 20 setpoints, send arm command to make drone actually fly
if (ready_to_fly)
{