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.
With the requirement to support multiple CAN buses, the CAN API's need to massively change. We'll start this from the high level and go lower.
PCM, PH and PowerDistribution classes now take an explicit busId parameter, for which bus they are attached to. There is no default busId, this is always a required parameter.
The constructor for the CAN API takes a bus id now. For the sending APIs, there is now a flags parameter. This flag is for specifying FD data length and FD bitrate switching. In Java, these are separate parameters, whereas in C++ there is a single struct for these 3. For receiving APIs, theres a required output parameter passed into the APIs where all the info will be stored. This will contain the flags.
For the Low level CAN direct access API, there is no longer a way to read messages by mask and filter. This functionality was problematic on the old roborio anyway, as there was no specification for messages would be selected for the mask if multiple messages matched. Instead, you can read or write explicit CAN IDs. If you need to read a mask and filter of message IDs, either use socketcan directly, or use the stream APIs.