发动机发现问题,并修改
This commit is contained in:
@@ -274,11 +274,13 @@ void CommandBox::on_comboBox_TestPoint_currentIndexChanged(int index)
|
||||
ui->comboBox_TestValue->setCurrentIndex(1);
|
||||
|
||||
break;
|
||||
|
||||
case 4:
|
||||
ui->label_TestValue->hide();
|
||||
ui->comboBox_TestValue->hide();
|
||||
break;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -357,26 +359,43 @@ void CommandBox::on_pushButton_SendTest_clicked()
|
||||
{
|
||||
testPoint = ui->comboBox_TestPoint->currentData(Qt::UserRole).toFloat();
|
||||
testValue = ui->comboBox_TestValue->currentData(Qt::UserRole).toFloat();
|
||||
|
||||
if((ui->comboBox_TestPoint->currentIndex() != -1)&&(ui->comboBox_TestValue->currentIndex() != -1))
|
||||
{
|
||||
on_commandClicked(ui->comboBox_TestPoint->currentText() + " " + ui->comboBox_TestValue->currentText() ,
|
||||
103,testPoint,testValue,0,0,0,0,180,0);
|
||||
}
|
||||
else
|
||||
{
|
||||
QMessageBox *box = new QMessageBox(this);
|
||||
|
||||
box->setWindowTitle(tr("警告"));
|
||||
box->setText(tr("请选择测试项和测试点"));
|
||||
box->show();
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if(ui->comboBox_TestPoint->currentIndex() != -1)
|
||||
{
|
||||
testPoint = ui->comboBox_TestPoint->currentData(Qt::UserRole).toFloat();
|
||||
on_commandClicked(ui->comboBox_TestPoint->currentText(),
|
||||
103,testPoint,0,0,0,0,0,180,0);
|
||||
}
|
||||
else
|
||||
{
|
||||
QMessageBox *box = new QMessageBox(this);
|
||||
|
||||
box->setWindowTitle(tr("警告"));
|
||||
box->setText(tr("请选择测试项和测试点"));
|
||||
box->show();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
if((ui->comboBox_TestPoint->currentIndex() != -1)&&(ui->comboBox_TestValue->currentIndex() != -1))
|
||||
{
|
||||
on_commandClicked(ui->comboBox_TestPoint->currentText() + " " + ui->comboBox_TestValue->currentText() ,
|
||||
103,testPoint,testValue,0,0,0,0,180,0);
|
||||
}
|
||||
else
|
||||
{
|
||||
QMessageBox *box = new QMessageBox(this);
|
||||
|
||||
box->setWindowTitle(tr("警告"));
|
||||
box->setText(tr("请选择测试项和测试点"));
|
||||
box->show();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -205,7 +205,7 @@ void PowerSystem::setTurbineState(mavlink_turbinestate_t *t)
|
||||
|
||||
if(t->P1t != 0)
|
||||
{
|
||||
setValue(ui->label_CR,QString::number((t->P3t/10.0)/t->P1t));
|
||||
setValue(ui->label_CR,QString::number((t->P3t*10.0)/t->P1t));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -247,6 +247,8 @@ void PowerSystem::setTurbineState(mavlink_turbinestate_t *t)
|
||||
setValue(ui->label_P3t,QString::number(t->P3t*10.0));
|
||||
setValue(ui->label_DJS,QString::number(t->DJS / 4.0));
|
||||
setValue(ui->label_Vcc,QString::number(t->Vcc / 5.0));
|
||||
|
||||
|
||||
//setValue(ui->label_Tbak,QString::number(t->Tbak));
|
||||
setValue(ui->label_RPM_bak,QString::number(t->RPM_bak));
|
||||
//setValue(ui->label_IOState,QString::number(t->IOState));
|
||||
@@ -301,9 +303,6 @@ void PowerSystem::setTurbineState(mavlink_turbinestate_t *t)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void PowerSystem::setCCMState(mavlink_ccmstate_t *t)
|
||||
{
|
||||
ui->label_STEMP1->setText(QString::number(t->temp[0] * 0.1));
|
||||
|
||||
+11
-11
@@ -970,11 +970,11 @@ void MainWindow::updateUI()//事件驱动式更新数据
|
||||
|
||||
//舵机反馈是有符号16b/
|
||||
|
||||
healthui->setState(11,getBit(health,3)?(HealthUI::state::failure):(getBit(servoHealt,3)?(HealthUI::state::warning):(HealthUI::state::success)));//LA
|
||||
healthui->setState(12,getBit(health,1)?(HealthUI::state::failure):(getBit(servoHealt,1)?(HealthUI::state::warning):(HealthUI::state::success)));//RA
|
||||
healthui->setState(13,getBit(health,2)?(HealthUI::state::failure):(getBit(servoHealt,2)?(HealthUI::state::warning):(HealthUI::state::success)));//LE
|
||||
healthui->setState(14,getBit(health,4)?(HealthUI::state::failure):(getBit(servoHealt,4)?(HealthUI::state::warning):(HealthUI::state::success)));//RE
|
||||
healthui->setState(15,getBit(health,5)?(HealthUI::state::failure):(getBit(servoHealt,5)?(HealthUI::state::warning):(HealthUI::state::success)));//RU
|
||||
healthui->setState(11,getBit(health,16)?(HealthUI::state::failure):(getBit(servoHealt,3)?(HealthUI::state::warning):(HealthUI::state::success)));//LA
|
||||
healthui->setState(12,getBit(health,17)?(HealthUI::state::failure):(getBit(servoHealt,1)?(HealthUI::state::warning):(HealthUI::state::success)));//RA
|
||||
healthui->setState(13,getBit(health,18)?(HealthUI::state::failure):(getBit(servoHealt,2)?(HealthUI::state::warning):(HealthUI::state::success)));//LE
|
||||
healthui->setState(14,getBit(health,19)?(HealthUI::state::failure):(getBit(servoHealt,4)?(HealthUI::state::warning):(HealthUI::state::success)));//RE
|
||||
healthui->setState(15,getBit(health,20)?(HealthUI::state::failure):(getBit(servoHealt,5)?(HealthUI::state::warning):(HealthUI::state::success)));//RU
|
||||
|
||||
healthui->setState(16,getBit(health,21)?(HealthUI::state::success):(HealthUI::state::failure));//LT
|
||||
healthui->setState(17,getBit(health,22)?(HealthUI::state::success):(HealthUI::state::failure));//RT
|
||||
@@ -1037,12 +1037,12 @@ void MainWindow::updateUI()//事件驱动式更新数据
|
||||
|
||||
|
||||
|
||||
statusui->setEngine(1,dlink->mavlinknode->vehicle.servo_output_raw.servo6_raw);
|
||||
statusui->setEngine(2,dlink->mavlinknode->vehicle.turbinstate.RPM_mea);
|
||||
statusui->setEngine(3,dlink->mavlinknode->vehicle.ccmstate.temp[0] * 0.1);
|
||||
statusui->setEngine(4,dlink->mavlinknode->vehicle.ccmstate.temp[1] * 0.1);
|
||||
statusui->setEngine(5,dlink->mavlinknode->vehicle.ccmstate.fuel_level);
|
||||
statusui->setEngine(6,dlink->mavlinknode->vehicle.ccmstate.fuel_level);
|
||||
statusui->setEngine(1,QString::number(dlink->mavlinknode->vehicle.servo_output_raw.servo6_raw,'f',1));
|
||||
statusui->setEngine(2,QString::number(dlink->mavlinknode->vehicle.turbinstate.RPM_mea,'f',1));
|
||||
statusui->setEngine(3,QString::number(dlink->mavlinknode->vehicle.ccmstate.temp[0] * 0.1,'f',1));
|
||||
statusui->setEngine(4,QString::number(dlink->mavlinknode->vehicle.ccmstate.temp[1] * 0.1,'f',1));
|
||||
statusui->setEngine(5,QString::number(dlink->mavlinknode->vehicle.ccmstate.fuel_level,'f',1));
|
||||
statusui->setEngine(6,QString::number(dlink->mavlinknode->vehicle.ccmstate.fuel_level,'f',1));
|
||||
|
||||
statusui->setBattery(1,QString::number(dlink->mavlinknode->vehicle.bmustate.BAT1_group_voltage_mv * 0.001,'f',1));
|
||||
statusui->setBattery(2,QString::number(dlink->mavlinknode->vehicle.bmustate.BAT2_group_voltage_mv * 0.001,'f',1));
|
||||
|
||||
Reference in New Issue
Block a user