-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
Logic restructure #299
Closed
Closed
Logic restructure #299
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://github.com/commaai/openpilot/pull/335/files supersedes this PR. Still, thanks. A refactor was needed. |
pd0wm
pushed a commit
that referenced
this pull request
Nov 5, 2019
256d274 Fix Mac installation instruction per: https://github.com/commaai/panda/pull/308/files bfd8ff1 Update cppcheck commit with more coverage b143a1c Fixed Misra complaint 606f1d9 Fixed RTC on non-uno boards, second try. Cannot work when there is no xtal. 933c757 Fix RTC on non-uno boards (#311) 48d0d0c VW button spam: fix safety and add tests (#306) 6cccf96 Fan and IR at 0 when in power savings mode (#309) 0537328 board get_sdk scripts were left on python2 de18a7e bump version after uno merge 1965817 Changed default values for testing a12a148 Uno (#274) 7d29dc5 bump panda version. We really need a better way 4007532 VW: stricter limits to comply with comma safety policy e2e2be9 add safety mode to health packet 101238c turned on VW ignition based CAN logic a0d8d5d fix misra 5.3: check_ignition is intended as check_started and can't be used twice ea636de made check_ignition function to both look at ignition_line and ignition_can 1102e69 make ignition logic common for all cars (#303) 3a110c6 bump version after CMSIS core upgrade 55dfa52 Update core to CMSIS 5.6 release (#251) ee86490 fix linter 2 f410b11 fix linter 55957d6 proper python3 exception inheritance 6ba0f47 fix linter errors 5c49fe0 Merge pull request #145 from gregjhogan/uds 0f36199 timeout is float 396d6aa safety_replay only installs few extra requirements 25af7d3 Misra also need python 3 env 7434c5c centralize requirements for tests a0c37c7 coverage not needed in linter reqs fce38a9 Linter python (#299) 62e2f5c update cppcheck commit 711810d more uds debug 4454e3a better CAN comm abstraction 6b1f28f fix more encoding and some bytes cleanup (#300) 43adad3 fix WARNING_INDICATOR_REQUESTED name 9c857da 0x b64d6fa typing 768fdf7 bytes() > chr().encode() 1be15ea custom errors from thread 68da831 more python3 eb358e8 uds lib example 4f28858 updates for python3 932745f support tx flow control for chunked messages b1c3712 add timeout param cdf2f62 bug fixes b1a3195 fix rx message filtering bug 80fb6a6 convert uds lib to class 59cd2b4 handle separation time in microseconds 4429600 fix separation time parsing c641e66 fix typo 48b8dcc fix flow control delay scale 78f413d flow control delay 33a5167 bug fixes 8ee89a0 multi-frame tx 5e89a9c clear rx buffer and numeric error ids 9662300 fix remaining size calculation 01ef1fa zero pad messages before sending 1ddc973 uds can communication dca176e syntax errors 95be481 SERVICE_TYPE enum 98e73b5 more UDS message type implementation c1c5b03 uds lib 162f485 fix chr to bytes conversions (#298) 4972376 Update VW regression test to follow Comma safety index refactoring (#296) f9053f5 more Python 3 fixes, attempting to fix jenkins wifi regresison test (#295) 2f9e076 Panda safety code for Volkswagen, Audi, SEAT, and Škoda (#293) git-subtree-dir: panda git-subtree-split: 256d274
Vaggysag
pushed a commit
to Vaggysag/openpilot
that referenced
this pull request
Apr 21, 2020
* Added pyflakes and Pylint for python * Actually run linter in CI * some simple pyflakes changes * Add flake8 to panda reqs for linter test * flake8 errors are fixed * run flake8 in regression tests * meant to run flake8 * hack to ignore unused import * bug * fix bugs in tucan_loopback * Another fix by using set_safety_mode * added pylintrc file * more fixes and enabled pylint as well * Fix pylint in circleci * added linter to readme
nworb-cire
pushed a commit
to opgm/openpilot
that referenced
this pull request
Aug 2, 2024
…rms (commaai#299) * Hyundai CAN Longitudinal: Parse lead info for camera-based SCC platforms * typo * another typo * camera SCC has them flipped * disable `radarUnavailble` * Missing on these platforms * parse lateral position of lead car from vision model output * fix CP init
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an updated pull request that cleans up all redundant code usage and may ease porting.
All IF statements now have a single responsibility based around the signal. I think this is much better than a list of fingerprint ELIFs that point to the same place -- cruise and door signals were already grouped this way. Speaking further to consistency, it better mirrors the logic in update().
When porting, this shifts the question of "which possible signals do I need to include?" to "which signal pair from the list is correct?" This lowers the chance of missing something and easily shows which models have similar dbcs. This also lowers the likelihood of needing to add anything at all since all IF statements are referenced with respect to the minority (bosch); therefore, the ELSE is likely to do all the work.
Signals in the list are built closer to the order they actually appear in Carstate.update()
Logic structures near the end (brake and cruise) now have single responsibility and are cleaner to execute and read.