diff --git a/selfdrive/ui/qt/onroad/model.cc b/selfdrive/ui/qt/onroad/model.cc index b395924226..595bb489a2 100644 --- a/selfdrive/ui/qt/onroad/model.cc +++ b/selfdrive/ui/qt/onroad/model.cc @@ -158,7 +158,7 @@ void ModelRenderer::updatePathGradient(QLinearGradient &bg) { constexpr float transition_speed = 0.1f; // Start transition if throttle state changes - bool allow_throttle = (*uiState()->sm)["longitudinalPlan"].getLongitudinalPlan().getAllowThrottle(); + bool allow_throttle = (*uiState()->sm)["longitudinalPlan"].getLongitudinalPlan().getAllowThrottle() || !longitudinal_control; if (allow_throttle != prev_allow_throttle) { prev_allow_throttle = allow_throttle; // Invert blend factor for a smooth transition when the state changes mid-animation diff --git a/selfdrive/ui/qt/onroad/model.h b/selfdrive/ui/qt/onroad/model.h index 739dbce1c4..50d81937e2 100644 --- a/selfdrive/ui/qt/onroad/model.h +++ b/selfdrive/ui/qt/onroad/model.h @@ -26,7 +26,7 @@ private: bool longitudinal_control = false; bool experimental_mode = false; float blend_factor = 1.0f; - bool prev_allow_throttle = false; + bool prev_allow_throttle = true; float lane_line_probs[4] = {}; float road_edge_stds[2] = {}; QPolygonF track_vertices;