mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-08-05 19:55:45 +08:00
@@ -149,8 +149,9 @@ class NavWidget(Widget, abc.ABC):
|
||||
new_y = self._rect.height + DISMISS_PUSH_OFFSET
|
||||
|
||||
new_y = round(self._y_pos_filter.update(new_y))
|
||||
if abs(new_y) < 1 and self._y_pos_filter.velocity.x == 0.0:
|
||||
if abs(new_y) < 1 and abs(self._y_pos_filter.velocity.x) < 0.5:
|
||||
new_y = self._y_pos_filter.x = 0.0
|
||||
self._y_pos_filter.velocity.x = 0.0
|
||||
|
||||
if self._shown_callback is not None:
|
||||
self._shown_callback()
|
||||
@@ -223,6 +224,7 @@ class NavWidget(Widget, abc.ABC):
|
||||
# Start NavWidget off-screen, no matter how tall it is
|
||||
self._y_pos_filter.update_alpha(0.1)
|
||||
self._y_pos_filter.x = gui_app.height
|
||||
self._y_pos_filter.velocity.x = 0.0
|
||||
|
||||
self._nav_bar_y_filter.x = -NAV_BAR_MARGIN - NAV_BAR_HEIGHT
|
||||
self._nav_bar_show_time = rl.get_time()
|
||||
|
||||
Reference in New Issue
Block a user