diff --git a/selfdrive/ui/layouts/settings/device.py b/selfdrive/ui/layouts/settings/device.py index c41c8b0a26..0ee8b3d078 100644 --- a/selfdrive/ui/layouts/settings/device.py +++ b/selfdrive/ui/layouts/settings/device.py @@ -60,7 +60,7 @@ class DeviceLayout(Widget): button_item("Change Language", "CHANGE", callback=self._show_language_selection, enabled=ui_state.is_offroad), dual_button_item("Reboot", "Power Off", left_callback=self._reboot_prompt, right_callback=self._power_off_prompt), ] - regulatory_btn.set_visible(TICI) + # regulatory_btn.set_visible(TICI) return items def _render(self, rect): diff --git a/system/ui/widgets/html_render.py b/system/ui/widgets/html_render.py index b032df4d9f..85146add4d 100644 --- a/system/ui/widgets/html_render.py +++ b/system/ui/widgets/html_render.py @@ -1,4 +1,6 @@ import re +import time + import pyray as rl from dataclasses import dataclass from enum import Enum @@ -191,6 +193,7 @@ class HtmlRenderer(Widget): return current_y - rect.y def get_total_height(self, content_width: int) -> float: + t = time.monotonic() total_height = 0.0 padding = 20 usable_width = content_width - (padding * 2) @@ -211,6 +214,7 @@ class HtmlRenderer(Widget): total_height += element.margin_bottom + print(f"HtmlRenderer.get_total_height took {(time.monotonic() - t) * 1000:.4f}ms") return total_height def _get_font(self, weight: FontWeight):