1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-01 09:24:10 +01:00

OP37/GCS MapLib - Fixed a bug reported by PeterG, and deleted Nokia from the credits again (still haven't received the free phone :))

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1230 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
zedamota 2010-08-07 14:47:48 +00:00 committed by zedamota
parent d9d42ff068
commit 10736204be
7 changed files with 29 additions and 9 deletions

View File

@ -3,8 +3,7 @@
*
* @file mapripform.cpp
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
* Parts by Nokia Corporation (qt-info@nokia.com) Copyright (C) 2009.
* @brief The main graphicsItem used on the widget, contains the map and map logic
* @brief Form to be used with the MapRipper class
* @see The GNU Public License (GPL) Version 3
* @defgroup OPMapWidget
* @{

View File

@ -3,8 +3,7 @@
*
* @file mapripform.h
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
* Parts by Nokia Corporation (qt-info@nokia.com) Copyright (C) 2009.
* @brief The main graphicsItem used on the widget, contains the map and map logic
* @brief Form to be used with the MapRipper class
* @see The GNU Public License (GPL) Version 3
* @defgroup OPMapWidget
* @{

View File

@ -3,8 +3,7 @@
*
* @file mapripper.cpp
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
* Parts by Nokia Corporation (qt-info@nokia.com) Copyright (C) 2009.
* @brief The main graphicsItem used on the widget, contains the map and map logic
* @brief A class that allows ripping of a selection of the map
* @see The GNU Public License (GPL) Version 3
* @defgroup OPMapWidget
* @{

View File

@ -3,8 +3,7 @@
*
* @file mapripper.h
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
* Parts by Nokia Corporation (qt-info@nokia.com) Copyright (C) 2009.
* @brief The main graphicsItem used on the widget, contains the map and map logic
* @brief A class that allows ripping of a selection of the map
* @see The GNU Public License (GPL) Version 3
* @defgroup OPMapWidget
* @{

View File

@ -64,6 +64,8 @@ namespace mapcontrol
{
UAV=new UAVItem(map,this);
UAV->setParentItem(map);
connect(this,SIGNAL(UAVLeftSafetyBouble(internals::PointLatLng)),UAV,SIGNAL(UAVLeftSafetyBouble(internals::PointLatLng)));
connect(this,SIGNAL(UAVReachedWayPoint(int,WayPointItem*)),UAV,SIGNAL(UAVReachedWayPoint(int,WayPointItem*)));
}
else if(!value)
{
@ -115,6 +117,7 @@ namespace mapcontrol
OPMapWidget::~OPMapWidget()
{
delete UAV;
delete Home;
delete map;
delete core;
delete configuration;

View File

@ -382,6 +382,13 @@ namespace mapcontrol
* @param number new WayPoint number
* @param waypoint WayPoint inserted
*/
void WPReached(WayPointItem* waypoint);
/**
* @brief Fires when a new WayPoint is inserted
*
* @param number new WayPoint number
* @param waypoint WayPoint inserted
*/
void WPInserted(int const& number,WayPointItem* waypoint);
/**
* @brief Fires When a WayPoint is deleted
@ -389,6 +396,19 @@ namespace mapcontrol
* @param number number of the deleted WayPoint
*/
void WPDeleted(int const& number);
/**
* @brief Fires When a WayPoint is Reached
*
* @param number number of the Reached WayPoint
*/
void UAVReachedWayPoint(int const& waypointnumber,WayPointItem* waypoint);
/**
* @brief Fires When the UAV lives the safety bouble
*
* @param position the position of the UAV
*/
void UAVLeftSafetyBouble(internals::PointLatLng const& position);
/**
* @brief Fires when map position changes
*

View File

@ -113,6 +113,7 @@ namespace mapcontrol
}
if(mapwidget->Home!=0)
{
//verify if the UAV is inside the safety bouble
if(Distance3D(mapwidget->Home->Coord(),mapwidget->Home->Altitude())>mapwidget->Home->SafeArea())
{
if(mapwidget->Home->safe!=false);
@ -124,7 +125,7 @@ namespace mapcontrol
}
else
{
if(mapwidget->Home->safe!=true);
if(mapwidget->Home->safe!=true)
{
mapwidget->Home->safe=true;
mapwidget->Home->update();