‘修改6,7,8’
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>390</width>
|
||||
<height>217</height>
|
||||
<height>205</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@@ -32,7 +32,7 @@
|
||||
<item row="0" column="0">
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>健康状态 -< 绿色:正常,黄色:解码错误,红色:通讯错误 >-</string>
|
||||
<string/>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
|
||||
@@ -23,6 +23,12 @@ GlobalSetting::GlobalSetting(QWidget *parent) :
|
||||
|
||||
//地图缓存相关UI
|
||||
|
||||
ui->doubleSpinBox_left_lat->setValue(52);
|
||||
ui->doubleSpinBox_left_lng->setValue(74);
|
||||
|
||||
ui->doubleSpinBox_right_lat->setValue(18);
|
||||
ui->doubleSpinBox_right_lng->setValue(135);
|
||||
|
||||
|
||||
// ui->label_mapcache_info->hide();
|
||||
// ui->label_maplat->hide();
|
||||
@@ -502,6 +508,9 @@ void GlobalSetting::on_pushButton_map_cache_clicked()
|
||||
|
||||
qint8 zoom = ui->comboBox_map_level->currentData().toInt();
|
||||
|
||||
qDebug() << lat_l << lng_l << lat_r << lng_r << zoom;
|
||||
|
||||
|
||||
|
||||
if((lat_l == lat_r) &&(lng_l == lng_r))//如果值一样,说明就是一个点,不开启缓存
|
||||
{
|
||||
|
||||
@@ -32,6 +32,7 @@ PowerSystem::PowerSystem(QWidget *parent) :
|
||||
setColor(ui->label_TRPM,state::success);
|
||||
*/
|
||||
|
||||
ui->checkBox_17->setHidden(true);
|
||||
|
||||
//设置灯
|
||||
setColor(ui->checkBox_1,state::success);
|
||||
|
||||
@@ -149,6 +149,9 @@ ServoSystem::ServoSystem(QWidget *parent) :
|
||||
m_le = 0;
|
||||
|
||||
|
||||
ui->pushButton_HeatOn1->setHidden(true);
|
||||
ui->pushButton_HeatOn2->setHidden(true);
|
||||
|
||||
}
|
||||
|
||||
ServoSystem::~ServoSystem()
|
||||
@@ -278,16 +281,16 @@ void ServoSystem::setCheckState(uint32_t pos,QVariant value)
|
||||
setColor(ui->checkBox_500W,(value.toBool())?(state::success):(state::failure));
|
||||
break;
|
||||
case 6:
|
||||
setColor(ui->checkBox_5525D,(value.toBool())?(state::success):(state::failure));
|
||||
//setColor(ui->checkBox_5525D,(value.toBool())?(state::success):(state::failure));
|
||||
break;
|
||||
case 7:
|
||||
setColor(ui->checkBox_5803A,(value.toBool())?(state::success):(state::failure));
|
||||
//setColor(ui->checkBox_5803A,(value.toBool())?(state::success):(state::failure));
|
||||
break;
|
||||
case 8:
|
||||
setColor(ui->checkBox_5607A,(value.toBool())?(state::success):(state::failure));
|
||||
//setColor(ui->checkBox_5607A,(value.toBool())?(state::success):(state::failure));
|
||||
break;
|
||||
case 9:
|
||||
setColor(ui->checkBox_4525D,(value.toBool())?(state::success):(state::failure));
|
||||
//setColor(ui->checkBox_4525D,(value.toBool())?(state::success):(state::failure));
|
||||
break;
|
||||
case 10:
|
||||
//setColor(ui->checkBox_atteck,(value.toBool())?(state::success):(state::failure));
|
||||
|
||||
@@ -807,77 +807,7 @@
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_4">
|
||||
<item row="2" column="2">
|
||||
<widget class="QCheckBox" name="checkBox_5607A">
|
||||
<property name="text">
|
||||
<string>5607A</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QCheckBox" name="checkBox_AirSpeed">
|
||||
<property name="text">
|
||||
<string>空速管加热</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<widget class="QCheckBox" name="checkBox_4525D">
|
||||
<property name="text">
|
||||
<string>4525D</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QCheckBox" name="checkBox_500W">
|
||||
<property name="text">
|
||||
<string>500瓦开</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QCheckBox" name="checkBox_5525D">
|
||||
<property name="text">
|
||||
<string>5525D</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="checkBox_28v">
|
||||
<property name="text">
|
||||
<string>28V电源</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QCheckBox" name="checkBox_56v">
|
||||
<property name="text">
|
||||
<string>56V电源</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" rowspan="6">
|
||||
<widget class="Line" name="line">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="checkBox_onBoard">
|
||||
<property name="text">
|
||||
<string>机载电源</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QCheckBox" name="checkBox_5803A">
|
||||
<property name="text">
|
||||
<string>5803A</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0" colspan="3">
|
||||
<item row="5" column="0" colspan="2">
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
@@ -890,6 +820,41 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="checkBox_onBoard">
|
||||
<property name="text">
|
||||
<string>机载电源</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="checkBox_28v">
|
||||
<property name="text">
|
||||
<string>28V电源</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="checkBox_56v">
|
||||
<property name="text">
|
||||
<string>56V电源</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="checkBox_AirSpeed">
|
||||
<property name="text">
|
||||
<string>空速管加热</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="checkBox_500W">
|
||||
<property name="text">
|
||||
<string>500瓦开</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
+22
-8
@@ -534,9 +534,10 @@ MainWindow::MainWindow(QWidget *parent)
|
||||
connect(dlink->mavlinknode->Mission,SIGNAL(currentPoint(int)),
|
||||
map,SLOT(WPSetCurrent(int)));
|
||||
|
||||
|
||||
/*
|
||||
connect(dlink->mavlinknode->Mission,SIGNAL(currentPoint(int)),
|
||||
menuBarUI,SLOT(setTargetPoint(int)));
|
||||
*/
|
||||
/*
|
||||
connect(dlink->mavlinknode->Mission,SIGNAL(currentPoint(int)),
|
||||
toolsui->diagram,SLOT(setTargetPoint(int)));
|
||||
@@ -1403,12 +1404,24 @@ void MainWindow::updateUI()//事件驱动式更新数据
|
||||
dlink->mavlinknode->vehicle.emb_atom_com.Airspeed);
|
||||
|
||||
|
||||
uint32_t health = dlink->mavlinknode->vehicle.sys_status.onboard_control_sensors_health;
|
||||
uint32_t enable = dlink->mavlinknode->vehicle.sys_status.onboard_control_sensors_enabled;
|
||||
uint32_t present = dlink->mavlinknode->vehicle.sys_status.onboard_control_sensors_present;
|
||||
|
||||
uint64_t time;
|
||||
uint64_t date;
|
||||
|
||||
|
||||
uint64_t time = ((uint64_t)dlink->mavlinknode->vehicle.ins2.time)% 1000000;
|
||||
uint64_t date = ((uint64_t)dlink->mavlinknode->vehicle.ins2.time)/ 1000000;
|
||||
|
||||
//qDebug() << time << date << (uint64_t)dlink->mavlinknode->vehicle.ins2.time;
|
||||
if(getBit(health,12)?(true):(false))
|
||||
{
|
||||
time = ((uint64_t)dlink->mavlinknode->vehicle.ins1.time)% 1000000;
|
||||
date = ((uint64_t)dlink->mavlinknode->vehicle.ins1.time)/ 1000000;
|
||||
}
|
||||
else
|
||||
{
|
||||
time = ((uint64_t)dlink->mavlinknode->vehicle.ins2.time)% 1000000;
|
||||
date = ((uint64_t)dlink->mavlinknode->vehicle.ins2.time)/ 1000000;
|
||||
}
|
||||
|
||||
menuBarUI->setTargetAlt(dlink->mavlinknode->vehicle.sys_status.load);
|
||||
|
||||
@@ -1514,9 +1527,7 @@ void MainWindow::updateUI()//事件驱动式更新数据
|
||||
|
||||
|
||||
|
||||
uint32_t health = dlink->mavlinknode->vehicle.sys_status.onboard_control_sensors_health;
|
||||
uint32_t enable = dlink->mavlinknode->vehicle.sys_status.onboard_control_sensors_enabled;
|
||||
uint32_t present = dlink->mavlinknode->vehicle.sys_status.onboard_control_sensors_present;
|
||||
|
||||
//qDebug() << health << QString::number(health,16);
|
||||
|
||||
// 0000 0000 0000 0000 0000 0000 0000 0000
|
||||
@@ -1732,6 +1743,9 @@ void MainWindow::updateUI()//事件驱动式更新数据
|
||||
|
||||
group_old = group;
|
||||
|
||||
|
||||
// menuBarUI->setTargetPoint();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 123 KiB |
@@ -985,33 +985,32 @@ void OPMapWidget::mouseDoubleClickEvent(QMouseEvent *event)
|
||||
|
||||
//生成一个列表
|
||||
//如果是点击生成,那么就获取当前的编辑组,使用当前编辑组的编号
|
||||
if(isWPCreate == true)
|
||||
if(currentGroup != 1)//如果不是当前组不是围栏,那么可以生成
|
||||
{
|
||||
if(event->button() == Qt::LeftButton)
|
||||
if(isWPCreate == true)
|
||||
{
|
||||
QPointF p = event->pos();
|
||||
p = map->mapFromParent(p);
|
||||
internals::PointLatLng LatLng;
|
||||
LatLng = map->FromLocalToLatLng(p.x(), p.y());
|
||||
WayPointItem *Item = WPCreate(LatLng,50);
|
||||
if(event->button() == Qt::LeftButton)
|
||||
{
|
||||
QPointF p = event->pos();
|
||||
p = map->mapFromParent(p);
|
||||
internals::PointLatLng LatLng;
|
||||
LatLng = map->FromLocalToLatLng(p.x(), p.y());
|
||||
WayPointItem *Item = WPCreate(LatLng,50);
|
||||
|
||||
|
||||
foreach(QGraphicsItem * i, map->childItems()) {
|
||||
WayPointItem *w = qgraphicsitem_cast<WayPointItem *>(i);
|
||||
foreach(QGraphicsItem * i, map->childItems()) {
|
||||
WayPointItem *w = qgraphicsitem_cast<WayPointItem *>(i);
|
||||
|
||||
if (w) {
|
||||
if (w->MissionType() == Item->MissionType()) {
|
||||
if(w->Number() == (Item->Number() - 1))
|
||||
{
|
||||
WPLineCreate(w,Item,Qt::green,false,2);
|
||||
if (w) {
|
||||
if (w->MissionType() == Item->MissionType()) {
|
||||
if(w->Number() == (Item->Number() - 1))
|
||||
{
|
||||
WPLineCreate(w,Item,Qt::green,false,2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
emit MouseDoubleClickEvent(event);
|
||||
@@ -1653,11 +1652,20 @@ void OPMapWidget::SetRotate(qreal const & value)
|
||||
|
||||
void OPMapWidget::userRipMap(bool start, qreal lat_l, qreal lng_l, qreal lat_r, qreal lng_r, qint8 zoom)
|
||||
{
|
||||
internals::RectLatLng rect(lat_l,lng_l,lat_r - lat_l,lng_r - lng_l);
|
||||
internals::RectLatLng rect(lat_l,lng_l,qAbs(lat_r - lat_l),qAbs(lng_r - lng_l));
|
||||
|
||||
if(start == true)
|
||||
{
|
||||
|
||||
//生成16个线程
|
||||
|
||||
|
||||
//每个线程分配不同的矩形
|
||||
|
||||
|
||||
|
||||
//开启线程
|
||||
|
||||
|
||||
MapRipper * mapRipper = new MapRipper(core, rect,zoom);
|
||||
|
||||
@@ -2949,6 +2957,18 @@ void OPMapWidget::WPGroup(int value)
|
||||
|
||||
find_PointNumber(currentGroup);
|
||||
|
||||
/*
|
||||
if(currentGroup == 1)
|
||||
{
|
||||
isWPCreate = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
isWPCreate = true;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
update();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user