Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alert when modeld is lagging by more than a frame #1823

Merged
merged 4 commits into from
Jul 10, 2020

Conversation

adeebshihadeh
Copy link
Contributor

No description provided.

@adeebshihadeh adeebshihadeh requested a review from pd0wm July 8, 2020 18:00
@@ -290,13 +291,13 @@ void model_publish(PubMaster &pm, uint32_t vipc_frame_id, uint32_t frame_id,

auto meta = framed.initMeta();
fill_meta(meta, net_outputs.meta);
event.setValid(frame_id < vipc_frame_id + MAX_FRAME_AGE);
event.setValid((frame_id < vipc_frame_id + MAX_FRAME_AGE) && sm_alive_valid);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would compute frame age only once, and store in a local variable. Same computation is done on line 257.

@pd0wm
Copy link
Contributor

pd0wm commented Jul 9, 2020

LGTM

@adeebshihadeh adeebshihadeh merged commit 03e824a into master Jul 10, 2020
@adeebshihadeh adeebshihadeh deleted the modeld-lag-alert branch July 10, 2020 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants