mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-08-23 11:03:46 +08:00
Map: Use latActive and longActive for navigation path color change
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user