From fd3fdea7b4f811038c3e1145d283b0f7e15a90f0 Mon Sep 17 00:00:00 2001 From: Mitchell Goff Date: Wed, 13 Oct 2021 12:44:36 -0700 Subject: [PATCH] Use TICI intrinsics by default on PC (#22546) --- selfdrive/common/modeldata.h | 14 +++++++------- selfdrive/ui/ui.h | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/selfdrive/common/modeldata.h b/selfdrive/common/modeldata.h index e68bf1883a..32fa2cdb66 100644 --- a/selfdrive/common/modeldata.h +++ b/selfdrive/common/modeldata.h @@ -26,12 +26,12 @@ const double X_IDXS[TRAJECTORY_SIZE] = { #include "selfdrive/common/mat.h" #include "selfdrive/hardware/hw.h" const mat3 fcam_intrinsic_matrix = - Hardware::TICI() ? (mat3){{2648.0, 0.0, 1928.0 / 2, - 0.0, 2648.0, 1208.0 / 2, - 0.0, 0.0, 1.0}} - : (mat3){{910., 0., 1164.0 / 2, - 0., 910., 874.0 / 2, - 0., 0., 1.}}; + Hardware::EON() ? (mat3){{910., 0., 1164.0 / 2, + 0., 910., 874.0 / 2, + 0., 0., 1.}} + : (mat3){{2648.0, 0.0, 1928.0 / 2, + 0.0, 2648.0, 1208.0 / 2, + 0.0, 0.0, 1.0}}; // without unwarp, focal length is for center portion only const mat3 ecam_intrinsic_matrix = (mat3){{620.0, 0.0, 1928.0 / 2, @@ -39,7 +39,7 @@ const mat3 ecam_intrinsic_matrix = (mat3){{620.0, 0.0, 1928.0 / 2, 0.0, 0.0, 1.0}}; static inline mat3 get_model_yuv_transform(bool bayer = true) { - float db_s = Hardware::TICI() ? 1.0 : 0.5; // debayering does a 2x downscale on EON + float db_s = Hardware::EON() ? 0.5 : 1.0; // debayering does a 2x downscale on EON const mat3 transform = (mat3){{ 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, diff --git a/selfdrive/ui/ui.h b/selfdrive/ui/ui.h index 62d407129c..9930cb84a6 100644 --- a/selfdrive/ui/ui.h +++ b/selfdrive/ui/ui.h @@ -30,8 +30,8 @@ typedef cereal::CarControl::HUDControl::AudibleAlert AudibleAlert; // TODO: this is also hardcoded in common/transformations/camera.py // TODO: choose based on frame input size -const float y_offset = Hardware::TICI() ? 150.0 : 0.0; -const float ZOOM = Hardware::TICI() ? 2912.8 : 2138.5; +const float y_offset = Hardware::EON() ? 0.0 : 150.0; +const float ZOOM = Hardware::EON() ? 2138.5 : 2912.8; typedef struct Rect { int x, y, w, h;