添加曲线,修正状态显示

This commit is contained in:
hm
2020-10-24 20:07:28 +08:00
parent d5784849a2
commit 791b81d871
16 changed files with 355 additions and 220 deletions
+24 -4
View File
@@ -102,10 +102,28 @@ PowerSystem::PowerSystem(QWidget *parent) :
cmdList.insert(0xea,"加力点火快速阀");
ScopeRPM = new Scope(ui->frame_scope);
ScopeTemp = new Scope(ui->frame_scope);
ScopeAlt = new Scope(ui->frame_scope);
ScopeMa = new Scope(ui->frame_scope);
ScopeRPM->hideButton(true);
ScopeTemp->hideButton(true);
ScopeAlt->hideButton(true);
ScopeMa->hideButton(true);
ScopeRPM->chartView->chart()->axisX()->hide();
ScopeTemp->chartView->chart()->axisX()->hide();
ScopeAlt->chartView->chart()->axisX()->hide();
ScopeMa->chartView->chart()->axisX()->hide();
/*
ScopeRPM = new QtCharts::QChart();
ScopeTemp = new QtCharts::QChart();
ScopeAlt = new QtCharts::QChart();
ScopeMa = new QtCharts::QChart();
*/
}
@@ -117,12 +135,12 @@ PowerSystem::~PowerSystem()
void PowerSystem::resizeEvent(QResizeEvent *event)
{
/*
ScopeRPM->setGeometry(0,0,ui->frame_scope->width(),ui->frame_scope->height()/4);
ScopeTemp->setGeometry(0,ui->frame_scope->height()/4,ui->frame_scope->width(),ui->frame_scope->height()/4);
ScopeAlt->setGeometry(0,ui->frame_scope->height()/2,ui->frame_scope->width(),ui->frame_scope->height()/4);
ScopeMa->setGeometry(0,3*ui->frame_scope->height()/4,ui->frame_scope->width(),ui->frame_scope->height()/4);
*/
}
@@ -294,16 +312,18 @@ void PowerSystem::setTurbineState(mavlink_turbinestate_t *t)
//qDebug() << t->Cmd;
/*
ScopeRPM->chartView->setSerieData(tr("物理转速"),t->RPM_mea);
ScopeRPM->chartView->setSerieData(tr("期望物理转速"),t->RPM_des);
ScopeTemp->chartView->setSerieData(tr("排气温度T5"),t->T5);
//从新做一个函数
ScopeAlt->chartView->setSerieData(tr("海拔"),10);
ScopeMa->chartView->setSerieData(tr("马赫"),t->tas_ap);
*/
}