Local setpoint fix for the solos.

This commit is contained in:
vivek-shankar 2018-10-04 16:06:45 -04:00
parent 7c438c2323
commit 0d23041160
1 changed files with 3 additions and 1 deletions

View File

@ -164,7 +164,7 @@ void roscontroller::RosControllerRun()
// Call the flight controler service // Call the flight controler service
flight_controller_service_call(); flight_controller_service_call();
// Broadcast local position to FCU // Broadcast local position to FCU
if(BClpose) if(BClpose && !setmode)
SetLocalPosition(goto_pos[0], goto_pos[1], goto_pos[2], goto_pos[3]); SetLocalPosition(goto_pos[0], goto_pos[1], goto_pos[2], goto_pos[3]);
// Set ROBOTS variable (swarm size) // Set ROBOTS variable (swarm size)
get_number_of_robots(); get_number_of_robots();
@ -838,6 +838,8 @@ script
case NAV_SPLINE_WAYPOINT: case NAV_SPLINE_WAYPOINT:
goto_pos = buzzuav_closures::getgoto(); goto_pos = buzzuav_closures::getgoto();
if(setmode)
SetLocalPosition(goto_pos[0], goto_pos[1], goto_pos[2], goto_pos[3]);
break; break;
case DO_MOUNT_CONTROL: case DO_MOUNT_CONTROL: