diff --git a/selfdrive/modeld/modeld.cc b/selfdrive/modeld/modeld.cc index a682fb6349..03b487bbbf 100644 --- a/selfdrive/modeld/modeld.cc +++ b/selfdrive/modeld/modeld.cc @@ -87,6 +87,7 @@ void run_model(ModelState &model, VisionIpcClient &vipc_client) { transform_lock.lock(); mat3 model_transform = cur_transform; + bool valid = live_calib_seen; transform_lock.unlock(); // TODO: path planner timeout? @@ -117,8 +118,8 @@ void run_model(ModelState &model, VisionIpcClient &vipc_client) { float frame_drop_ratio = frames_dropped / (1 + frames_dropped); model_publish(pm, extra.frame_id, frame_id, frame_drop_ratio, *model_output, extra.timestamp_eof, model_execution_time, - kj::ArrayPtr(model.output.data(), model.output.size()), live_calib_seen); - posenet_publish(pm, extra.frame_id, vipc_dropped_frames, *model_output, extra.timestamp_eof, live_calib_seen); + kj::ArrayPtr(model.output.data(), model.output.size()), valid); + posenet_publish(pm, extra.frame_id, vipc_dropped_frames, *model_output, extra.timestamp_eof, valid); //printf("model process: %.2fms, from last %.2fms, vipc_frame_id %u, frame_id, %u, frame_drop %.3f\n", mt2 - mt1, mt1 - last, extra.frame_id, frame_id, frame_drop_ratio); last = mt1;