mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-06-22 14:32:07 +08:00
driving.cc: Pass ModelDataRaw by reference (#1600)
* pass ModelDataRaw by reference * pass NVGpaint by refer
This commit is contained in:
@@ -247,7 +247,7 @@ void fill_longi(cereal::ModelData::LongitudinalData::Builder longi, const float
|
||||
}
|
||||
|
||||
void model_publish(PubMaster &pm, uint32_t frame_id,
|
||||
const ModelDataRaw net_outputs, uint64_t timestamp_eof) {
|
||||
const ModelDataRaw &net_outputs, uint64_t timestamp_eof) {
|
||||
// make msg
|
||||
capnp::MallocMessageBuilder msg;
|
||||
cereal::Event::Builder event = msg.initRoot<cereal::Event>();
|
||||
@@ -296,7 +296,7 @@ void model_publish(PubMaster &pm, uint32_t frame_id,
|
||||
}
|
||||
|
||||
void posenet_publish(PubMaster &pm, uint32_t frame_id,
|
||||
const ModelDataRaw net_outputs, uint64_t timestamp_eof) {
|
||||
const ModelDataRaw &net_outputs, uint64_t timestamp_eof) {
|
||||
capnp::MallocMessageBuilder msg;
|
||||
cereal::Event::Builder event = msg.initRoot<cereal::Event>();
|
||||
event.setLogMonoTime(nanos_since_boot());
|
||||
|
||||
@@ -72,7 +72,7 @@ void model_free(ModelState* s);
|
||||
void poly_fit(float *in_pts, float *in_stds, float *out);
|
||||
|
||||
void model_publish(PubMaster &pm, uint32_t frame_id,
|
||||
const ModelDataRaw data, uint64_t timestamp_eof);
|
||||
const ModelDataRaw &data, uint64_t timestamp_eof);
|
||||
void posenet_publish(PubMaster &pm, uint32_t frame_id,
|
||||
const ModelDataRaw data, uint64_t timestamp_eof);
|
||||
const ModelDataRaw &data, uint64_t timestamp_eof);
|
||||
#endif
|
||||
|
||||
@@ -791,7 +791,7 @@ void ui_draw_rect(NVGcontext *vg, float x, float y, float w, float h, NVGcolor c
|
||||
}
|
||||
}
|
||||
|
||||
void ui_draw_rect(NVGcontext *vg, float x, float y, float w, float h, NVGpaint paint, float r){
|
||||
void ui_draw_rect(NVGcontext *vg, float x, float y, float w, float h, NVGpaint &paint, float r){
|
||||
nvgBeginPath(vg);
|
||||
r > 0? nvgRoundedRect(vg, x, y, w, h, r) : nvgRect(vg, x, y, w, h);
|
||||
nvgFillPaint(vg, paint);
|
||||
|
||||
+1
-1
@@ -292,7 +292,7 @@ void ui_draw(UIState *s);
|
||||
void ui_draw_sidebar(UIState *s);
|
||||
void ui_draw_image(NVGcontext *vg, float x, float y, float w, float h, int image, float alpha);
|
||||
void ui_draw_rect(NVGcontext *vg, float x, float y, float w, float h, NVGcolor color, float r = 0, int width = 0);
|
||||
void ui_draw_rect(NVGcontext *vg, float x, float y, float w, float h, NVGpaint paint, float r = 0);
|
||||
void ui_draw_rect(NVGcontext *vg, float x, float y, float w, float h, NVGpaint &paint, float r = 0);
|
||||
void ui_nvg_init(UIState *s);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user