1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-20 10:54:14 +01:00

GCS/OPMap-Clean commented out code. Delete some qDebugs

This commit is contained in:
PT_Dreamer 2012-06-26 20:22:55 +01:00
parent 89d7f0adfd
commit 2074889c9d
4 changed files with 1 additions and 17 deletions

View File

@ -392,7 +392,6 @@ namespace mapcontrol
found = true;
{
painter->drawPixmap(core->tileRect.X(),core->tileRect.Y(), core->tileRect.Width(), core->tileRect.Height(),PureImageProxy::FromStream(img));
// qDebug()<<"tile:"<<core->tileRect.X()<<core->tileRect.Y();
}
}
}
@ -406,7 +405,6 @@ namespace mapcontrol
painter->setFont(config->MissingDataFont);
painter->setPen(Qt::red);
painter->drawText(QRectF(core->tileRect.X(), core->tileRect.Y(), core->tileRect.Width(), core->tileRect.Height()),Qt::AlignCenter,(core->GettilePoint() == core->GetcenterTileXYLocation()? "CENTER: " :"TILE: ")+core->GettilePoint().ToString());
//qDebug()<<"ShowTileGridLine:"<<core->GettilePoint().ToString()<<"=="<<core->GetcenterTileXYLocation().ToString();
}
}
@ -513,7 +511,6 @@ namespace mapcontrol
float scaleValue = zoomDigi+remainder + 1;
{
MapRenderTransform = scaleValue;
// qDebug()<<"scale="<<scaleValue<<"zoomdigi:"<<ZoomDigi()<<"integer:"<<integer;
}
if(integer>MaxZoom())
integer=MaxZoom();

View File

@ -31,11 +31,7 @@ namespace mapcontrol
UAVItem::UAVItem(MapGraphicItem* map,OPMapWidget* parent,QString uavPic):map(map),mapwidget(parent),showtrail(true),showtrailline(true),trailtime(5),traildistance(50),autosetreached(true)
,autosetdistance(100)
{
//QDir dir(":/uavs/images/");
//QStringList list=dir.entryList();
pic.load(uavPic);
// Don't scale but trust the image we are given
// pic=pic.scaled(50,33,Qt::IgnoreAspectRatio);
this->setFlag(QGraphicsItem::ItemIsMovable,true);
this->setFlag(QGraphicsItem::ItemIsSelectable,true);
localposition=map->FromLatLngToLocal(mapwidget->CurrentPosition());

View File

@ -34,7 +34,6 @@ namespace mapcontrol
WayPointCircle::WayPointCircle(WayPointItem *center, WayPointItem *radius,bool clockwise, MapGraphicItem *map,QColor color):my_center(center),
my_radius(radius),my_map(map),QGraphicsEllipseItem(map),myColor(color),myClockWise(clockwise)
{
qDebug()<<"circle clock:"<<clockwise;
connect(center,SIGNAL(localPositionChanged(QPointF,WayPointItem*)),this,SLOT(refreshLocations()));
connect(radius,SIGNAL(localPositionChanged(QPointF,WayPointItem*)),this,SLOT(refreshLocations()));
connect(center,SIGNAL(aboutToBeDeleted(WayPointItem*)),this,SLOT(waypointdeleted()));
@ -46,7 +45,6 @@ WayPointCircle::WayPointCircle(WayPointItem *center, WayPointItem *radius,bool c
WayPointCircle::WayPointCircle(HomeItem *radius, WayPointItem *center, bool clockwise, MapGraphicItem *map, QColor color):my_center(center),
my_radius(radius),my_map(map),QGraphicsEllipseItem(map),myColor(color),myClockWise(clockwise)
{
qDebug()<<"circle clock:"<<clockwise;
connect(radius,SIGNAL(homePositionChanged(internals::PointLatLng,float)),this,SLOT(refreshLocations()));
connect(center,SIGNAL(localPositionChanged(QPointF)),this,SLOT(refreshLocations()));
connect(center,SIGNAL(aboutToBeDeleted(WayPointItem*)),this,SLOT(waypointdeleted()));

View File

@ -271,11 +271,9 @@ WayPointItem::WayPointItem(MapGraphicItem *map, bool magicwaypoint):reached(fals
void WayPointItem::setRelativeCoord(distBearingAltitude value)
{
qDebug()<<"SET RELATIVE0";
if(value.altitudeRelative==relativeCoord.altitudeRelative
if(value.altitudeRelative==relativeCoord.altitudeRelative
&& value.bearing==relativeCoord.bearing && value.distance==relativeCoord.distance)
return;
qDebug()<<"SET RELATIVE1";
relativeCoord=value;
if(myHome)
{
@ -288,19 +286,14 @@ WayPointItem::WayPointItem(MapGraphicItem *map, bool magicwaypoint):reached(fals
}
void WayPointItem::SetCoord(const internals::PointLatLng &value)
{
qDebug()<<"SET ABSOLUTE0";
// if(this->WPType()==relative)
// return;
if(Coord()==value)
return;
qDebug()<<"SET ABSOLUTE1";
bool abs_coord=false;
bool rel_coord=false;
if(coord!=value)
abs_coord=true;
coord=value;
distBearingAltitude back=relativeCoord;
qDebug()<<"SET COORD"<<value.Lat()<<value.Lng();
if(myHome)
map->Projection()->offSetFromLatLngs(myHome->Coord(),coord,relativeCoord.distance,relativeCoord.bearing);
if(back.distance!=relativeCoord.distance||back.bearing!=relativeCoord.bearing)