Map: Use latActive and longActive for navigation path color change

This commit is contained in:
Jason Wen
2024-03-12 00:06:02 -04:00
parent ef727550a9
commit 0daa1e846b
+2 -1
View File
@@ -163,8 +163,9 @@ void MapWindow::updateState(const UIState &s) {
if (sm.updated("modelV2")) {
// set path color on change, and show map on rising edge of navigate on openpilot
auto car_control = sm["carControl"].getCarControl();
bool nav_enabled = sm["modelV2"].getModelV2().getNavEnabled() &&
sm["controlsState"].getControlsState().getEnabled();
(car_control.getLatActive() || car_control.getLongActive());
if (nav_enabled != uiState()->scene.navigate_on_openpilot) {
if (loaded_once) {
m_map->setPaintProperty("navLayer", "line-color", getNavPathColor(nav_enabled));