Mila is an electric sports car with the goal of going 1000 miles on a single charge. This is the GitHub repository for the Low Voltage system. It's built on PlatformIO.
The src
folder contains the source code for all the embedded components of the system. Inside the src
folder, there are folders for each node of the system and a common
folder for shared code and drivers. See the READMEs within each folder for further information about each node.
To format all c/cpp files in the repo (src and include), run:
./format.sh
This will not affect lib (since it's external libraries)
A pre-commit hook is available to automatically check and apply formatting before each commit. To install the hook, run:
./install-hooks.sh
This will:
- Format your C/C++ code automatically before each commit
- Re-stage the formatted files so changes aren't lost
- Allow commits to proceed with a warning if clang-format isn't installed
The formatting tools require clang-format to be installed on your system:
- macOS:
brew install clang-format
- Ubuntu/Debian:
sudo apt-get install clang-format
- Windows with Chocolatey:
choco install llvm