mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-24 11:16:34 +00:00
Fix profiling compile time warnings
This commit is contained in:
parent
5573ff4082
commit
eedaef0928
@ -1053,6 +1053,15 @@
|
||||
//#define DEBUG_TASMOTA_SENSOR // Enable sensor debug messages
|
||||
//#define USE_DEBUG_DRIVER // Use xdrv_99_debug.ino providing commands CpuChk, CfgXor, CfgDump, CfgPeek and CfgPoke
|
||||
|
||||
/*********************************************************************************************\
|
||||
* Profiling features
|
||||
\*********************************************************************************************/
|
||||
|
||||
//#define USE_PROFILING // Enable profiling
|
||||
//#define PROFILE_THRESHOLD 70 // Minimum duration in milliseconds to start logging
|
||||
//#define USE_PROFILE_DRIVER // Enable driver profiling
|
||||
//#define USE_PROFILE_FUNCTION // Enable driver function profiling
|
||||
|
||||
/*********************************************************************************************\
|
||||
* Optional firmware configurations
|
||||
* Select none or just one for optional features and sensors as configured in tasmota_configurations.h
|
||||
|
@ -17,16 +17,18 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
//#define USE_PROFILING
|
||||
|
||||
#define PROFILE_THRESHOLD 70 // Minimum duration in milliseconds to start logging
|
||||
//#define USE_PROFILE_DRIVER
|
||||
#define USE_PROFILE_FUNCTION
|
||||
|
||||
/*********************************************************************************************\
|
||||
* Profiling features
|
||||
\*********************************************************************************************/
|
||||
|
||||
// Moved to my_user_config.h (and user_config_override.h)
|
||||
//#define USE_PROFILING // Enable profiling
|
||||
//#define PROFILE_THRESHOLD 70 // Minimum duration in milliseconds to start logging
|
||||
//#define USE_PROFILE_DRIVER // Enable driver profiling
|
||||
//#define USE_PROFILE_FUNCTION // Enable driver function profiling
|
||||
|
||||
/*
|
||||
// Moved to tasmota_globals.h fixing compile warnings
|
||||
#ifndef USE_PROFILING
|
||||
#undef USE_PROFILE_DRIVER
|
||||
#undef USE_PROFILE_FUNCTION
|
||||
@ -43,13 +45,17 @@
|
||||
#else
|
||||
#define PROFILE_FUNCTION(DRIVER, INDEX, FUNCTION, START)
|
||||
#endif // USE_PROFILE_DRIVER
|
||||
|
||||
*/
|
||||
/*********************************************************************************************\
|
||||
* Profiling services
|
||||
\*********************************************************************************************/
|
||||
|
||||
#ifdef USE_PROFILING
|
||||
|
||||
#ifndef PROFILE_THRESHOLD
|
||||
#define PROFILE_THRESHOLD 70 // Minimum duration in milliseconds to start logging
|
||||
#endif
|
||||
|
||||
// Below needs to be inline with enum XsnsFunctions
|
||||
const char kXSnsFunctions[] PROGMEM = "SETTINGS_OVERRIDE|PIN_STATE|MODULE_INIT|PRE_INIT|INIT|"
|
||||
"LOOP|EVERY_50_MSECOND|EVERY_100_MSECOND|EVERY_200_MSECOND|EVERY_250_MSECOND|EVERY_SECOND|"
|
||||
|
@ -495,6 +495,23 @@ bool first_device_group_is_local = true;
|
||||
#define SHOW_FREE_MEM(WHERE)
|
||||
#endif
|
||||
|
||||
#ifndef USE_PROFILING
|
||||
#undef USE_PROFILE_DRIVER
|
||||
#undef USE_PROFILE_FUNCTION
|
||||
#endif
|
||||
|
||||
#ifdef USE_PROFILE_DRIVER
|
||||
#define PROFILE_DRIVER(DRIVER, FUNCTION, START) AddLogDriver(DRIVER, FUNCTION, START)
|
||||
#else
|
||||
#define PROFILE_DRIVER(DRIVER, FUNCTION, START)
|
||||
#endif // USE_PROFILE_DRIVER
|
||||
|
||||
#ifdef USE_PROFILE_FUNCTION
|
||||
#define PROFILE_FUNCTION(DRIVER, INDEX, FUNCTION, START) AddLogFunction(DRIVER, INDEX, FUNCTION, START)
|
||||
#else
|
||||
#define PROFILE_FUNCTION(DRIVER, INDEX, FUNCTION, START)
|
||||
#endif // USE_PROFILE_DRIVER
|
||||
|
||||
/*********************************************************************************************\
|
||||
* Macro for SetOption synonyms
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user