From 73c20edc8e5edd98245ae9c26f9de2a7ef4262a7 Mon Sep 17 00:00:00 2001 From: rav4kumar <36933347+rav4kumar@users.noreply.github.com> Date: Fri, 31 Jul 2020 13:14:07 -0700 Subject: [PATCH] reverted, i have better idea. --- selfdrive/ui/ui.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/selfdrive/ui/ui.cc b/selfdrive/ui/ui.cc index 06e69195375b84..1a8e663343bab4 100644 --- a/selfdrive/ui/ui.cc +++ b/selfdrive/ui/ui.cc @@ -101,8 +101,9 @@ static void send_df(UIState *s, int status) { } static bool handle_df_touch(UIState *s, int touch_x, int touch_y) { - if (s->awake && s->vision_connected && s->status != STATUS_STOPPED) - if (touch_x >= 1212 && touch_x <= 1310 && touch_y >= 902 && touch_y <= 1013) { + if (s->awake && s->vision_connected && s->status != STATUS_STOPPED) { + int padding = 40; + if ((1660 - padding <= touch_x) && (855 - padding <= touch_y)) { s->scene.uilayout_sidebarcollapsed = true; // collapse sidebar when tapping df button s->scene.dfButtonStatus++; if (s->scene.dfButtonStatus > 3) {