# Development ```{include} ../../CONTRIBUTING.md ``` ## Video tutorial A short video tutorial on how to build a custom firmware version: ## Compiling the source code 1. Install [Arduino CLI](https://arduino.github.io/arduino-cli/1.2/installation/). 2. Go to the repository root folder 3. Compile and flash the firmware ```shell arduino-cli compile --clean -e -p COM_PORT -u ats-mini ``` ## Compile-time options The available options are: * `DISABLE_REMOTE` - disable remote control over the USB-serial port * `THEME_EDITOR` - enable the color theme editor * `ENABLE_HOLDOFF` - enable delayed screen update while tuning To set an option, add the `--build-property` command line argument like this: ```shell arduino-cli compile --build-property "compiler.cpp.extra_flags=-DTHEME_EDITOR -DENABLE_HOLDOFF" --clean -e -p COM_PORT -u ats-mini ``` ## Enabling the pre-commit hooks 1. Install `uv` 2. Run `uv sync` 3. run `uv run pre-commit install --install-hooks` ## Using the make command You can do all of the above using the `make` command as well: ```shell THEME_EDITOR=1 ENABLE_HOLDOFF=1 PORT=/dev/tty.usbmodem14401 make upload ``` ## Adding a changelog entry 1. Install `uv` 2. Run `uv sync` 3. Create an entry: ``` uv run towncrier create --edit ID.CATEGORY.md ``` `ID` is an issue or a PR number, or `+STRING` if there is no issue/PR. `CATEGORY` is one of `added`, `changed`, `fixed`, etc. see the `tool.towncrier.type` sections in the `pyproject.toml` for the full list. ## Improving the documentation 1. Install `uv` 2. Run `uv sync` 3. Run a local webserver `uv run sphinx-autobuild docs/source docs/build` and open the http://127.0.0.1:8000 in a browser 4. Edit the Markdown files in `docs/source` folder and immediately see your changes reflected in the browser ## Release process 1. Bump the `APP_VERSION` constant in the `Common.h` file 2. If the new version has a different EEPROM layout, bump the `EEPROM_VERSION` as well (it will force the EEPROM reset) 3. Generate the CHANGELOG.md by running `uv run towncrier build --version X.XX` 4. Add and commit the changes with a message like "Release X.XX", then push them to the repository 5. Once the build is complete, download, flash and test it! 6. Tag the release and push the tag `git tag -a vX.XX -m 'Version X.XX' && git push --follow-tags` (the tag should start with `v`!)