map: less

This commit is contained in:
Jason Wen
2024-07-27 23:27:46 -04:00
parent b9785e33e7
commit a47a992871
+1 -14
View File
@@ -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) {