modeld.cc: no need to initialize desire to -1 (#21424)

old-commit-hash: 645dbd3f24c9ed265fcbdfa932e7ef0d9fc6e912
This commit is contained in:
Dean Lee
2021-06-28 15:02:24 +08:00
committed by GitHub
parent 96c3078246
commit ca09291317
+1 -2
View File
@@ -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) {