将sbg相关信息去除
This commit is contained in:
@@ -19,7 +19,7 @@ HealthUI::HealthUI(QWidget *parent) :
|
||||
|
||||
|
||||
Install("320B",index++,state::inital);
|
||||
Install("SBG",index++,state::inital);
|
||||
Install("100e",index++,state::inital);
|
||||
Install("大气机",index++,state::inital);
|
||||
Install("起落架",index++,state::inital);
|
||||
Install("配电盒",index++,state::inital);//5
|
||||
|
||||
@@ -252,26 +252,6 @@ StatusUI::StatusUI(QWidget *parent) :
|
||||
QMap<QVariant, StateWidget::state>{{"未定向",StateWidget::state::red},
|
||||
{"已定向",StateWidget::state::green}});
|
||||
|
||||
install(statu2,0,"SBG状态",0,
|
||||
QMap<QVariant, StateWidget::state>{{"UNINITIALIZED",StateWidget::state::red},
|
||||
{"VERTICAL_GYRO",StateWidget::state::orange},
|
||||
{"AHRS",StateWidget::state::green},
|
||||
{"NAV_VELOCITY",StateWidget::state::green},
|
||||
{"NAV_POSTION",StateWidget::state::green}});
|
||||
|
||||
install(statu2,0,"SBG差分",0,
|
||||
QMap<QVariant, StateWidget::state>{{"NO_SOLUTION",StateWidget::state::red},
|
||||
{"UNKNOWN_TYPE",StateWidget::state::red},
|
||||
{"SINGLE",StateWidget::state::orange},
|
||||
{"PSRDIFF",StateWidget::state::green},
|
||||
{"SBAS",StateWidget::state::green},
|
||||
{"OMNISTAR",StateWidget::state::green},
|
||||
{"RTK_FLOAT",StateWidget::state::green},
|
||||
{"RTK_INT",StateWidget::state::green},
|
||||
{"PPP_FLOAT",StateWidget::state::green},
|
||||
{"PPP_INT",StateWidget::state::green},
|
||||
{"FIXED",StateWidget::state::green},
|
||||
{"undefined type",StateWidget::state::red}});
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -684,6 +684,8 @@ void Parse::run()
|
||||
memcpy(&imu.GPSWeek, data.data() + index, 2);
|
||||
index += 2;
|
||||
|
||||
qDebug() << "imu.GPSWeek" << QString::number(imu.GPSWeek, 16);
|
||||
|
||||
memcpy(&imu.tow_ms, data.data() + index, 4);
|
||||
index += 4;
|
||||
|
||||
@@ -708,9 +710,13 @@ void Parse::run()
|
||||
}status;
|
||||
}imuState;
|
||||
|
||||
|
||||
memcpy(&imuState.state, data.data() + index, 4);
|
||||
index += 4;
|
||||
|
||||
qDebug() << "imuState" << QString::number(imuState.state, 16);
|
||||
|
||||
|
||||
imu.IMUState.XGyroState1 = imuState.status.b0;
|
||||
imu.IMUState.YGyroState = imuState.status.b1;
|
||||
imu.IMUState.ZGyroState = imuState.status.b2;
|
||||
|
||||
+5
-40
@@ -783,9 +783,6 @@ MainWindow::MainWindow(QWidget *parent)
|
||||
connect(toolsui,&ToolsUI::imu_info,
|
||||
this,&MainWindow::imu_info);
|
||||
|
||||
connect(toolsui,&ToolsUI::euler_info,
|
||||
this,&MainWindow::euler_info);
|
||||
|
||||
connect(toolsui,&ToolsUI::gear_Info,
|
||||
this,&MainWindow::gear_Info);
|
||||
|
||||
@@ -816,8 +813,6 @@ MainWindow::MainWindow(QWidget *parent)
|
||||
connect(toolsui,&ToolsUI::vel_info,
|
||||
this,&MainWindow::vel_info);
|
||||
|
||||
connect(toolsui,&ToolsUI::pos_info,
|
||||
this,&MainWindow::pos_info);
|
||||
|
||||
connect(toolsui, &ToolsUI::thrusterInfo,
|
||||
this, &MainWindow::thrusterInfo);
|
||||
@@ -1956,8 +1951,8 @@ void MainWindow::updateVehicle(MavLinkNode::_vehicle vehicle)//事件驱动式
|
||||
healthui->setColor(15,getBit(present,24)?(HealthUI::state::success):(HealthUI::state::failure));//act2自检
|
||||
|
||||
|
||||
healthui->setValue(16,getBit(health,3)?("使用SBG"):("使用320"));//使用320/使用SBG
|
||||
healthui->setColor(16,getBit(health,3)?(HealthUI::state::warning):(HealthUI::state::success));//使用320/使用SBG
|
||||
healthui->setValue(16,getBit(health,3)?("使用100e"):("使用320"));//使用320/使用SBG
|
||||
healthui->setColor(16,getBit(health,3)?(HealthUI::state::warning):(HealthUI::state::success));
|
||||
//healthui->setColor(17,getBit(present,25)?(HealthUI::state::success):(HealthUI::state::inital));//空速管加温
|
||||
//healthui->setColor(18,getBit(present,25)?(HealthUI::state::success):(HealthUI::state::inital));//插销上锁
|
||||
//healthui->setColor(19,getBit(present,28)?(HealthUI::state::success):(HealthUI::state::inital));//变体上锁
|
||||
@@ -2069,8 +2064,8 @@ void MainWindow::updateVehicle(MavLinkNode::_vehicle vehicle)//事件驱动式
|
||||
|
||||
|
||||
statusui->setValue(1,2,1,getBit(health,8)?("使用地速"):("使用空速"));//速度源
|
||||
statusui->setValue(1,2,2,getBit(health,7)?("使用SBG"):("使用320"));//姿态源
|
||||
statusui->setValue(1,2,3,getBit(health,3)?("使用SBG"):("使用320"));//导航源
|
||||
statusui->setValue(1,2,2,getBit(health,7)?("使用100e"):("使用320"));//姿态源
|
||||
statusui->setValue(1,2,3,getBit(health,3)?("使用100e"):("使用320"));//导航源
|
||||
|
||||
statusui->setValue(1,3,0,getBit(health,9)?("在安控区内"):("超出安控区"));
|
||||
// statusui->setValue(1,3,1,getBit(health,10)?("复飞"):("不复飞"));
|
||||
@@ -2573,23 +2568,6 @@ void MainWindow::gear_Info(Parse::_gear info)
|
||||
|
||||
|
||||
|
||||
if((info.SW[15] && info.SW[16] && info.SW[17]&& info.SW[18]) &&
|
||||
(!info.SW[20] && !info.SW[21] && !info.SW[22]&& !info.SW[23]))
|
||||
{
|
||||
healthui->setValue(19,tr("插销解锁"));
|
||||
healthui->setColor(19,HealthUI::state::success);
|
||||
}
|
||||
else if((!info.SW[15] && !info.SW[16] && !info.SW[17]&& !info.SW[18]) &&
|
||||
(info.SW[20] && info.SW[21] && info.SW[22]&& info.SW[23]))
|
||||
{
|
||||
healthui->setValue(19,tr("插销上锁"));
|
||||
healthui->setColor(19,HealthUI::state::failure);
|
||||
}
|
||||
else
|
||||
{
|
||||
healthui->setValue(19,tr("插销运动"));
|
||||
healthui->setColor(19,HealthUI::state::warning);
|
||||
}
|
||||
|
||||
/*
|
||||
qDebug() << info.SW[15] << info.SW[16] << info.SW[17] << info.SW[18]
|
||||
@@ -2759,26 +2737,13 @@ void MainWindow::imu_info(Parse::_imu info)
|
||||
|
||||
}
|
||||
|
||||
void MainWindow::euler_info(Parse::_euler info)
|
||||
{
|
||||
if(statusui)
|
||||
{
|
||||
statusui->setValue(1,2,6,info.solution.solutionMode);//SBG状态
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::vel_info(Parse::_vel info)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void MainWindow::pos_info(Parse::_pos info)
|
||||
{
|
||||
if(statusui)
|
||||
{
|
||||
statusui->setValue(1,2,7,info.status.pos_type);//SBG差分
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void MainWindow::thrusterInfo(Parse::thruster info)
|
||||
{
|
||||
|
||||
@@ -119,9 +119,7 @@ public slots:
|
||||
void actuator2_info(Parse::_actuator2 info);
|
||||
|
||||
void imu_info(Parse::_imu info);
|
||||
void euler_info(Parse::_euler info);
|
||||
void vel_info(Parse::_vel info);
|
||||
void pos_info(Parse::_pos info);
|
||||
|
||||
/**
|
||||
* @brief 更新轨控发动机数据
|
||||
|
||||
Reference in New Issue
Block a user