panda
panda copied to clipboard
Delete utils.c and can.h from panda
- Must be merged after https://github.com/commaai/opendbc/pull/2076
- This PR deletes duplicated code from opendbc.
- Compile
safety.oobject file to link definitions that panda needs from opendbc at compile time without duplicated function definitions (we need this to progress on https://github.com/commaai/panda/issues/2171)
details
utils.h and can.h are approximately duplicated from opendbc, which is making https://github.com/commaai/panda/issues/2171 hard to land. Why? A couple reasons:
- Divergence
- Over time, both of these headers have diverged slightly. For example, there are functions declared as
staticin one, but not the other. This results in issue at compile time. Instead of having worry about the divergences, let's just have one consistent picture of the world.
- Function implementations in header
- Since opendbc has not yet adopted source/header style, we can't include many headers from opendbc in panda without getting multiple defintions of the same symbols (compilation errors).