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

camerad: fix event check in poll loop to validate POLLPRI #33255

Closed
wants to merge 10,000 commits into from

Conversation

deanlee
Copy link
Contributor

@deanlee deanlee commented Aug 10, 2024

This PR corrects the event handling in the poll loop to specifically check for the POLLPRI event.

Previously, the code used if (!fds[0].revents) continue; to skip iterations when no events were detected. However, this didn’t specifically check for the POLLPRI event.

Even when POLLPRI is specified in the events field, the revents field can still include flags like POLLERR or POLLHUP, etc. after poll returns. These flags indicate different events or errors on the file descriptor, independent of the specific event being polled for. So, it’s important to specifically check for POLLPRI in the revents field.

The updated condition ensures that the code only continues when POLLPRI is correctly detected, preventing unintended event processing.

sshane and others added 30 commits July 2, 2024 22:22
* todo

* nope

* not this one

* yep

* passes

* clean up

* not used!

* oop

* update refs
Update Python packages and pre-commit hooks

Co-authored-by: Vehicle Researcher <user@comma.ai>
* add PR comment with screenshots on ui changes

* fix pr comment if statements

* use default shallow checkout

* use commaai's ci-artifacts

* use my ci-artifacts

* use tj-actions/changed-files

* clean up

* use comma repos

* make ci-artifacts branch openpilot/pr-#

* remove redundent path
* push new docs

* drop the new, just docs

* cleanup
Update Python packages and pre-commit hooks

Co-authored-by: Vehicle Researcher <user@comma.ai>
* Increase traversal_limit_in_words to Fix Traversal Limit Errors

* just use log_from_bytes

* come on pycharm

* no free lunch

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
* Chrysler Pacifica: combine 2017 and 2018 hybrids

torque params are not accurate for either (might be ~1.5 for both checking a few dongles)

* remove duplicate fingerprints

* combine docs lines

fix
Add Corolla Sedan 2024 (South America), new 'engine' and 'eps' fwversion
* working

* cache

* bring back
* ssh docs

* strict

* need an index

* push to prod
* update ci weekly report summary

* don't add skipped jobs to report

* uncomment job condition

* use jinja template

* add run number to failure links

* add run number to failure links

* Log for run #<num>

* use list

---------

Co-authored-by: Maxime Desroches <desroches.maxime@gmail.com>
* bfg

* filter repo is the new shit

* down to 27M

* move big files to lfs; remove external and phonelibs

* wip - rebase devel; don't delete external and phonelibs anymore

* wip - rebase devel hacks

* wip - rebase devel updates

* wip - rebase updates; lfs updates

* cleaned unused scripts

* wip - lfs fixes

* bfg with rebase with correct dates

* bfg script with cherry-pick method

* latest git-filter-repo analysis

* latest git-filter-repo 'before' analysis

* new lfs import

* latest git-filter-repo analysis

* lfs update; renamed rebase repos

* renamed scripts

* different tmp folders for rewrite scripts; lfs update

* gitattributes after lfs import

* tag-commit-map file with old tags pointing to old commits

* new tags

* final touches

* squash setup commits; cherry-pick validation; reverted to commaai remote

* removed rebase version

* 0.9.7 tag in tag-commit-map

* removed unused openpilot-release-archive

* fixed archive of old history because of 2 GB limit

* archive of old history push master first

* fix tags being deleted

* cleaning and more logs

* rewrite other branches with master history

* Former-commit-id

* updates to previous commits

* cleanup

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: Maxime Desroches <desroches.maxime@gmail.com>
sshane and others added 17 commits August 7, 2024 21:58
* content of can packet won't affect can fingerprint time

* remove get_one_can

* fix comment

* actually we still want to be able to send empty can (xx fingerprint func does this if it runs out of msgs)

* fix process replay
* start

* hmm API doesn't seem great

* better

* rm line

* sendcan -> can_send callable for best static type coverage, list -> tuple msg

TODO: logcan

* more sendcan -> can_send references

* remove pandad's capnp from selfdrive/car

* fix and remove cereal from test_can_fingerprint

* test_fw_fingerprint: remove pandad, less cereal

* comment done too

* better comment

* fix test_models test

* niceeee it works

* move to can_definitions

* can't come up with a better name :(

* I think we can remove SimpleNamespace soon

* fix test_can_fingerprint.py

* maintain previous behavior

* Revert "maintain previous behavior"

This reverts commit f848fd3.

* can test comment

* no need for get_one_can now!

* big clean up: no SimpleNamespace

* now self explanatory!

* not needed

* use empty can again since this is now real

* cmt
* add rules

* allow failure on docker
Co-authored-by: Comma Device <device@comma.ai>
* move capnp byte decoding out of car_helpers

* always wanted to type this

* and process replay

* this does nothing

* might as well
Copy link
Contributor

github-actions bot commented Aug 10, 2024

Thanks for contributing to openpilot! In order for us to review your PR as quickly as possible, check the following:

  • Convert your PR to a draft unless it's ready to review
  • Read the contributing docs
  • Before marking as "ready for review", ensure:
    • the goal is clearly stated in the description
    • all the tests are passing
    • the change is something we merge
    • include a route or your device' dongle ID if relevant

@deanlee deanlee marked this pull request as ready for review August 11, 2024 08:44
Copy link
Contributor

This PR has had no activity for 9 days. It will be automatically closed in 2 days if there is no activity.

@github-actions github-actions bot added the stale label Aug 21, 2024
Copy link
Contributor

This PR has been automatically closed due to inactivity. Feel free to re-open once activity resumes.

@github-actions github-actions bot closed this Aug 23, 2024
@adeebshihadeh adeebshihadeh reopened this Aug 23, 2024
@github-actions github-actions bot removed the stale label Aug 24, 2024
Copy link
Contributor

github-actions bot commented Sep 2, 2024

This PR has had no activity for 9 days. It will be automatically closed in 2 days if there is no activity.

@maxime-desroches
Copy link
Contributor

This PR was closed because of a git history rewrite.
Please read #33399 for what to do with your fork and your PRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.