diff --git a/App/CommandUI/CommandUI.cpp b/App/CommandUI/CommandUI.cpp
index 8dd01a9..529f502 100644
--- a/App/CommandUI/CommandUI.cpp
+++ b/App/CommandUI/CommandUI.cpp
@@ -316,7 +316,7 @@ void CommandUI::setCommandFile(QString File)
btn->setFixedSize(CMDwidth,CMDheight);
ui->gridLayout_Command->addWidget(btn,
- info.toObject().find(_rowJsonKey_columnJsonKey).value().toInt(),
+ info.toObject().find(_rowJsonKey).value().toInt(),
info.toObject().find(_columnJsonKey).value().toInt());
btn->setProperty("state",state::success);
@@ -647,23 +647,12 @@ void CommandUI::addVehicles(int sysid, int compid)
{
Q_UNUSED(compid)
- if(ui->comboBox_uav->findData(sysid) == -1)
- {
- ui->comboBox_uav->addItem(QString::number(sysid),sysid);
- ui->comboBox_uav->setCurrentIndex(0);
- }
+
}
void CommandUI::setPointCount(int num)
{
- ui->comboBox_seq->clear();
-
- for(int i = 1; i <= num;i++)
- {
- ui->comboBox_seq->addItem(QString::number(i),i);
- }
- ui->comboBox_seq->setCurrentIndex(0);
}
@@ -689,33 +678,3 @@ void CommandUI::on_groupBox_Command_clicked()
-void CommandUI::on_pushButton_setSeq_clicked()
-{
- if(ui->comboBox_seq->currentIndex() != -1)
- {
- int seq = ui->comboBox_seq->currentData(Qt::UserRole).toInt();
-
- missionConfirm(seq);
- }
-}
-
-void CommandUI::on_pushButton_setUAV_clicked()
-{
- if(ui->comboBox_uav->currentIndex() != -1)
- {
- int seq = ui->comboBox_uav->currentData(Qt::UserRole).toInt();
-
- //根据这个comfirm 确定要输入的参数
- Confirm *confirmor = new Confirm(this);
- confirmor->setGeometry(0,0,this->width(),this->height());
-
- //设置警告界面
- confirmor->setNotice(tr("click confirm to set uav %1 as current").arg(seq));
-
- connect(confirmor,SIGNAL(confirmValue(QVariant)),
- this,SLOT(setCurrent(QVariant)));
-
- confirmor->show();
- }
-}
-
diff --git a/App/CommandUI/CommandUI.h b/App/CommandUI/CommandUI.h
index 7476f32..a15cf3d 100644
--- a/App/CommandUI/CommandUI.h
+++ b/App/CommandUI/CommandUI.h
@@ -106,10 +106,6 @@ private slots:
void on_groupBox_Command_clicked();
- void on_pushButton_setSeq_clicked();
-
- void on_pushButton_setUAV_clicked();
-
private:
static const char* _versionJsonKey;
diff --git a/App/CommandUI/CommandUI.ui b/App/CommandUI/CommandUI.ui
index 6a07d12..aa0b1df 100644
--- a/App/CommandUI/CommandUI.ui
+++ b/App/CommandUI/CommandUI.ui
@@ -6,7 +6,7 @@
0
0
- 340
+ 418
490
@@ -15,60 +15,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
- 无人机#
-
-
-
- -
-
-
-
-
- -
-
-
- 切换无人机
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
- 航点#
-
-
-
- -
-
-
-
-
- -
-
-
- 切换航点
-
-
-
-
-
-
-
- -
Command
diff --git a/App/MenuBarUI/MenuBarUI.cpp b/App/MenuBarUI/MenuBarUI.cpp
index 45b0e2f..86f9948 100644
--- a/App/MenuBarUI/MenuBarUI.cpp
+++ b/App/MenuBarUI/MenuBarUI.cpp
@@ -1,4 +1,4 @@
-#include "MenuBarUI.h"
+#include "MenuBarUI.h"
#include "ui_MenuBarUI.h"
@@ -75,9 +75,11 @@ void MenuBarUI::setPushButtonState(uint8_t state1,uint8_t state2,uint8_t state3,
ui->pushButton_Info->style()->unpolish(ui->pushButton_Info);
ui->pushButton_Info->style()->polish(ui->pushButton_Info);
+ /*
ui->pushButton_Base->setProperty("state",state6);
ui->pushButton_Base->style()->unpolish(ui->pushButton_Base);
ui->pushButton_Base->style()->polish(ui->pushButton_Base);
+ */
}
@@ -93,7 +95,7 @@ void MenuBarUI::onClicked()
void MenuBarUI::on_pushButton_Setting_clicked()
{
- ui->pushButton_Base->hide();
+ // ui->pushButton_Base->hide();
setPushButtonState(state::Selected,
state::unSelected,
state::unSelected,
@@ -107,7 +109,7 @@ void MenuBarUI::on_pushButton_Setting_clicked()
void MenuBarUI::on_pushButton_SelfTest_clicked()
{
- ui->pushButton_Base->hide();
+ //ui->pushButton_Base->hide();
setPushButtonState(state::unSelected,
state::Selected,
state::unSelected,
@@ -120,7 +122,7 @@ void MenuBarUI::on_pushButton_SelfTest_clicked()
void MenuBarUI::on_pushButton_Mission_clicked()
{
- ui->pushButton_Base->hide();
+ //ui->pushButton_Base->hide();
setPushButtonState(state::unSelected,
state::unSelected,
state::Selected,
@@ -133,7 +135,7 @@ void MenuBarUI::on_pushButton_Mission_clicked()
void MenuBarUI::on_pushButton_Flight_clicked()
{
- ui->pushButton_Base->show();
+ //ui->pushButton_Base->show();
setPushButtonState(state::unSelected,
state::unSelected,
state::unSelected,
@@ -146,7 +148,7 @@ void MenuBarUI::on_pushButton_Flight_clicked()
void MenuBarUI::on_pushButton_Info_clicked()
{
- ui->pushButton_Base->hide();
+ //ui->pushButton_Base->hide();
setPushButtonState(state::unSelected,
state::unSelected,
state::unSelected,
@@ -158,11 +160,6 @@ void MenuBarUI::on_pushButton_Info_clicked()
emit IndexChanged(4);
}
-void MenuBarUI::on_pushButton_Base_clicked()
-{
- update();
- emit IndexChanged(5);
-}
void MenuBarUI::showMessage(const QString &message, int TimeOut)
{
diff --git a/App/MenuBarUI/MenuBarUI.h b/App/MenuBarUI/MenuBarUI.h
index be88f3d..7ce4527 100644
--- a/App/MenuBarUI/MenuBarUI.h
+++ b/App/MenuBarUI/MenuBarUI.h
@@ -1,4 +1,4 @@
-#ifndef MENUBARUI_H
+#ifndef MENUBARUI_H
#define MENUBARUI_H
#include
@@ -64,7 +64,6 @@ private slots:
void on_pushButton_Info_clicked();
- void on_pushButton_Base_clicked();
private:
Ui::MenuBarUI *ui;
diff --git a/App/MenuBarUI/MenuBarUI.ui b/App/MenuBarUI/MenuBarUI.ui
index dc4dad7..1da3108 100644
--- a/App/MenuBarUI/MenuBarUI.ui
+++ b/App/MenuBarUI/MenuBarUI.ui
@@ -77,25 +77,6 @@
6
-
-
-
-
-
- 80
- 80
-
-
-
-
- 80
- 16777215
-
-
-
- SelfTest
-
-
-
-
@@ -115,25 +96,6 @@
- -
-
-
-
- 80
- 80
-
-
-
-
- 80
- 16777215
-
-
-
- Tools
-
-
-
-
@@ -184,22 +146,41 @@
- -
-
+
-
+
- 79
+ 80
80
80
- 80
+ 16777215
- Base
+ SelfTest
+
+
+
+ -
+
+
+
+ 80
+ 80
+
+
+
+
+ 80
+ 16777215
+
+
+
+ Tools
diff --git a/App/MissionUI/propertyui.ui b/App/MissionUI/propertyui.ui
index 1755355..a589e3d 100644
--- a/App/MissionUI/propertyui.ui
+++ b/App/MissionUI/propertyui.ui
@@ -311,6 +311,19 @@
-
-
+
+
+
+ 80
+ 60
+
+
+
+
+
+
+
+ -
@@ -329,57 +342,6 @@
- -
-
-
-
- 80
- 60
-
-
-
-
-
-
-
- -
-
-
-
- 0
- 60
-
-
-
-
- 80
- 16777215
-
-
-
- Previous
-
-
-
- -
-
-
-
- 0
- 60
-
-
-
-
- 80
- 16777215
-
-
-
- Next
-
-
-
-
@@ -583,38 +545,5 @@
-
-
- pushButton
- clicked()
- pushButton_Previous
- click()
-
-
- 41
- 165
-
-
- 187
- 105
-
-
-
-
- pushButton_2
- clicked()
- pushButton_Next
- click()
-
-
- 209
- 169
-
-
- 272
- 112
-
-
-
-
+
diff --git a/App/ToolsUI/ToolsUI.cpp b/App/ToolsUI/ToolsUI.cpp
index fa9a9ad..29b647a 100644
--- a/App/ToolsUI/ToolsUI.cpp
+++ b/App/ToolsUI/ToolsUI.cpp
@@ -95,6 +95,15 @@ ToolsUI::ToolsUI(QWidget *parent) :
setPushButtonState(ui->pushButton_Diagram,
state::unSelected);
+
+
+ ui->pushButton_Servos->hide();
+ ui->PowerSystem->hide();
+ ui->ServoSystem->hide();
+ ui->pushButton_ShowExtern->hide();
+ ui->pushButton_CommandBox->hide();
+ ui->pushButton_Diagram->hide();
+
}
ToolsUI::~ToolsUI()
diff --git a/App/mainwindow.cpp b/App/mainwindow.cpp
index bb74353..e524a15 100644
--- a/App/mainwindow.cpp
+++ b/App/mainwindow.cpp
@@ -76,6 +76,7 @@ MainWindow::MainWindow(QWidget *parent)
this,SLOT(onTabIndexChanged(int)));
+ qDebug() << "menuBar init";
//---------------
//设置
setting = new Setting(this);
@@ -91,10 +92,10 @@ MainWindow::MainWindow(QWidget *parent)
//状态
- statusui = new StatusUI(this);
- statusui->hide();
+ //statusui = new StatusUI(this);
+ //statusui->hide();
- healthui = new HealthUI(this);
+ //healthui = new HealthUI(this);
//指令
commandUI = new CommandUI(this);
@@ -320,7 +321,7 @@ MainWindow::MainWindow(QWidget *parent)
map,SLOT(WPSetCurrent(int)),Qt::DirectConnection);
//==== showmessage=====
- connect(toolsui->command,SIGNAL(showMessage(QString,int)),this,SLOT(showMessage(QString,int)));
+ //connect(toolsui->command,SIGNAL(showMessage(QString,int)),this,SLOT(showMessage(QString,int)));
connect(commandUI,SIGNAL(showMessage(QString,int)),this,SLOT(showMessage(QString,int)));
connect(copk,SIGNAL(showMessage(QString,int)),this,SLOT(showMessage(QString,int)));
connect(dlink,SIGNAL(showMessage(QString,int)),this,SLOT(showMessage(QString,int)));
@@ -390,7 +391,7 @@ void MainWindow::resizeEvent(QResizeEvent *event)
map->setGeometry(0,menuBarUI->height(),
- this->width()- copk->width() - statusui->width(),this->height() - menuBarUI->height());
+ this->width()- copk->width(),this->height() - menuBarUI->height());
if(MainIndex == 2)//renwu
{
@@ -400,24 +401,17 @@ void MainWindow::resizeEvent(QResizeEvent *event)
//if(MainIndex == 5)//renwu
{
+ /*
if(statusui->isHidden())
map->setGeometry(0,menuBarUI->height(),
this->width()- copk->width(),this->height() - menuBarUI->height());
+ */
}
copk->setGeometry(this->width() - copk->width(),menuBarUI->height(),
copk->width(),copk->height());
- healthui->setGeometry(this->width() - copk->width(),menuBarUI->height() + copk->height(),
- copk->width(),healthui->height());
-
-
- statusui->setGeometry(map->width(),
- menuBarUI->height(),
- copk->width() *1.5,
- this->height() - menuBarUI->height());
-
missionUI->setGeometry(this->width() - copk->width(),menuBarUI->height(),
copk->width(),this->height() - menuBarUI->height());
@@ -425,8 +419,8 @@ void MainWindow::resizeEvent(QResizeEvent *event)
- commandUI->setGeometry(this->width() - copk->width(),menuBarUI->height() + copk->height() + healthui->height(),
- copk->width(),this->height() - menuBarUI->height() - copk->height() - healthui->height());
+ commandUI->setGeometry(this->width() - copk->width(),menuBarUI->height() + copk->height(),
+ copk->width(),this->height() - menuBarUI->height() - copk->height());
toolsui->setGeometry(0,menuBarUI->height(),
@@ -628,14 +622,14 @@ void MainWindow::onTabIndexChanged(const int &index)//界面选择管理
copk->show();
commandUI->show();
//statusui->show();
- healthui->show();
+ //healthui->show();
}
else
{
copk->hide();
commandUI->hide();
//statusui->hide();
- healthui->hide();
+ //healthui->hide();
}
@@ -646,24 +640,16 @@ void MainWindow::onTabIndexChanged(const int &index)//界面选择管理
if(index == 5)
{
- if(statusui->isHidden())
- {
+
copk->show();
commandUI->show();
- statusui->show();
- healthui->show();
- }
- else
- {
- copk->show();
- commandUI->show();
- statusui->hide();
- healthui->show();
- }
+ //statusui->hide();
+ //healthui->show();
+
}
else
{
- statusui->hide();
+ //statusui->hide();
}
@@ -689,7 +675,8 @@ void MainWindow::setCommunicationLostState(bool flag)
isCommunicationLost = flag;
- healthui->setState(6,(dlink->mavlinknode->isCommunicationLost)?(HealthUI::state::failure):(HealthUI::state::success));//DLINK
+
+ //healthui->setState(6,(dlink->mavlinknode->isCommunicationLost)?(HealthUI::state::failure):(HealthUI::state::success));//DLINK
if(flag == true)//通讯丢失
{
@@ -698,7 +685,7 @@ void MainWindow::setCommunicationLostState(bool flag)
showMessage(tr("Communication Lost"),3000);
tts->say(tr("Communication Lost"));
}
-
+/*
healthui->setState(1,HealthUI::state::failure);
healthui->setState(2,HealthUI::state::failure);
healthui->setState(4,HealthUI::state::failure);
@@ -719,7 +706,7 @@ void MainWindow::setCommunicationLostState(bool flag)
healthui->setState(25,HealthUI::state::failure);
healthui->setState(30,HealthUI::state::failure);
-
+*/
}
else
{
@@ -972,7 +959,7 @@ void MainWindow::updateUI()//事件驱动式更新数据
dlink->mavlinknode->vehicle.attitude.yaw * 57.3);
- /*
+
if(MainIndex == 3)//飞行界面
{
//刷新时间1Hz
@@ -988,7 +975,7 @@ void MainWindow::updateUI()//事件驱动式更新数据
showMessage(message);
}
- */
+
@@ -1017,7 +1004,7 @@ void MainWindow::updateUI()//事件驱动式更新数据
舵机指令
自检 2004
*/
-
+/*
//设置舵机显示
@@ -1097,6 +1084,7 @@ void MainWindow::updateUI()//事件驱动式更新数据
//dlink->mavlinknode->vehicle.servo_output_raw.servo5_raw
uint16_t servoHealt = dlink->mavlinknode->vehicle.servo_output_raw.servo10_raw;
+ */
/*
sbus = feedback (ra)
sbus = feedback (re)
@@ -1110,7 +1098,7 @@ void MainWindow::updateUI()//事件驱动式更新数据
//舵机反馈是有符号16b/
//qDebug() << getBit(health,16);
-
+/*
healthui->setState(11,getBit(health,16)?(getBit(servoHealt,3)?(HealthUI::state::success):(HealthUI::state::warning)):(HealthUI::state::failure));//LA
healthui->setState(12,getBit(health,13)?(getBit(servoHealt,0)?(HealthUI::state::success):(HealthUI::state::warning)):(HealthUI::state::failure));//RA
healthui->setState(13,getBit(health,17)?(getBit(servoHealt,4)?(HealthUI::state::success):(HealthUI::state::warning)):(HealthUI::state::failure));//LE
@@ -1413,7 +1401,7 @@ void MainWindow::updateUI()//事件驱动式更新数据
toolsui->diagram->setGPS2(7,gpsFix2);
-
+*/
@@ -1424,7 +1412,7 @@ void MainWindow::updateUI()//事件驱动式更新数据
void MainWindow::TotalDistance(double value)
{
- /*
+
if(MainIndex == 2)//任务界面
{
QString message;
@@ -1436,6 +1424,6 @@ void MainWindow::TotalDistance(double value)
showMessage(message);
}
- */
+
}
diff --git a/App/mainwindow.h b/App/mainwindow.h
index 4adeb0d..b40d677 100644
--- a/App/mainwindow.h
+++ b/App/mainwindow.h
@@ -101,8 +101,6 @@ protected:
Config *config = nullptr;
- StatusUI *statusui = nullptr;
- HealthUI *healthui = nullptr;
MenuBarUI *menuBarUI = nullptr;
CommandUI *commandUI = nullptr;
Cockpit *copk = nullptr;