diff --git a/src/ui/HUD.cc b/src/ui/HUD.cc index 13a45f9e27470783a01a510fb81d0691a7d68aec..d14bce005b033657ae615153a13d76cc4f040378 100644 --- a/src/ui/HUD.cc +++ b/src/ui/HUD.cc @@ -449,7 +449,11 @@ void HUD::paintText(QString text, QColor color, float fontSize, float refX, floa void HUD::initializeGL() { +<<<<<<< HEAD:src/ui/HUD.cc bool antialiasing = true; +======= + bool antialiasing = false; +>>>>>>> 9bd7957ab32b1fd759fd81c2214455325bc5a569:src/ui/HUD.cc // Antialiasing setup if(antialiasing) @@ -467,9 +471,9 @@ void HUD::initializeGL() } else { - glDisable(GL_BLEND); - glDisable(GL_POINT_SMOOTH); - glDisable(GL_LINE_SMOOTH); + //glDisable(GL_BLEND); + //glDisable(GL_POINT_SMOOTH); + //glDisable(GL_LINE_SMOOTH); } } @@ -603,6 +607,8 @@ void HUD::paintGL() painter.setPen(defaultColor); painter.drawPolyline(yawIndicator); + // CENTER + // HEADING INDICATOR // // __ __ @@ -624,6 +630,23 @@ void HUD::paintGL() painter.drawPolyline(hIndicator); + // SETPOINT + const float centerWidth = 4.0f; + painter.setPen(defaultColor); + painter.setBrush(Qt::NoBrush); + // TODO + //painter.drawEllipse(QPointF(refToScreenX(qMin(10.0f, values.value("roll desired", 0.0f) * 10.0f)), refToScreenY(qMin(10.0f, values.value("pitch desired", 0.0f) * 10.0f))), refToScreenX(centerWidth/2.0f), refToScreenX(centerWidth/2.0f)); + + const float centerCrossWidth = 10.0f; + // left + painter.drawLine(QPointF(refToScreenX(-centerWidth / 2.0f), refToScreenY(0.0f)), QPointF(refToScreenX(-centerCrossWidth / 2.0f), refToScreenY(0.0f))); + // right + painter.drawLine(QPointF(refToScreenX(centerWidth / 2.0f), refToScreenY(0.0f)), QPointF(refToScreenX(centerCrossWidth / 2.0f), refToScreenY(0.0f))); + // top + painter.drawLine(QPointF(refToScreenX(0.0f), refToScreenY(-centerWidth / 2.0f)), QPointF(refToScreenX(0.0f), refToScreenY(-centerCrossWidth / 2.0f))); + + + // COMPASS const float compassY = -vheight/2.0f + 10.0f; QRectF compassRect(QPointF(refToScreenX(-5.0f), refToScreenY(compassY)), QSizeF(refToScreenX(10.0f), refToScreenY(5.0f))); @@ -702,7 +725,6 @@ void HUD::paintGL() //qDebug() << "ROLL" << roll << "PITCH" << pitch << "YAW DIFF" << valuesDot.value("roll", 0.0f); - // PITCH paintPitchLines((pitch/M_PI)*180.0f, &painter);