From 7fe8da1ab2da2861282b9e31a53559c2f95890d6 Mon Sep 17 00:00:00 2001 From: huifan Date: Sat, 16 Nov 2024 10:37:36 +0800 Subject: [PATCH] Update annotated_camera.cc --- selfdrive/ui/qt/onroad/annotated_camera.cc | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/selfdrive/ui/qt/onroad/annotated_camera.cc b/selfdrive/ui/qt/onroad/annotated_camera.cc index e5120061..2178597a 100644 --- a/selfdrive/ui/qt/onroad/annotated_camera.cc +++ b/selfdrive/ui/qt/onroad/annotated_camera.cc @@ -911,29 +911,30 @@ void AnnotatedCameraWidget::drawLead(QPainter &painter, const cereal::ModelDataV if (auto_speed_distance){ if (v_ego > 50) { if (leadtimeGapScaledInt > 3000) { - paramsMemory.putInt("StoppingDistance", 5); + params.putInt("StoppingDistance", 5); } else { - paramsMemory.putInt("StoppingDistance", 4); + params.putInt("StoppingDistance", 4); } } else if (v_ego >= 30) { // 表示 30 <= v_ego <= 50 if (leadtimeGapScaledInt > 2000) { - paramsMemory.putInt("StoppingDistance", 3); + params.putInt("StoppingDistance", 3); } else { - paramsMemory.putInt("StoppingDistance", 2); + params.putInt("StoppingDistance", 2); } } else if (v_ego >= 10) { // 表示 10 <= v_ego < 30 if (leadtimeGapScaledInt > 2000) { - paramsMemory.putInt("StoppingDistance", 3); + params.putInt("StoppingDistance", 3); } else { - paramsMemory.putInt("StoppingDistance", 2); + params.putInt("StoppingDistance", 2); } } else { // 表示 v_ego < 10 if (leadtimeGapScaledInt > 1000) { - paramsMemory.putInt("StoppingDistance", 1); + params.putInt("StoppingDistance", 1); } else { - paramsMemory.putInt("StoppingDistance", 0); + params.putInt("StoppingDistance", 0); } } + updateFrogPilotToggles(); }