diff --git a/selfdrive/ui/qt/onroad.cc b/selfdrive/ui/qt/onroad.cc index 7e83833..73b34e9 100755 --- a/selfdrive/ui/qt/onroad.cc +++ b/selfdrive/ui/qt/onroad.cc @@ -441,7 +441,7 @@ void AnnotatedCameraWidget::drawHud(QPainter &p) { p.restore(); if (!scene.hide_max_speed) { - drawSpeedWidget (p, 60, 45, QString("MAX"), QString("33"), QColor(0xff, 0xff, 0xff)); + drawSpeedWidget (p, 60, 45, const QString("MAX"), const QString("33"), const QColor(0xff, 0xff, 0xff)); } // Draw FrogPilot widgets @@ -504,7 +504,7 @@ void AnnotatedCameraWidget::drawHud(QPainter &p) { // } // } -void AnnotatedCameraWidget::drawSpeedWidget(QPainter &p, int &x, int &y, QString &title, QString &speedLimitStr, QColor &colorSpeed) { +void AnnotatedCameraWidget::drawSpeedWidget(QPainter &p, int &x, int &y, const QString &title, const QString &speedLimitStr, QColor &colorSpeed) { // Draw outer box + border to contain set speed and speed limit const int sign_margin = 12; const int us_sign_height = 186; diff --git a/selfdrive/ui/qt/onroad.h b/selfdrive/ui/qt/onroad.h index 468df60..92de24d 100755 --- a/selfdrive/ui/qt/onroad.h +++ b/selfdrive/ui/qt/onroad.h @@ -97,7 +97,7 @@ public: private: void drawText(QPainter &p, int x, int y, const QString &text, int alpha = 255); - void drawSpeedWidget(QPainter &p, int x, int y, QString &title, QString &speedLimitStr, QColor &colorSpeed); + void drawSpeedWidget(QPainter &p, int &x, int &y, const QString &title, const QString &speedLimitStr, QColor &colorSpeed); QVBoxLayout *main_layout; QPixmap dm_img;