diff --git a/App/ComponentUI/Scope/Chart.cpp b/App/ComponentUI/Scope/Chart.cpp
index 3387c3d..8d9ecdd 100644
--- a/App/ComponentUI/Scope/Chart.cpp
+++ b/App/ComponentUI/Scope/Chart.cpp
@@ -1,4 +1,5 @@
#include "Chart.h"
+#include "QElapsedTimer"
int Chart::ChannelIndex = 0;
@@ -313,7 +314,9 @@ void Chart::timeout(void)//10Hz
void Chart::chartUpdate(void)
{
//读取新数据,如果没有,那就保持
+ // QElapsedTimer time;
+ //time.start();
//当到达最大时(0.95),开始滚动
if(isScroll() == true)
@@ -432,6 +435,7 @@ void Chart::chartUpdate(void)
}
+ //qDebug() << "nsecsElapsed" << time.nsecsElapsed();
}
@@ -666,7 +670,7 @@ void Chart::setSerieData(QString name, QVariant data)
- chartUpdate();
+ //chartUpdate();
}
void Chart::setSerieData(QString name,QVariant data,int colorindex = 3)
@@ -766,7 +770,7 @@ void Chart::setSerieData(QString name,QVariant data,int colorindex = 3)
- chartUpdate();
+ //chartUpdate();
}
diff --git a/App/GCS_zh_CN.ts b/App/GCS_zh_CN.ts
index 2c19c60..53d4a9c 100644
--- a/App/GCS_zh_CN.ts
+++ b/App/GCS_zh_CN.ts
@@ -2144,19 +2144,19 @@
收:%1/发:%2
-
-
-
+
+
+
未定位
-
+
%1D[%2颗]
%1D[%2颗]
-
+
fix[%1颗]
%1D Fix
差分[%1颗]
@@ -2174,256 +2174,256 @@
GPS错误
-
+
float[%1颗]
浮点[%1颗]
-
+
err[%1颗]
错误[%1颗]
-
+
ARM
解锁
-
+
DISARM
上锁
-
+
MANUAL
手动
-
+
ALTCTL
定高
-
+
POSCTL
定点
-
+
AUTO
自主
-
+
ACRO
-
+
OFFBOARD
-
+
STABILIZED
增稳
-
+
RATTITUDE
速率
-
+
STANDBY
待机
-
+
BIT
测试
-
+
AUTO_READY
就绪
-
+
AUTO_TAKEOFF
起飞
-
+
AUTO_LOITER
盘旋
-
+
AUTO_MISSION
任务
-
+
AUTO_RTL
返航
-
+
AUTO_LAND
着陆
-
+
AUTO_RTGS
RTGS
-
+
AUTO_FOLLOW_TARGET
目标跟随
-
+
开加力
-
+
半加力
-
+
全加力
-
+
关加力
-
+
伞舱开
-
+
伞舱关
-
+
INS解算正常
-
+
INS星数不足
-
+
INS内部错误
-
+
INS速度超限
-
+
SBG解算正常
-
+
SBG星数不足
-
+
SBG内部错误
-
+
SBG速度超限
-
+
安控区内
-
+
安控区外
-
+
mission group has changed, current group is %1
航线切换,当前航线为 %1
-
+
VERT_OFF
OFF
纵向制导关闭
-
+
VNAV2THT
消除纵向偏差
-
+
HDOT2THT
控制升降速率
-
+
GAMMA2THT
控制航迹角
-
+
AS2THT
俯仰控制速度
-
+
H2THT
控制绝对高度
-
+
AGL2THT
控制相对高度
-
+
LAT_OFF
横向制导关闭
-
+
LNAV2PHI
滚转消除侧偏
-
+
PSI2PHI
滚转控制航向
-
-
-
+
+
+
@@ -2432,156 +2432,156 @@
未定位
-
-
+
+
未初始化
-
-
+
+
垂直陀螺
-
-
+
+
AHRS
-
-
+
+
速度导航
-
-
+
+
位置导航
-
-
+
+
正常
-
-
-
+
+
-
+
+
无效
-
-
+
+
解算正常
-
-
+
+
卫星数不足
-
-
+
+
内部错误
-
-
+
+
速度超限
-
-
-
-
+
+
+
+
未知
-
-
+
+
多普勒
-
-
+
+
微分
-
-
-
- 单点
-
-
-
-
-
- 伪距差分
-
-
-
-
-
- SBAS广域差分
-
-
- 广域差分
+ 单点
- RTK_FLOAT
+ 伪距差分
- RTK_INT
+ SBAS广域差分
- PPP_FLOAT
+ 广域差分
- PPP_INT
+ RTK_FLOAT
+ RTK_INT
+
+
+
+
+
+ PPP_FLOAT
+
+
+
+
+
+ PPP_INT
+
+
+
+
+
FIXED
@@ -2590,17 +2590,17 @@
未支持
-
+
flight mode
飞行模式
-
+
连接内置惯导
-
+
连接SBG
diff --git a/App/mainwindow.cpp b/App/mainwindow.cpp
index 44c4945..bfcd690 100644
--- a/App/mainwindow.cpp
+++ b/App/mainwindow.cpp
@@ -1036,6 +1036,8 @@ void MainWindow::setServoOffset(QVariant dirla, QVariant dirra, QVariant dirle,
// 16~20Hz左右 运行频率可能太高
void MainWindow::updateUI()//事件驱动式更新数据
{
+
+
static uint32_t custommode_old = 0;
static uint8_t state_old = 0;
bool isCustomChanged = false;
@@ -1059,6 +1061,11 @@ void MainWindow::updateUI()//事件驱动式更新数据
}
+ QElapsedTimer ElapsedTimer;
+
+ ElapsedTimer.start();
+
+
copk->setAttitude(dlink->mavlinknode->vehicle.attitude.pitch * 57.3,
dlink->mavlinknode->vehicle.attitude.roll * 57.3,
dlink->mavlinknode->vehicle.attitude.yaw * 57.3);
@@ -1152,6 +1159,8 @@ void MainWindow::updateUI()//事件驱动式更新数据
copk->setGPS(gps_str);
+ //QApplication::processEvents();
+
/*
toolsui->diagram->setTime(3,QTime::fromMSecsSinceStartOfDay(StartupTime->time().msecsTo(QDateTime::currentDateTime().time())));//开车时长
@@ -1323,7 +1332,7 @@ void MainWindow::updateUI()//事件驱动式更新数据
dlink->mavlinknode->vehicle.attitude.yaw * 57.3);
-
+ //QApplication::processEvents();
@@ -1846,7 +1855,7 @@ void MainWindow::updateUI()//事件驱动式更新数据
-
+ //QApplication::processEvents();
@@ -2425,6 +2434,8 @@ void MainWindow::updateUI()//事件驱动式更新数据
toolsui->senser->setDAS(2,8,QString::number(dlink->mavlinknode->vehicle.scaled_pressure.press_abs,'f',3));
+ qDebug() << "nsecsElapsed" << ElapsedTimer.nsecsElapsed();
+
}
void MainWindow::Timer_1s_out(void)
diff --git a/App/mainwindow.h b/App/mainwindow.h
index 32a6b39..3e0f78d 100644
--- a/App/mainwindow.h
+++ b/App/mainwindow.h
@@ -3,7 +3,7 @@
#include
#include "QApplication"
-
+#include "QElapsedTimer"
#include "Config/Config.h"
diff --git a/MavLinkNode/Terminal.cpp b/MavLinkNode/Terminal.cpp
index ba46c84..1a327aa 100644
--- a/MavLinkNode/Terminal.cpp
+++ b/MavLinkNode/Terminal.cpp
@@ -26,8 +26,8 @@ void terminal::process()//线程函数
{
default:
case Nop_Mode : QThread::msleep(1000/frq());break;
- case RecieveMode : ReadStateMachine();QApplication::processEvents();break;
- case TransmitMode : WriteStateMachine();QApplication::processEvents();break;
+ case RecieveMode : ReadStateMachine();break;//QApplication::processEvents();break;
+ case TransmitMode : WriteStateMachine();break;//QApplication::processEvents();break;
}
if(isInterruptionRequested())//退出
diff --git a/MavLinkNode/commandprocess.cpp b/MavLinkNode/commandprocess.cpp
index 916f7d8..5d32906 100644
--- a/MavLinkNode/commandprocess.cpp
+++ b/MavLinkNode/commandprocess.cpp
@@ -31,8 +31,8 @@ void commandprocess::process()//线程函数
{
default:
case Nop_Mode : QThread::msleep(1000.0/frq());break;
- case RecieveMode : ReadStateMachine();QApplication::processEvents();break;
- case TransmitMode : WriteStateMachine();QApplication::processEvents();break;
+ case RecieveMode : ReadStateMachine();break;//QApplication::processEvents();break;
+ case TransmitMode : WriteStateMachine();break;//QApplication::processEvents();break;
}
if(isInterruptionRequested())//退出
diff --git a/MavLinkNode/mavlinknode.cpp b/MavLinkNode/mavlinknode.cpp
index d5a8cb6..b9758cb 100644
--- a/MavLinkNode/mavlinknode.cpp
+++ b/MavLinkNode/mavlinknode.cpp
@@ -521,7 +521,7 @@ void MavLinkNode::process()//线程函数
{
break;
}
- QApplication::processEvents();
+ //QApplication::processEvents();
//QThread::yieldCurrentThread();//打开这个CPU占用50%
if(isIdle)
diff --git a/MavLinkNode/missionprocess.cpp b/MavLinkNode/missionprocess.cpp
index 30680f0..bee44e3 100644
--- a/MavLinkNode/missionprocess.cpp
+++ b/MavLinkNode/missionprocess.cpp
@@ -27,10 +27,10 @@ void MissionProcess::process()//线程函数
{
default:
case Nop_Mode : QThread::msleep(1000/frq());break;
- case RecieveMode : ReadStateMachine();QApplication::processEvents();break;
+ case RecieveMode : ReadStateMachine();break;//QApplication::processEvents();break;
case TransmitMode :
{
- QApplication::processEvents();
+ //QApplication::processEvents();
if(mission_status.transmit.type == 0)//航线传输
{
WriteStateMachine();
diff --git a/MavLinkNode/parameterprocess.cpp b/MavLinkNode/parameterprocess.cpp
index a30dd39..ec759b3 100644
--- a/MavLinkNode/parameterprocess.cpp
+++ b/MavLinkNode/parameterprocess.cpp
@@ -24,8 +24,8 @@ void ParameterProcess::process()//线程函数
{
default:
case Nop_Mode : QThread::msleep(1000/frq());break;
- case RecieveMode : ReadStateMachine();QApplication::processEvents();break;
- case TransmitMode : WriteStateMachine();QApplication::processEvents();break;
+ case RecieveMode : ReadStateMachine();break;//QApplication::processEvents();break;
+ case TransmitMode : WriteStateMachine();break;//QApplication::processEvents();break;
}
if(isInterruptionRequested())//退出
diff --git a/MavLinkNode/rcprocess.cpp b/MavLinkNode/rcprocess.cpp
index 6c1eaa6..c7a9f5c 100644
--- a/MavLinkNode/rcprocess.cpp
+++ b/MavLinkNode/rcprocess.cpp
@@ -53,7 +53,7 @@ void rcprocess::process()//线程函数
if(datagram.size() > 0)
{
- QApplication::processEvents();
+ //QApplication::processEvents();
parse(SourceType::s_port,datagram);
}
diff --git a/MavLinkNode/replay.cpp b/MavLinkNode/replay.cpp
index 982e43d..8da2b1d 100644
--- a/MavLinkNode/replay.cpp
+++ b/MavLinkNode/replay.cpp
@@ -109,7 +109,7 @@ void Replay::process()//线程函数
lastTimestamp = currentTimestamp;
- QApplication::processEvents();
+ //QApplication::processEvents();
}
else
{
diff --git a/MavLinkNode/rtkprocess.cpp b/MavLinkNode/rtkprocess.cpp
index 5e62fe7..4793c7d 100644
--- a/MavLinkNode/rtkprocess.cpp
+++ b/MavLinkNode/rtkprocess.cpp
@@ -29,7 +29,7 @@ void rtkprocess::process()//线程函数
datagram = readbuff(SourceType::s_port);//每次全部读取
if(datagram.size() > 0)
{
- QApplication::processEvents();
+ //QApplication::processEvents();
rtkrawdata.append(datagram);
}
diff --git a/MavLinkNode/statusprocess.cpp b/MavLinkNode/statusprocess.cpp
index 9a593f6..a05d2d4 100644
--- a/MavLinkNode/statusprocess.cpp
+++ b/MavLinkNode/statusprocess.cpp
@@ -33,10 +33,10 @@ void statusprocess::process()//线程函数
{
default:
case Nop_Mode : QThread::msleep(1000.0/frq());break;
- case RecieveMode : ReadStateMachine();QApplication::processEvents();break;
+ case RecieveMode : ReadStateMachine();break;//QApplication::processEvents();break;
case TransmitMode :
{
- QApplication::processEvents();
+ //QApplication::processEvents();
if((QTime::currentTime().msecsSinceStartOfDay() - time) > (1000.0/running_frq))
{
heartbeat(m_heartbeat.custom_mode,
diff --git a/opmap/MAP_zh_CN.qm b/opmap/MAP_zh_CN.qm
index 63a5c2b..4015c8c 100644
Binary files a/opmap/MAP_zh_CN.qm and b/opmap/MAP_zh_CN.qm differ
diff --git a/opmap/MAP_zh_CN.ts b/opmap/MAP_zh_CN.ts
index f644af3..842c733 100644
--- a/opmap/MAP_zh_CN.ts
+++ b/opmap/MAP_zh_CN.ts
@@ -78,24 +78,24 @@ Please first select the area of the map to rip with <CTRL>+Left mouse clic
mapcontrol::OPMapWidget
-
+
.plan
-
+
开始上传航点,总数%1
-
+
上传失败%1
-
+
recieve way point group:%1 seq:%2
-
+ 收到航点:第%1组,第%2点
@@ -103,17 +103,32 @@ Please first select the area of the map to rip with <CTRL>+Left mouse clic
Position:
-
+ 位置:
Altitude:
-
+ 海拔:
Time:
-
+ 时间:
+
+
+
+ mapcontrol::WayPointItem
+
+
+ Speed: %1m/s
+ 速度:%1m/s
+
+
+
+ Height: %1m
+%2
+ 高度:%1m
+%2
@@ -165,7 +180,7 @@ Please first select the area of the map to rip with <CTRL>+Left mouse clic
-
+
Tip
标签
@@ -175,13 +190,13 @@ Please first select the area of the map to rip with <CTRL>+Left mouse clic
显示标签
-
-
+
+
Measure
测量
-
+
Table
航线
@@ -190,7 +205,7 @@ Please first select the area of the map to rip with <CTRL>+Left mouse clic
选择一个航线文件...
-
+
Measuring
测量中
diff --git a/opmap/mapwidget/opmapwidget.cpp b/opmap/mapwidget/opmapwidget.cpp
index c5ed893..76f947e 100644
--- a/opmap/mapwidget/opmapwidget.cpp
+++ b/opmap/mapwidget/opmapwidget.cpp
@@ -139,6 +139,10 @@ OPMapWidget::OPMapWidget(QWidget *parent, Configuration *config) : QGraphicsView
waypointsetting,SLOT(measureState(bool)));
+ connect(waypointsetting,SIGNAL(WPShowTip(bool)),
+ this,SLOT(WPShowTip(bool)));
+
+
//missiontable = new MissionDialog();
//missiontable->hide();
@@ -2343,7 +2347,7 @@ void OPMapWidget::receivedPoint(float param1,float param2,float param3,float par
//emit showMessage(tr("recieve way point %1").arg(seq + 1));
- emit showMessage(tr("recieve way point group:%1 seq:%2").arg(mission_type).arg(seq + 1));
+ emit showMessage(tr("recieve way point group:%1 seq:%2").arg(mission_type - 2).arg(seq + 1));
//qDebug() << "receivers Point" << x * 10e-8 << y * 10e-8 << 10e-8;
@@ -2585,7 +2589,16 @@ void OPMapWidget::getAllPoints(int group)
}
}
-
+void OPMapWidget::WPShowTip(bool flag)
+{
+ foreach(QGraphicsItem * i, map->childItems()) {
+ WayPointItem *w = qgraphicsitem_cast(i);
+ if (w)
+ {
+ w->setisShowTip(flag);
+ }
+ }
+}
}
diff --git a/opmap/mapwidget/opmapwidget.h b/opmap/mapwidget/opmapwidget.h
index b5da609..d84f8aa 100644
--- a/opmap/mapwidget/opmapwidget.h
+++ b/opmap/mapwidget/opmapwidget.h
@@ -718,6 +718,8 @@ public slots:
void RipMap();
void OnSelectionChanged();
+
+ void WPShowTip(bool flag);
};
}
#endif // OPMAPWIDGET_H
diff --git a/opmap/mapwidget/waypointitem.cpp b/opmap/mapwidget/waypointitem.cpp
index c5242fa..a093c50 100644
--- a/opmap/mapwidget/waypointitem.cpp
+++ b/opmap/mapwidget/waypointitem.cpp
@@ -341,6 +341,36 @@ void WayPointItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *opti
painter->drawText(QRect(12,-10,200,20),Qt::AlignLeft|Qt::AlignVCenter,QString::number(Elevation));
*/
+
+ if(isShowTip)
+ {
+ QRectF rect = QRectF(-50,-60,100,40);
+
+ //画一块底色#58ACFA
+ painter->setBrush(QColor("#A9F5F2"));
+ //painter->setBrush(Qt::NoBrush);
+
+ ePen.setColor(QColor("#58ACFA"));
+ ePen.setWidth(2);
+ painter->setPen(ePen);
+ painter->drawRect(rect);
+
+ //画字
+ QFont font;
+ font.setWeight(QFont::ExtraLight);
+ font.setFamily("Arial");//非衬线
+ font.setPixelSize(12);
+ painter->setFont(font);
+
+ ePen.setColor(QColor("#000000"));
+ painter->setPen(ePen);
+
+ QString _v = tr("Speed: %1m/s").arg(QString::number(property.param4,'f',0));
+ QString _h = tr("Height: %1m\n%2").arg(QString::number(property.z,'f',0)).arg(_v);
+
+
+ painter->drawText(QRectF(rect.x() + 2,rect.y()+2,rect.width() - 4,rect.height() - 4),Qt::AlignLeft | Qt::AlignVCenter,_h);
+ }
}
}
diff --git a/opmap/mapwidget/waypointitem.h b/opmap/mapwidget/waypointitem.h
index d039ada..b9b6715 100644
--- a/opmap/mapwidget/waypointitem.h
+++ b/opmap/mapwidget/waypointitem.h
@@ -293,6 +293,29 @@ public:
return isactive;
}
+
+ void setisShowTip(bool flag)
+ {
+ isShowTip = flag;
+ update();
+ }
+
+ bool getisShowTip(void)
+ {
+ return isShowTip;
+ }
+
+ void setisFancy(bool flag)
+ {
+ isFancy = flag;
+ update();
+ }
+
+ bool getisFancy(void)
+ {
+ return isFancy;
+ }
+
protected:
void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
void mousePressEvent(QGraphicsSceneMouseEvent *event);
@@ -302,6 +325,10 @@ private:
_property property;
+ bool isShowTip = false;
+ bool isFancy = false;
+ bool FancyType = 0;
+
bool isSimple = false;
bool isEdit = false;
bool isFollowPrevious = false;
diff --git a/opmap/mapwidget/waypointsetting.cpp b/opmap/mapwidget/waypointsetting.cpp
index aad4f53..0a6d678 100644
--- a/opmap/mapwidget/waypointsetting.cpp
+++ b/opmap/mapwidget/waypointsetting.cpp
@@ -131,10 +131,12 @@ WayPointSetting::WayPointSetting(MapGraphicItem *map, QColor background) : myMap
if(btn_tip->Text() == tr("Tip"))
{
btn_tip->setText(tr("ShowTip"));
+ emit WPShowTip(true);
}
else
{
btn_tip->setText(tr("Tip"));
+ emit WPShowTip(false);
}
});
diff --git a/opmap/mapwidget/waypointsetting.h b/opmap/mapwidget/waypointsetting.h
index b41ce21..8ef9aaf 100644
--- a/opmap/mapwidget/waypointsetting.h
+++ b/opmap/mapwidget/waypointsetting.h
@@ -182,6 +182,8 @@ signals:
void WPRuler(void);
void WPTable(void);
+ void WPShowTip(bool flag);
+
protected:
void mouseMoveEvent(QGraphicsSceneMouseEvent *event);