Contributing
Tesla Open CAN Mod is an open-source project and contributions are welcome.
Getting Started
- Fork the repository on GitLab
- Clone your fork locally
- Install PlatformIO CLI
- Run the tests to make sure everything works:
pio test -e native
Development Workflow
- Create a branch for your changes
- Make your changes
- Run all tests:
pio test -e native
pio test -e native_bypass_tlssc_requirement
pio test -e native_log_buffer - Ensure your code passes the linter:
git ls-files '*.cpp' '*.h' '*.hpp' '*.ino' | xargs clang-format --dry-run --Werror --style=file - Submit a merge request
Code Style
The project uses clang-format for consistent code formatting. The style configuration is in the repository root. Run the formatter before committing:
git ls-files '*.cpp' '*.h' '*.hpp' '*.ino' | xargs clang-format -i --style=file
Adding a New Board
To add support for a new board:
- Create a new driver header in
include/drivers/that implements theCanDriverinterface - Add a new
DRIVER_*define insketch_config.h - Add a new PlatformIO environment in
platformio.ini - Add tests that cover the new driver
- Update the documentation
Adding a New Feature
- Implement the feature in the appropriate handler(s)
- Add a
#defineflag insketch_config.hif the feature should be optional - Add unit tests
- Update the documentation
Community
Join the Discord to discuss development, ask questions, or report issues.