状态
This commit is contained in:
@@ -1306,12 +1306,8 @@ void OPMapWidget::WPUpload(void)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
qDebug() << "WPUpload" << list.size();
|
||||
|
||||
|
||||
|
||||
emit signal_WPUpload(1,0,list.size());//直接发送全部航点到
|
||||
|
||||
}
|
||||
@@ -1457,6 +1453,9 @@ void OPMapWidget::AltitudeChanged(int seq,double value)
|
||||
{
|
||||
altitudeitem->setAltitude(Info);
|
||||
}
|
||||
|
||||
updateMessage();
|
||||
|
||||
}
|
||||
|
||||
void OPMapWidget::setCurrentPoint(int value)
|
||||
@@ -1470,7 +1469,49 @@ void OPMapWidget::setCurrentPoint(int value)
|
||||
|
||||
|
||||
|
||||
void OPMapWidget::updateMessage(void)
|
||||
{
|
||||
|
||||
double distance;
|
||||
|
||||
|
||||
/*
|
||||
WayPointItem *Last = nullptr;
|
||||
|
||||
foreach(QGraphicsItem * i, map->childItems()) {
|
||||
WayPointItem *w = qgraphicsitem_cast<WayPointItem *>(i);
|
||||
if (w)
|
||||
{
|
||||
if(Last != nullptr)
|
||||
{
|
||||
|
||||
distance += internals::PureProjection::DistanceBetweenLatLng(Last->Coord(),w->Coord()) * 10e2;
|
||||
}
|
||||
|
||||
qDebug() << "distance" << distance
|
||||
<< Last->Number()
|
||||
<< w->Number();
|
||||
|
||||
Last = w;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
delete Last;
|
||||
Last = nullptr;
|
||||
*/
|
||||
|
||||
|
||||
|
||||
waypointMessage.clear();
|
||||
|
||||
waypointMessage.append(tr("总航程:%1\t").arg(QString::number(distance)));
|
||||
waypointMessage.append(tr("最远航点:%1\t").arg(QString::number(distance)));
|
||||
waypointMessage.append(tr("最远距离:%1\t").arg(QString::number(distance)));
|
||||
waypointMessage.append(tr("预计飞行时间:%1\t").arg(QString::number(distance)));
|
||||
|
||||
emit showMessage(waypointMessage);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -444,6 +444,9 @@ private:
|
||||
bool isWPCreate;
|
||||
bool isWPLock;
|
||||
|
||||
|
||||
QString waypointMessage;
|
||||
|
||||
private slots:
|
||||
void diagRefresh();
|
||||
// WayPointItem* item;//apagar
|
||||
@@ -564,6 +567,9 @@ signals:
|
||||
|
||||
public slots:
|
||||
|
||||
|
||||
void updateMessage(void);
|
||||
|
||||
void addUAV(int sysid, int compid);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user