Commit 53a90fa3 authored by Léo Coquet's avatar Léo Coquet
Browse files
parents 980ef957 e1b2198d
Pipeline #1542 failed with stage
in 1 minute and 17 seconds
...@@ -41,11 +41,11 @@ ofstream compassy; ...@@ -41,11 +41,11 @@ ofstream compassy;
blc_channel blc_control_arm("/pixhawk.control.arm", BLC_CHANNEL_READ, 'IN16', 'NDEF', 1, 1); // 1=on, 0=off; blc_channel blc_control_arm("/pixhawk.control.arm", BLC_CHANNEL_READ, 'IN16', 'NDEF', 1, 1); // 1=on, 0=off;
blc_channel blc_control_remote_vector("/pixhawk.control.remoteVectors", BLC_CHANNEL_WRITE, 'FL32', 'NDEF', 1, 4); blc_channel blc_control_remote_vector("/pixhawk.control.remoteVectors", BLC_CHANNEL_WRITE, 'FL32', 'NDEF', 1, 4);
//Channels use to control manually the drone //Channels use to control manually the drone
blc_channel blc_control_motors("/pixhawk.control.motors", BLC_CHANNEL_READ, 'FL32', 'NDEF', 1, 4); //x, y, z, r blc_channel blc_control_motors("/pixhawk.control.motors", BLC_CHANNEL_READ, 'FL32', 'NDEF', 1, 4); //x, y, z, r
//Channels use to command the drone //Channels use to command the drone
blc_channel blc_control_commands("/pixhawk.control.commands", BLC_CHANNEL_READ, 'FL32', 'NDEF', 1, 5); // 1=on, 0=off blc_channel blc_control_commands("/pixhawk.control.commands", BLC_CHANNEL_READ, 'FL32', 'NDEF', 1, 9); // 1=on, 0=off
blc_channel blc_highres_imu("/pixhawk.sensors.imu", BLC_CHANNEL_WRITE, 'FL32', 'NDEF', 1, 9); blc_channel blc_highres_imu("/pixhawk.sensors.imu", BLC_CHANNEL_WRITE, 'FL32', 'NDEF', 1, 9);
//Channel use to know altitude of drone //Channel use to know altitude of drone
blc_channel blc_attitude("/pixhawk.sensors.attitude", BLC_CHANNEL_WRITE, 'FL32', 'NDEF', 1, 7); blc_channel blc_attitude("/pixhawk.sensors.attitude", BLC_CHANNEL_WRITE, 'FL32', 'NDEF', 1, 7);
...@@ -59,7 +59,7 @@ blc_channel blc_test_detection("/pixhawk.test.detection", BLC_CHANNEL_READ, 'IN1 ...@@ -59,7 +59,7 @@ blc_channel blc_test_detection("/pixhawk.test.detection", BLC_CHANNEL_READ, 'IN1
void command_loop() void command_loop()
{ {
int ret; int ret;
mavlink_message_t message; mavlink_message_t message;
string buffer_command = ""; string buffer_command = "";
...@@ -172,6 +172,10 @@ drone1.command_setMode(DRONE_OFF); ...@@ -172,6 +172,10 @@ drone1.command_setMode(DRONE_OFF);
{ {
drone1.command_kill(0); drone1.command_kill(0);
} }
else if(buffer_command=="j")
{
drone1.move_drone_to(1,0,0);
}
/* else if(buffer_command=="n") /* else if(buffer_command=="n")
{ {
drone1.waypoint(0.1,0.1,0.1); drone1.waypoint(0.1,0.1,0.1);
......
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