From fce3de82c502b1498b59f4a9a389f18b1521a09d Mon Sep 17 00:00:00 2001 From: Stephan Hadinger Date: Sat, 31 Aug 2019 14:44:49 +0200 Subject: [PATCH] Move '#include user_config_override.h' in 'my_user_config.h'. Allow user_config_override.h to change parameters like USE_MQTT_TLS. --- sonoff/my_user_config.h | 4 ++++ sonoff/sonoff.ino | 3 --- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/sonoff/my_user_config.h b/sonoff/my_user_config.h index ecfa4c9c9..808fa4d57 100644 --- a/sonoff/my_user_config.h +++ b/sonoff/my_user_config.h @@ -549,6 +549,10 @@ * No user configurable items below \*********************************************************************************************/ +#ifdef USE_CONFIG_OVERRIDE + #include "user_config_override.h" // Configuration overrides for my_user_config.h +#endif + #if defined(USE_DISCOVERY) && defined(USE_MQTT_AWS_IOT) #error "Select either USE_DISCOVERY or USE_MQTT_AWS_IOT, mDNS takes too much code space and is not needed for AWS IoT" #endif diff --git a/sonoff/sonoff.ino b/sonoff/sonoff.ino index 2e335e415..f45411b37 100755 --- a/sonoff/sonoff.ino +++ b/sonoff/sonoff.ino @@ -30,9 +30,6 @@ #include "sonoff_version.h" // Sonoff-Tasmota version information #include "sonoff.h" // Enumeration used in my_user_config.h #include "my_user_config.h" // Fixed user configurable options -#ifdef USE_CONFIG_OVERRIDE - #include "user_config_override.h" // Configuration overrides for my_user_config.h -#endif #ifdef USE_MQTT_TLS #include // we need to include before "sonoff_post.h" to take precedence over the BearSSL version in Arduino #endif // USE_MQTT_TLS