sufst / on-car-telemetry

Embedded software for the on-car telemetry system
GNU General Public License v3.0
2 stars 0 forks source link

feat: add support for multiple CAN buses #17

Open t-bre opened 1 year ago

t-bre commented 1 year ago

Description

The current implementation works for one CAN bus, but we have two (one for critical systems and one for sensors/non-critical stuff). We will need to extend the system to have a second RTCAN instance, and a second CAN database (from the can-defs repo, which will also need some changes).

Additional Notes

rureverek commented 1 year ago

@t-bre Now, when we can add custom dbc values, shall we add bool variable that tells which CAN message belong to CAN-S or CAN-C bus?

t-bre commented 1 year ago

I think we will have separate databases and handler look up tables for each CAN bus. The problem with having something like you're suggesting is that if two messages on different buses have the same ID, the DBC can't represent that (or at least the software will complain). I'm looking into whether we will need multiple DBC files, or just one. For now, let's just focus on the CAN-C bus and getting that working.