Closed
Conversation
Contributor
Author
|
@robbederks WDYT of this approach as a first step? This help shrink the diff in subsequent PRs and also makes things a bit easier to reason about, IMO.
I figured out the issue with the MISRA checks. |
Contributor
|
Splitting up the code like this is pretty ugly (especially things like the FAULT list being split over the two repos). The duplicated code we have now in panda / opendbc is obviously bad already, but this seems like a step in the wrong direction to me. Requires a bit more thought / refactoring to abstract away cleanly I think (@sshane any ideas?) Any way we can finish your refactor without these changes in the meantime? |
Contributor
Author
|
@robbederks I will give it a shot. Closing for now. |
This file contains hidden or 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
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.
Needed for #2171
Dedupes the code in
pandathat was cribbed fromopendbc.details:
opendbcusing with the relative path fromopendbc.E.g.
#include "safety.h"now becomes#include "safety/safety.h"why?
Conflicts
The duplicated code was causing issues during compilation when trying to set up the source/header model for [$500 Bounty] Refactor panda to use source + header file structure #2171.
The duplicated macros defined at
opendbc/safety/board/utils.handboard/utils.hwere confusing the compiler during preprocessing, e.g.:I don't think there's a sensible work-around aside from deleting the duplicated macros outright.
Comprehensibility
The change in import paths for headers clarifies where the code is coming from. May help protect us against namespace collisions in the future.