[LPM] Add capability to deactivate the function at build time (#1449)

To enable boards with the constant power supply to don't build this function.
Change the default behavior for the mode not to be built by default.
Only the boards with batteries are keeping it
This commit is contained in:
Florian authored and GitHub committed 2023-02-10 17:07:28 -06:00
1 parent 7c0fafd48e
commit 5bcf214d68
4 files changed
+28 -14

No files matched your search

+2 -1
View File
@@ -287,12 +287,13 @@ static_assert(MQTT_SECURE_SELF_SIGNED_INDEX_DEFAULT < (sizeof(certs_array) / siz
#endif
/*------------------DEEP SLEEP parameters ------------------*/
//DEFAULT_LOW_POWER_MODE -1 to normal mode, low power mode can't be used on this build
//DEFAULT_LOW_POWER_MODE 0 to normal mode (no power consumption optimisations)
//DEFAULT_LOW_POWER_MODE 1 to activate deep sleep
//DEFAULT_LOW_POWER_MODE 2 to activate deep sleep (LCD is turned OFF)
#ifdef ESP32
# ifndef DEFAULT_LOW_POWER_MODE
# define DEFAULT_LOW_POWER_MODE 0
# define DEFAULT_LOW_POWER_MODE -1
# endif
int lowpowermode = DEFAULT_LOW_POWER_MODE;
#endif