消息解析
This commit is contained in:
@@ -209,7 +209,16 @@ void PowerSystem::setTurbineState(mavlink_turbinestate_t *t)
|
||||
|
||||
setValue(ui->label_NMS,QString::number(0));
|
||||
setValue(ui->label_P1t,QString::number(t->P1t));
|
||||
setValue(ui->label_CR,QString::number(t->P3t/t->P1t));
|
||||
|
||||
if(t->P1t != 0)
|
||||
{
|
||||
setValue(ui->label_CR,QString::number(t->P3t/t->P1t));
|
||||
}
|
||||
else
|
||||
{
|
||||
setValue(ui->label_CR,QString::number(0));
|
||||
}
|
||||
|
||||
setValue(ui->label_T1t,QString::number(t->T1t));
|
||||
setValue(ui->label_RPM_mea,QString::number(t->RPM_mea));
|
||||
|
||||
@@ -286,6 +295,9 @@ void PowerSystem::setTurbineState(mavlink_turbinestate_t *t)
|
||||
setColor(ui->checkBox_21,((t->Fault & 0x2000) > 0)?(state::failure):(state::success));
|
||||
|
||||
|
||||
//qDebug() << t->Cmd;
|
||||
|
||||
|
||||
}
|
||||
|
||||
void PowerSystem::on_comboBox_TestPoint_currentIndexChanged(int index)
|
||||
@@ -341,12 +353,6 @@ void PowerSystem::on_comboBox_TestPoint_currentIndexChanged(int index)
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
void PowerSystem::on_pushButton_SendTest_clicked()
|
||||
@@ -354,7 +360,7 @@ void PowerSystem::on_pushButton_SendTest_clicked()
|
||||
float testPoint = 0;
|
||||
float testValue = 0;
|
||||
|
||||
if(!ui->comboBox_TestValue->isHidden())//显示
|
||||
if(!ui->comboBox_TestValue->isHidden())//如果显示
|
||||
{
|
||||
testPoint = ui->comboBox_TestPoint->currentData(Qt::UserRole).toFloat();
|
||||
testValue = ui->comboBox_TestValue->currentData(Qt::UserRole).toFloat();
|
||||
|
||||
Reference in New Issue
Block a user