串口调通,采用在其他线程的模式
This commit is contained in:
@@ -99,34 +99,6 @@ OPMapWidget::OPMapWidget(QWidget *parent, Configuration *config) : QGraphicsView
|
||||
void OPMapWidget::SetShowDiagnostics(bool const & value)
|
||||
{
|
||||
showDiag = value;
|
||||
/*
|
||||
if (!showDiag) {
|
||||
if (diagGraphItem != 0) {
|
||||
delete diagGraphItem;
|
||||
diagGraphItem = 0;
|
||||
}
|
||||
if (diagTimer != 0) {
|
||||
delete diagTimer;
|
||||
diagTimer = 0;
|
||||
}
|
||||
|
||||
if (GPS != 0) {
|
||||
GPS->DeleteTrail();
|
||||
delete GPS;
|
||||
GPS = 0;
|
||||
}
|
||||
} else {
|
||||
diagTimer = new QTimer();
|
||||
connect(diagTimer, SIGNAL(timeout()), this, SLOT(diagRefresh()));
|
||||
diagTimer->start(500);
|
||||
if (GPS == 0) {
|
||||
GPS = new GPSItem(map, this);
|
||||
GPS->setParentItem(map);
|
||||
GPS->setOpacity(overlayOpacity);
|
||||
setOverlayOpacity(overlayOpacity);
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
void OPMapWidget::SetUavPic(QString UAVPic)
|
||||
{
|
||||
@@ -177,7 +149,7 @@ void OPMapWidget::addUAV(int sysid,int compid)
|
||||
|
||||
uavItem->setOpacity(overlayOpacity);
|
||||
|
||||
uavItem->setSelect(true);
|
||||
uavItem->setSelect(false);
|
||||
|
||||
}
|
||||
|
||||
@@ -264,6 +236,24 @@ void OPMapWidget::setUAVHeading(int sysid,int compid,float Heading)
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
void OPMapWidget::DeleteTrail(void)
|
||||
{
|
||||
foreach(QGraphicsItem * i, map->childItems()) {
|
||||
UAVItem *u = qgraphicsitem_cast<UAVItem *>(i);
|
||||
if (u) {
|
||||
if(u->Select())
|
||||
{
|
||||
u->DeleteTrail();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
WayPointLine *OPMapWidget::WPLineCreate(WayPointItem *from, WayPointItem *to, QColor color, bool dashed, int width)
|
||||
{
|
||||
if (!from | !to) {
|
||||
|
||||
Reference in New Issue
Block a user