mirror of
https://github.com/MoreTore/openpilot.git
synced 2026-08-05 08:16:06 +08:00
posenet_publish: use const references (#23310)
This commit is contained in:
@@ -327,10 +327,10 @@ void model_publish(PubMaster &pm, uint32_t vipc_frame_id, uint32_t frame_id, flo
|
||||
void posenet_publish(PubMaster &pm, uint32_t vipc_frame_id, uint32_t vipc_dropped_frames,
|
||||
const ModelOutput &net_outputs, uint64_t timestamp_eof, const bool valid) {
|
||||
MessageBuilder msg;
|
||||
auto v_mean = net_outputs.pose.velocity_mean;
|
||||
auto r_mean = net_outputs.pose.rotation_mean;
|
||||
auto v_std = net_outputs.pose.velocity_std;
|
||||
auto r_std = net_outputs.pose.rotation_std;
|
||||
const auto &v_mean = net_outputs.pose.velocity_mean;
|
||||
const auto &r_mean = net_outputs.pose.rotation_mean;
|
||||
const auto &v_std = net_outputs.pose.velocity_std;
|
||||
const auto &r_std = net_outputs.pose.rotation_std;
|
||||
|
||||
auto posenetd = msg.initEvent(valid && (vipc_dropped_frames < 1)).initCameraOdometry();
|
||||
posenetd.setTrans({v_mean.x, v_mean.y, v_mean.z});
|
||||
|
||||
Reference in New Issue
Block a user