Skip to content

Commit

Permalink
pass a #define in platformio_tasmota_cenv.ini
Browse files Browse the repository at this point in the history
  • Loading branch information
Staars authored Jun 26, 2023
1 parent ee14462 commit be138ae
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion docs/Compile-your-build.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,15 @@ Open the file in chosen development environment for editing.

!!! warning "Do not modify my_user_config.h"
It is strongly recommended to NOT customize your build by making changes in `my_user_config.h` because the changes you made there will be overwritten if you download/clone a newer version of Tasmota code-base. At least this would make any merge complicated. Add your custom configurations ONLY in `user_config_override.h`.
The file [`my_user_config.h`](https://github.com/arendst/Tasmota/blob/development/tasmota/my_user_config.h) is a great reference for available settings and features.
The file [`my_user_config.h`](https://github.com/arendst/Tasmota/blob/development/tasmota/my_user_config.h) is a great reference for available settings and features.

A good way to avoid dealing with the source code files is to pass defines as a flag in platformio_tasmota_cenv.ini. This needs a special stringification with escape double quotes (" -> \\\\") in the constant value and wrapping a line in single quotes.
```
build_flags = ${env:tasmota32_base.build_flags}
-DOTA_URL='""'
'-DUSER_BACKLOG="so11 1; br load(\\"setup.be\\")"'
```

### Changing Default Settings

Most default settings are defined in [`my_user_config.h`](https://github.com/arendst/Tasmota/blob/development/tasmota/my_user_config.h) along with an explanation and the command used to change it dynamically. For example:
Expand Down

0 comments on commit be138ae

Please sign in to comment.