From 681ef81ed82650e5cc1d420362d363ee83f7a9ad Mon Sep 17 00:00:00 2001 From: ZwX1616 Date: Wed, 10 Jun 2020 15:15:51 -0700 Subject: [PATCH] fix dtype (#1676) --- selfdrive/ui/paint.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/selfdrive/ui/paint.cc b/selfdrive/ui/paint.cc index 60e403aff6..71e26b657e 100644 --- a/selfdrive/ui/paint.cc +++ b/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 {