mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-06-23 23:12:04 +08:00
modeld: read frame_id if sm.update(0)>0 (#1947)
* read frameid if sm.update(0)>0 * move postion same line
This commit is contained in:
@@ -181,7 +181,7 @@ int main(int argc, char **argv) {
|
||||
cl_mem yuv_cl;
|
||||
VisionBuf yuv_ion = visionbuf_allocate_cl(buf_info.buf_len, device_id, context, &yuv_cl);
|
||||
|
||||
uint32_t last_vipc_frame_id = 0;
|
||||
uint32_t frame_id = 0, last_vipc_frame_id = 0;
|
||||
double last = 0;
|
||||
int desire = -1;
|
||||
while (!do_exit) {
|
||||
@@ -202,6 +202,7 @@ int main(int argc, char **argv) {
|
||||
if (sm.update(0) > 0){
|
||||
// TODO: path planner timeout?
|
||||
desire = ((int)sm["pathPlan"].getPathPlan().getDesire()) - 1;
|
||||
frame_id = sm["frame"].getFrame().getFrameId();
|
||||
}
|
||||
|
||||
double mt1 = 0, mt2 = 0;
|
||||
@@ -212,8 +213,7 @@ int main(int argc, char **argv) {
|
||||
}
|
||||
|
||||
mat3 model_transform = matmul3(yuv_transform, transform);
|
||||
uint32_t frame_id = sm["frame"].getFrame().getFrameId();
|
||||
|
||||
|
||||
mt1 = millis_since_boot();
|
||||
|
||||
// TODO: don't make copies!
|
||||
|
||||
Reference in New Issue
Block a user