From 668b959e437b32d1fe79cc4df6c74ad7d6f6bc0b Mon Sep 17 00:00:00 2001 From: Michael <101.37584@germanynet.de> Date: Mon, 11 Nov 2024 16:41:32 +0100 Subject: [PATCH 1/3] Re https://github.com/ExpressLRS/ExpressLRS/discussions/3026 --- docs/software/toolchain-install.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/docs/software/toolchain-install.md b/docs/software/toolchain-install.md index b8d89da43..409635e2b 100644 --- a/docs/software/toolchain-install.md +++ b/docs/software/toolchain-install.md @@ -112,3 +112,23 @@ The advantage this method has over the first method is that all your changes to 3. In the terminal, type: `git pull -f` This will pull a new revision of the remote repository to your local repository and automatically merge it with your changes. + +## Avoid user_defines.txt ending up in a commit or getting overwritten + +Don't change ``user_defines.txt`` for setting up your local configuration. Instead create a new text file ``super_defines.txt` in the same location as `user_defines.txt` to define your local build configuration. `super_defines.txt` will be git-ignored and will not be part of any commits and won't be overwritten by pulls. Example `super_defines.txt`: + + #-DRegulatory_Domain_EU_CE_2400 + -DRegulatory_Domain_ISM_2400 + #-DRegulatory_Domain_FCC_915 + #-DRegulatory_Domain_EU_868 + + -DMY_BINDING_PHRASE="bindphrase" + -DHOME_WIFI_SSID="ssid" + -DHOME_WIFI_PASSWORD="password" + -DLOCK_ON_FIRST_CONNECTION + + -DUART_INVERTED + + !-DAUTO_WIFI_ON_INTERVAL="40" + +Note: use the `!` operator to superseed defines already defined in `user_defines.txt` to avoid compiler warnings. From ec8591b8e2e9ca5b458e6ea7f4d86a7303fb0704 Mon Sep 17 00:00:00 2001 From: Michael <101.37584@germanynet.de> Date: Mon, 11 Nov 2024 16:45:53 +0100 Subject: [PATCH 2/3] fix typo --- docs/software/toolchain-install.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/software/toolchain-install.md b/docs/software/toolchain-install.md index 409635e2b..d19c4da6b 100644 --- a/docs/software/toolchain-install.md +++ b/docs/software/toolchain-install.md @@ -131,4 +131,4 @@ Don't change ``user_defines.txt`` for setting up your local configuration. Inste !-DAUTO_WIFI_ON_INTERVAL="40" -Note: use the `!` operator to superseed defines already defined in `user_defines.txt` to avoid compiler warnings. +Note: use the `!` operator to supersede defines already defined in `user_defines.txt` to avoid compiler warnings. From a53a63dda0e6d187f91f49b8acc3b9e46454fcca Mon Sep 17 00:00:00 2001 From: Michael <101.37584@germanynet.de> Date: Sun, 17 Nov 2024 21:07:55 +0100 Subject: [PATCH 3/3] changed description of the ! flag (review @pkendall64) --- docs/software/toolchain-install.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/software/toolchain-install.md b/docs/software/toolchain-install.md index d19c4da6b..88af58859 100644 --- a/docs/software/toolchain-install.md +++ b/docs/software/toolchain-install.md @@ -129,6 +129,7 @@ Don't change ``user_defines.txt`` for setting up your local configuration. Inste -DUART_INVERTED - !-DAUTO_WIFI_ON_INTERVAL="40" + !-DAUTO_WIFI_ON_INTERVAL=60 + -DAUTO_WIFI_ON_INTERVAL=40 -Note: use the `!` operator to supersede defines already defined in `user_defines.txt` to avoid compiler warnings. +Note: the `!` flag is called the removal flag. It removes other flags that completely match the text after the `!`.