Commit b12787d8 authored by Amine AIT-GANI's avatar Amine AIT-GANI
Browse files

Mise jour des fonctions de test

parent 4956c927
Pipeline #1451 failed with stage
in 1 minute and 54 seconds
......@@ -105,7 +105,14 @@ void command_loop()
drone1.command_up(0);
}
*/
else if(buffer_command=="o")
{
cout<<"right \n";
drone1.move_to(1,0,0);
}
else if(buffer_command=="r")
{
cout<<"right \n";
......@@ -126,23 +133,41 @@ void command_loop()
{
drone1.command_kill(0);
}
else if(buffer_command=="z")
{
cout<<"motor 1 \n";
drone1.command_directControl(1000,0,1000,0);
drone1.command_directControl(1000,0,0,0);
}
else if(buffer_command=="s")
{
cout<<"motor 1 \n";
drone1.command_directControl(-1000,0,0,0);
}
else if(buffer_command=="d")
{
drone1.command_directControl(0,1000,1000,0);
drone1.command_directControl(0,1000,0,0);
}
else if(buffer_command=="q")
{
drone1.command_directControl(-1000,0,1000,0);
drone1.command_directControl(0,-1000,0,0);
}
else if(buffer_command=="s")
else if(buffer_command=="w")
{
drone1.command_directControl(0,0,1000,0);
}
else if(buffer_command=="x")
{
drone1.command_directControl(0,0,-1000,0);
}
else if(buffer_command=="c")
{
drone1.command_directControl(0,0,0,1000);
}
else if(buffer_command=="v")
{
drone1.command_directControl(0,0,0,-1000);
}
else if(buffer_command=="!m")
{
drone1.command_directControl(0,0,0,0);
......@@ -154,6 +179,14 @@ void command_loop()
mavlink_msg_play_tune_pack(255, drone1.component_id, &message, 1, 1 , "AAAA", "");
drone1.write_message(message);
}
else if (buffer_command=="g")
{
drone1.command_setModeGuided(1);
}
else if (buffer_command=="!g")
{
drone1.command_setModeGuided(0);
}
else
{
cout<<"command not recognized\n";
......
Supports Markdown
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