完善状态
This commit is contained in:
@@ -56,7 +56,7 @@ PowerSystem::PowerSystem(QWidget *parent) :
|
||||
setColor(ui->checkBox_20,state::success);
|
||||
setColor(ui->checkBox_21,state::success);
|
||||
|
||||
|
||||
/*
|
||||
ui->comboBox_Full->addItem("基准档",0);
|
||||
ui->comboBox_Full->addItem("1档",1);
|
||||
ui->comboBox_Full->addItem("2档",2);
|
||||
@@ -114,7 +114,7 @@ PowerSystem::PowerSystem(QWidget *parent) :
|
||||
|
||||
ui->comboBox_TestValue->show();
|
||||
ui->comboBox_TestValue->setCurrentIndex(-1);
|
||||
|
||||
*/
|
||||
|
||||
|
||||
ScopeRPM = new Scope(ui->frame_scope);
|
||||
@@ -321,75 +321,3 @@ void PowerSystem::setTurbineState(mavlink_turbinestate_t *t)
|
||||
|
||||
}
|
||||
|
||||
void PowerSystem::on_comboBox_TestPoint_currentIndexChanged(int index)
|
||||
{
|
||||
|
||||
switch (index) {
|
||||
case 0:
|
||||
case 1:
|
||||
case 2:
|
||||
case 15:
|
||||
ui->label_TestValue->show();
|
||||
ui->label_TestValue->setText("转速");
|
||||
|
||||
ui->comboBox_TestValue->show();
|
||||
ui->comboBox_TestValue->clear();
|
||||
ui->comboBox_TestValue->addItem("10000",10000);
|
||||
ui->comboBox_TestValue->addItem("15000",15000);
|
||||
ui->comboBox_TestValue->addItem("20000",20000);
|
||||
ui->comboBox_TestValue->addItem("25000",25000);
|
||||
ui->comboBox_TestValue->addItem("30000",30000);
|
||||
ui->comboBox_TestValue->addItem("35000",35000);
|
||||
ui->comboBox_TestValue->addItem("40000",40000);
|
||||
ui->comboBox_TestValue->addItem("45000",45000);
|
||||
ui->comboBox_TestValue->setEditable(true);
|
||||
ui->comboBox_TestValue->setCurrentIndex(0);
|
||||
|
||||
break;
|
||||
case 3:
|
||||
case 5:
|
||||
case 6:
|
||||
case 7:
|
||||
case 8:
|
||||
case 9:
|
||||
case 10:
|
||||
case 11:
|
||||
case 12:
|
||||
case 13:
|
||||
case 14:
|
||||
ui->label_TestValue->show();
|
||||
ui->label_TestValue->setText("电平");
|
||||
|
||||
ui->comboBox_TestValue->show();
|
||||
ui->comboBox_TestValue->clear();
|
||||
ui->comboBox_TestValue->addItem("低电平",0);
|
||||
ui->comboBox_TestValue->addItem("高电平",1);
|
||||
ui->comboBox_TestValue->setEditable(true);
|
||||
ui->comboBox_TestValue->setCurrentIndex(1);
|
||||
|
||||
break;
|
||||
case 4:
|
||||
ui->label_TestValue->hide();
|
||||
ui->comboBox_TestValue->hide();
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void PowerSystem::on_pushButton_SendTest_clicked()
|
||||
{
|
||||
float testPoint = 0;
|
||||
float testValue = 0;
|
||||
|
||||
if(!ui->comboBox_TestValue->isHidden())//如果显示
|
||||
{
|
||||
testPoint = ui->comboBox_TestPoint->currentData(Qt::UserRole).toFloat();
|
||||
testValue = ui->comboBox_TestValue->currentData(Qt::UserRole).toFloat();
|
||||
}
|
||||
else
|
||||
{
|
||||
testPoint = ui->comboBox_TestPoint->currentData(Qt::UserRole).toFloat();
|
||||
}
|
||||
|
||||
qDebug() << "send test:" << testPoint << testValue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user