You are not Logged In!

Public:GitHub/CAN

From Illini Solar Car Wiki
< Public:GitHub
Revision as of 23:20, 24 September 2020 by Jonathan (talk | contribs) (Finished up most basic info)
Jump to navigation Jump to search

Github Logo.png IlliniSolarCar/CAN is the shared repository for our CAN specifications. Started for the Brizo Design cycle, this repo is the "one source of truth" of all CAN messages (on a master branch for each car). This list is then used (submoduled) by both the firmware and and telemetry systems. CAN Messages in all systems must comply with the specifications here. The specifications here should be written independently of firmware or telemetry code for what is best for CAN. The code then meets the specification.

Workflow

A major goal of this repo is to get things into the correct master branch (brizo-master for Brizo) quickly. The overall CAN Spec structure for the car is pre-defined in the ReadMe to specify what types of messages get what sort of priority and what messages are reserved. So when a new message or set of messages for a feature need to be added they should be able to be defined, reviewed, and put to master.

Making Changes

Follow the ReadMe for the most specific instructions and example, but the general workflow is:

  1. Create a branch for your specific CAN Message / set of Messages
  2. Define your messages both for firmware and telemetry usage: F
    • can_id.h defines the message ID and Frequency for firmware
    • can_struct.h defines anl data structs for use in firmware
    • canDef.json defines everything about messages for Telemetry
  3. Open a Pull Request for reviewIn the!
    • In the review your message will be discussed and revised as needed for the CAN Bus
    • Remember: CAN messages are specified independent of the code! Code is written to meet the spec, not the reverse!

GitHub Checks / Actions

Json Schema Validation

This check validates the canDef.json to ensure it is a valid json and that all of the fields meet the requirements (such as required fields, types, valid ranges, etc). It runs on every push, so if you push something broken expect and email!

Initial Setup

You can work on this repo from the GitHub/b-fw or GitHub/Telemetry repos - it is a submodule in both.

You can also clone it separately, git clone https://github.com/IlliniSolarCar/CAN.git <optional custom folder name> to work on. Working on the CAN repo doesn't require any additional setup, you can edit the json or .h files in pretty much any text editor, although some are nicer than others.