b
This commit is contained in:
+25
-12
@@ -312,18 +312,20 @@ void Cockpit::setAltitudeTarget(double Altitude)
|
||||
m_Target.isUpdate = true;
|
||||
}
|
||||
|
||||
void Cockpit::setAirSpeed(double speed)
|
||||
void Cockpit::setAirSpeed(double speed,uint8_t flag)
|
||||
{
|
||||
if(speed < 0) speed = 0;
|
||||
m_State.AirspeedFlag = flag;
|
||||
|
||||
if(speed < 0) speed = 0;
|
||||
m_State.airspeed = speed;
|
||||
m_State.isUpdate = true;
|
||||
}
|
||||
|
||||
void Cockpit::setAirSpeedTarget(double speed)
|
||||
void Cockpit::setAirSpeedTarget(double speed, uint8_t flag)
|
||||
{
|
||||
if(speed < 0) speed = 0;
|
||||
Q_UNUSED(flag)
|
||||
|
||||
if(speed < 0) speed = 0;
|
||||
m_Target.airspeed = speed;
|
||||
m_Target.isUpdate = true;
|
||||
}
|
||||
@@ -346,21 +348,25 @@ void Cockpit::setVerticalSpeedTarget(double speed)
|
||||
void Cockpit::setGPS(QString str)
|
||||
{
|
||||
m_State.GPS = str;
|
||||
m_Target.isUpdate = true;
|
||||
}
|
||||
|
||||
void Cockpit::setMode(QString str)
|
||||
{
|
||||
m_State.MODE = str;
|
||||
m_Target.isUpdate = true;
|
||||
}
|
||||
|
||||
void Cockpit::setState(QString str)
|
||||
{
|
||||
m_State.STATE = str;
|
||||
m_Target.isUpdate = true;
|
||||
}
|
||||
|
||||
void Cockpit::setAOA(qreal Value)
|
||||
{
|
||||
m_State.AOA = Value;
|
||||
m_Target.isUpdate = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -368,6 +374,7 @@ void Cockpit::setAOA(qreal Value)
|
||||
void Cockpit::setLed(QColor LED)
|
||||
{
|
||||
m_Color.LedColor = LED;
|
||||
m_Target.isUpdate = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -394,15 +401,21 @@ void Cockpit::paintEvent(QPaintEvent *)
|
||||
setPalette(QPalette(Qt::black)); //设置背景颜色
|
||||
setAutoFillBackground(true);//设置自动填充背景色
|
||||
|
||||
if(isNormalSize)
|
||||
{
|
||||
drawPitch(&painter);
|
||||
drawRoll(&painter);
|
||||
drawRollScale(&painter);
|
||||
drawLeftScale(&painter);
|
||||
drawRightScale(&painter);
|
||||
drawVRate(&painter);
|
||||
drawYawScale(&painter);
|
||||
drawTopStatuts(&painter);
|
||||
}
|
||||
else//简单显示
|
||||
{
|
||||
|
||||
drawPitch(&painter);
|
||||
drawRoll(&painter);
|
||||
drawRollScale(&painter);
|
||||
drawLeftScale(&painter);
|
||||
drawRightScale(&painter);
|
||||
drawVRate(&painter);
|
||||
drawYawScale(&painter);
|
||||
drawTopStatuts(&painter);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user