mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-04 13:02:09 +08:00
UI cleanup (#1941)
* remove unused variables * remove unused variables old-commit-hash: 2953ae28104c3ccde59a7659c25b853ea0421adc
This commit is contained in:
@@ -856,8 +856,6 @@ void ui_nvg_init(UIState *s) {
|
||||
|
||||
assert(s->vg);
|
||||
|
||||
s->font_courbd = nvgCreateFont(s->vg, "courbd", "../assets/fonts/courbd.ttf");
|
||||
assert(s->font_courbd >= 0);
|
||||
s->font_sans_regular = nvgCreateFont(s->vg, "sans-regular", "../assets/fonts/opensans_regular.ttf");
|
||||
assert(s->font_sans_regular >= 0);
|
||||
s->font_sans_semibold = nvgCreateFont(s->vg, "sans-semibold", "../assets/fonts/opensans_semibold.ttf");
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -92,8 +92,6 @@ typedef struct UIScene {
|
||||
int frontview;
|
||||
int fullview;
|
||||
|
||||
int transformed_width, transformed_height;
|
||||
|
||||
ModelData model;
|
||||
|
||||
float mpc_x[50];
|
||||
@@ -114,16 +112,11 @@ typedef struct UIScene {
|
||||
int ui_viz_rw;
|
||||
int ui_viz_ro;
|
||||
|
||||
int front_box_x, front_box_y, front_box_width, front_box_height;
|
||||
|
||||
std::string alert_text1;
|
||||
std::string alert_text2;
|
||||
std::string alert_type;
|
||||
cereal::ControlsState::AlertSize alert_size;
|
||||
|
||||
// Used to show gps planner status
|
||||
bool gps_planner_active;
|
||||
|
||||
cereal::HealthData::HwType hwType;
|
||||
int satelliteCount;
|
||||
uint8_t athenaStatus;
|
||||
@@ -160,7 +153,6 @@ typedef struct UIState {
|
||||
NVGcontext *vg;
|
||||
|
||||
// fonts and images
|
||||
int font_courbd;
|
||||
int font_sans_regular;
|
||||
int font_sans_semibold;
|
||||
int font_sans_bold;
|
||||
@@ -203,7 +195,6 @@ typedef struct UIState {
|
||||
|
||||
int rgb_width, rgb_height, rgb_stride;
|
||||
size_t rgb_buf_len;
|
||||
mat4 rgb_transform;
|
||||
|
||||
int rgb_front_width, rgb_front_height, rgb_front_stride;
|
||||
size_t rgb_front_buf_len;
|
||||
|
||||
Reference in New Issue
Block a user