From ca09291317412e18fca895d83c5e71f223cf48bd Mon Sep 17 00:00:00 2001 From: Dean Lee Date: Mon, 28 Jun 2021 15:02:24 +0800 Subject: [PATCH] modeld.cc: no need to initialize desire to -1 (#21424) old-commit-hash: 645dbd3f24c9ed265fcbdfa932e7ef0d9fc6e912 --- selfdrive/modeld/modeld.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/selfdrive/modeld/modeld.cc b/selfdrive/modeld/modeld.cc index cdbe7d8a54..460e33c561 100644 --- a/selfdrive/modeld/modeld.cc +++ b/selfdrive/modeld/modeld.cc @@ -78,7 +78,6 @@ void run_model(ModelState &model, VisionIpcClient &vipc_client) { uint32_t frame_id = 0, last_vipc_frame_id = 0; double last = 0; - int desire = -1; uint32_t run_count = 0; while (!do_exit) { @@ -93,7 +92,7 @@ void run_model(ModelState &model, VisionIpcClient &vipc_client) { // TODO: path planner timeout? sm.update(0); - desire = ((int)sm["lateralPlan"].getLateralPlan().getDesire()); + int desire = ((int)sm["lateralPlan"].getLateralPlan().getDesire()); frame_id = sm["roadCameraState"].getRoadCameraState().getFrameId(); if (run_model_this_iter) {