|
|
@ -364,7 +364,7 @@ void fill_model(cereal::ModelDataV2::Builder &framed, const ModelOutput &net_out |
|
|
|
|
|
|
|
|
|
|
|
void model_publish(PubMaster &pm, uint32_t vipc_frame_id, uint32_t vipc_frame_id_extra, uint32_t frame_id, float frame_drop, |
|
|
|
void model_publish(PubMaster &pm, uint32_t vipc_frame_id, uint32_t vipc_frame_id_extra, uint32_t frame_id, float frame_drop, |
|
|
|
const ModelOutput &net_outputs, uint64_t timestamp_eof, |
|
|
|
const ModelOutput &net_outputs, uint64_t timestamp_eof, |
|
|
|
float model_execution_time, kj::ArrayPtr<const float> raw_pred, const bool valid) { |
|
|
|
float model_execution_time, kj::ArrayPtr<const float> raw_pred, const bool nav_enabled, const bool valid) { |
|
|
|
const uint32_t frame_age = (frame_id > vipc_frame_id) ? (frame_id - vipc_frame_id) : 0; |
|
|
|
const uint32_t frame_age = (frame_id > vipc_frame_id) ? (frame_id - vipc_frame_id) : 0; |
|
|
|
MessageBuilder msg; |
|
|
|
MessageBuilder msg; |
|
|
|
auto framed = msg.initEvent(valid).initModelV2(); |
|
|
|
auto framed = msg.initEvent(valid).initModelV2(); |
|
|
@ -374,6 +374,7 @@ void model_publish(PubMaster &pm, uint32_t vipc_frame_id, uint32_t vipc_frame_id |
|
|
|
framed.setFrameDropPerc(frame_drop * 100); |
|
|
|
framed.setFrameDropPerc(frame_drop * 100); |
|
|
|
framed.setTimestampEof(timestamp_eof); |
|
|
|
framed.setTimestampEof(timestamp_eof); |
|
|
|
framed.setModelExecutionTime(model_execution_time); |
|
|
|
framed.setModelExecutionTime(model_execution_time); |
|
|
|
|
|
|
|
framed.setNavEnabled(nav_enabled); |
|
|
|
if (send_raw_pred) { |
|
|
|
if (send_raw_pred) { |
|
|
|
framed.setRawPredictions(raw_pred.asBytes()); |
|
|
|
framed.setRawPredictions(raw_pred.asBytes()); |
|
|
|
} |
|
|
|
} |
|
|
|