From a47a9928714b423e65adf67addbe577b61a2c75c Mon Sep 17 00:00:00 2001 From: Jason Wen Date: Sat, 27 Jul 2024 23:27:46 -0400 Subject: [PATCH] map: less --- selfdrive/ui/sunnypilot/qt/maps/map.cc | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/selfdrive/ui/sunnypilot/qt/maps/map.cc b/selfdrive/ui/sunnypilot/qt/maps/map.cc index 9ce1236a91..0482668fb6 100644 --- a/selfdrive/ui/sunnypilot/qt/maps/map.cc +++ b/selfdrive/ui/sunnypilot/qt/maps/map.cc @@ -62,19 +62,8 @@ void MapWindowSP::initLayers() { } void MapWindowSP::updateState(const UIStateSP &s) { - if (!uiStateSP()->scene.started) { - return; - } + MapWindow::updateState(s); const SubMaster &sm = *(s.sm); - update(); - - // on rising edge of a valid system time, reinitialize the map to set a new token - if (sm.valid("clocks") && !prev_time_valid) { - LOGW("Time is now valid, reinitializing map"); - m_settings.setApiKey(get_mapbox_token()); - initializeGL(); - } - prev_time_valid = sm.valid("clocks"); if (sm.updated("modelV2")) { // set path color on change, and show map on rising edge of navigate on openpilot @@ -91,8 +80,6 @@ void MapWindowSP::updateState(const UIStateSP &s) { } uiStateSP()->scene.navigate_on_openpilot_deprecated = nav_enabled; } - - MapWindow::updateState(s); } void MapWindowSP::offroadTransition(bool offroad) {