diff --git a/selfdrive/ui/sunnypilot/qt/onroad/hud.cc b/selfdrive/ui/sunnypilot/qt/onroad/hud.cc index 680542239..db6ca1952 100644 --- a/selfdrive/ui/sunnypilot/qt/onroad/hud.cc +++ b/selfdrive/ui/sunnypilot/qt/onroad/hud.cc @@ -335,7 +335,8 @@ void HudRendererSP::drawStandstillTimer(QPainter &p, int x, int y) { void HudRendererSP::drawSpeedLimitSigns(QPainter &p) { bool speedLimitValid = speedLimit > 0; int speedLimitRounded = std::nearbyint(speedLimit); - bool overspeed = speedLimitRounded < std::nearbyint(speed) && speedLimitRounded > 0; + int speedLimitFinalRounded = std::nearbyint(speedLimit + speedLimitOffset); + bool overspeed = speedLimitFinalRounded < std::nearbyint(speed) && speedLimitRounded > 0; bool speedLimitWarningEnabled = speedLimitMode == SpeedLimitMode::WARNING; QString speedLimitStr = speedLimitValid ? QString::number(speedLimitRounded) : "---";