mirror of
https://github.com/MoreTore/openpilot.git
synced 2026-08-05 16:26:14 +08:00
Allow throttle ui: only if openpilot longitudinal (#33787)
check op long
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user