|
|
|
@ -193,8 +193,6 @@ static void ui_init_vision(UIState *s, const VisionStreamBufs back_bufs, |
|
|
|
|
int num_back_fds, const int *back_fds, |
|
|
|
|
const VisionStreamBufs front_bufs, int num_front_fds, |
|
|
|
|
const int *front_fds) { |
|
|
|
|
const VisionUIInfo ui_info = back_bufs.buf_info.ui_info; |
|
|
|
|
|
|
|
|
|
assert(num_back_fds == UI_BUF_COUNT); |
|
|
|
|
assert(num_front_fds == UI_BUF_COUNT); |
|
|
|
|
|
|
|
|
@ -206,14 +204,7 @@ static void ui_init_vision(UIState *s, const VisionStreamBufs back_bufs, |
|
|
|
|
|
|
|
|
|
s->scene.frontview = getenv("FRONTVIEW") != NULL; |
|
|
|
|
s->scene.fullview = getenv("FULLVIEW") != NULL; |
|
|
|
|
s->scene.transformed_width = ui_info.transformed_width; |
|
|
|
|
s->scene.transformed_height = ui_info.transformed_height; |
|
|
|
|
s->scene.front_box_x = ui_info.front_box_x; |
|
|
|
|
s->scene.front_box_y = ui_info.front_box_y; |
|
|
|
|
s->scene.front_box_width = ui_info.front_box_width; |
|
|
|
|
s->scene.front_box_height = ui_info.front_box_height; |
|
|
|
|
s->scene.world_objects_visible = false; // Invisible until we receive a calibration message.
|
|
|
|
|
s->scene.gps_planner_active = false; |
|
|
|
|
|
|
|
|
|
s->rgb_width = back_bufs.width; |
|
|
|
|
s->rgb_height = back_bufs.height; |
|
|
|
@ -225,13 +216,6 @@ static void ui_init_vision(UIState *s, const VisionStreamBufs back_bufs, |
|
|
|
|
s->rgb_front_stride = front_bufs.stride; |
|
|
|
|
s->rgb_front_buf_len = front_bufs.buf_len; |
|
|
|
|
|
|
|
|
|
s->rgb_transform = (mat4){{ |
|
|
|
|
2.0f/s->rgb_width, 0.0f, 0.0f, -1.0f, |
|
|
|
|
0.0f, 2.0f/s->rgb_height, 0.0f, -1.0f, |
|
|
|
|
0.0f, 0.0f, 1.0f, 0.0f, |
|
|
|
|
0.0f, 0.0f, 0.0f, 1.0f, |
|
|
|
|
}}; |
|
|
|
|
|
|
|
|
|
read_param(&s->speed_lim_off, "SpeedLimitOffset"); |
|
|
|
|
read_param(&s->is_metric, "IsMetric"); |
|
|
|
|
read_param(&s->longitudinal_control, "LongitudinalControl"); |
|
|
|
|