pull/1678/head
ZwX1616 5 years ago committed by GitHub
parent ec5fc0e92b
commit 681ef81ed8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      selfdrive/ui/paint.cc

@ -604,10 +604,10 @@ static void ui_draw_driver_view(UIState *s) {
// draw face box
if (scene->driver_state.getFaceProb() > 0.4) {
auto fxy_list = scene->driver_state.getFacePosition();
const int face_x = fxy_list[0];
const int face_y = fxy_list[1];
int fbox_x;
int fbox_y = box_y + (face_y + 0.5) * box_h - 0.5 * 0.6 * box_h / 2;;
const float face_x = fxy_list[0];
const float face_y = fxy_list[1];
float fbox_x;
float fbox_y = box_y + (face_y + 0.5) * box_h - 0.5 * 0.6 * box_h / 2;;
if (!scene->is_rhd) {
fbox_x = valid_frame_x + (1 - (face_x + 0.5)) * (box_h / 2) - 0.5 * 0.6 * box_h / 2;
} else {

Loading…
Cancel
Save