Commit d5715d5c authored by Lorenz Meier's avatar Lorenz Meier

UAS Manager: do not link home positions

parent 08fef217
...@@ -230,21 +230,22 @@ void UASManager::nedToWgs84(const double& x, const double& y, const double& z, d ...@@ -230,21 +230,22 @@ void UASManager::nedToWgs84(const double& x, const double& y, const double& z, d
*/ */
void UASManager::uavChangedHomePosition(int uav, double lat, double lon, double alt) void UASManager::uavChangedHomePosition(int uav, double lat, double lon, double alt)
{ {
// FIXME: Accept any home position change for now from the active UAS // Accept home position changes from the active UAS
// this means that the currently select UAS can change the home location
// of the whole swarm. This makes sense, but more control might be needed
if (uav == activeUAS->getUASID()) if (uav == activeUAS->getUASID())
{ {
if (setHomePosition(lat, lon, alt)) if (setHomePosition(lat, lon, alt))
{ {
foreach (UASInterface* mav, systems) // XXX DO NOT UPDATE THE WHOLE FLEET
{
// Only update the other systems, not the original source
if (mav->getUASID() != uav) // foreach (UASInterface* mav, systems)
{ // {
mav->setHomePosition(homeLat, homeLon, homeAlt); // // Only update the other systems, not the original source
} // if (mav->getUASID() != uav)
} // {
// mav->setHomePosition(homeLat, homeLon, homeAlt);
// }
// }
} }
} }
} }
......
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