|
|
|
@ -26,6 +26,9 @@ QGCMapWidget::~QGCMapWidget()
@@ -26,6 +26,9 @@ QGCMapWidget::~QGCMapWidget()
|
|
|
|
|
|
|
|
|
|
void QGCMapWidget::showEvent(QShowEvent* event) |
|
|
|
|
{ |
|
|
|
|
// FIXME XXX this is a hack to trick OPs current 1-system design
|
|
|
|
|
SetShowUAV(false); |
|
|
|
|
|
|
|
|
|
// Pass on to parent widget
|
|
|
|
|
OPMapWidget::showEvent(event); |
|
|
|
|
|
|
|
|
@ -67,20 +70,21 @@ void QGCMapWidget::showEvent(QShowEvent* event)
@@ -67,20 +70,21 @@ void QGCMapWidget::showEvent(QShowEvent* event)
|
|
|
|
|
SetFollowMouse(true); // we want a contiuous mouse position reading
|
|
|
|
|
|
|
|
|
|
SetShowHome(true); // display the HOME position on the map
|
|
|
|
|
SetShowUAV(true); // display the UAV position on the map
|
|
|
|
|
// SetShowUAV(true); // display the UAV position on the map
|
|
|
|
|
//SetShowDiagnostics(true); // Not needed in flight / production mode
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Home->SetSafeArea(safe_area_radius_list[0]); // set radius (meters)
|
|
|
|
|
Home->SetShowSafeArea(true); // show the safe area
|
|
|
|
|
|
|
|
|
|
// UAV->SetTrailTime(uav_trail_time_list[0]); // seconds
|
|
|
|
|
// UAV->SetTrailDistance(uav_trail_distance_list[1]); // meters
|
|
|
|
|
//// UAV->SetTrailTime(uav_trail_time_list[0]); // seconds
|
|
|
|
|
//// UAV->SetTrailDistance(uav_trail_distance_list[1]); // meters
|
|
|
|
|
|
|
|
|
|
// UAV->SetTrailType(UAVTrailType::ByTimeElapsed);
|
|
|
|
|
// UAV->SetTrailType(UAVTrailType::ByDistance);
|
|
|
|
|
//// UAV->SetTrailType(mapcontrol::UAVTrailType::ByTimeElapsed);
|
|
|
|
|
//// UAV->SetTrailType(mapcontrol::UAVTrailType::ByDistance);
|
|
|
|
|
|
|
|
|
|
GPS->SetTrailTime(uav_trail_time_list[0]); // seconds
|
|
|
|
|
GPS->SetTrailDistance(uav_trail_distance_list[1]); // meters
|
|
|
|
|
// GPS->SetTrailTime(uav_trail_time_list[0]); // seconds
|
|
|
|
|
// GPS->SetTrailDistance(uav_trail_distance_list[1]); // meters
|
|
|
|
|
|
|
|
|
|
// GPS->SetTrailType(UAVTrailType::ByTimeElapsed);
|
|
|
|
|
|
|
|
|
@ -245,9 +249,9 @@ void QGCMapWidget::updateGlobalPosition(UASInterface* uas, double lat, double lo
@@ -245,9 +249,9 @@ void QGCMapWidget::updateGlobalPosition(UASInterface* uas, double lat, double lo
|
|
|
|
|
newUAV->setParentItem(map); |
|
|
|
|
UAVS.insert(uas->getUASID(), newUAV); |
|
|
|
|
uav = GetUAV(uas->getUASID()); |
|
|
|
|
// uav->SetTrailTime(1);
|
|
|
|
|
// uav->SetTrailDistance(5);
|
|
|
|
|
// uav->SetTrailType(mapcontrol::UAVTrailType::ByTimeElapsed);
|
|
|
|
|
uav->SetTrailTime(1); |
|
|
|
|
uav->SetTrailDistance(5); |
|
|
|
|
uav->SetTrailType(mapcontrol::UAVTrailType::ByTimeElapsed); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Set new lat/lon position of UAV icon
|
|
|
|
@ -276,6 +280,9 @@ void QGCMapWidget::updateGlobalPosition()
@@ -276,6 +280,9 @@ void QGCMapWidget::updateGlobalPosition()
|
|
|
|
|
MAV2DIcon* newUAV = new MAV2DIcon(map, this, system); |
|
|
|
|
AddUAV(system->getUASID(), newUAV); |
|
|
|
|
uav = newUAV; |
|
|
|
|
uav->SetTrailTime(1); |
|
|
|
|
uav->SetTrailDistance(5); |
|
|
|
|
uav->SetTrailType(mapcontrol::UAVTrailType::ByTimeElapsed); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Set new lat/lon position of UAV icon
|
|
|
|
|