mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-07-25 14:02:06 +08:00
map: less
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user