Fix triangle size (#21332)

pull/21350/head
Willem Melching 4 years ago committed by GitHub
parent 8da538c18c
commit 9086c377e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      selfdrive/ui/paint.cc

@ -84,7 +84,7 @@ static void draw_lead(UIState *s, const cereal::RadarState::LeadData::Reader &le
fillAlpha = (int)(fmin(fillAlpha, 255));
}
float sz = std::clamp((25 * 30) / (d_rel / 3 + 30), 15.0f, 30.0f) * s->zoom;
float sz = std::clamp((25 * 30) / (d_rel / 3 + 30), 15.0f, 30.0f) * 2.35;
x = std::clamp(x, 0.f, s->viz_rect.right() - sz / 2);
y = std::fmin(s->viz_rect.bottom() - sz * .6, y);
draw_chevron(s, x, y, sz, nvgRGBA(201, 34, 49, fillAlpha), COLOR_YELLOW);

Loading…
Cancel
Save