diff --git a/src/cmnds/cmd_eventHandlers.c b/src/cmnds/cmd_eventHandlers.c index 141839b7b..d45a91e5c 100644 --- a/src/cmnds/cmd_eventHandlers.c +++ b/src/cmnds/cmd_eventHandlers.c @@ -519,6 +519,19 @@ static commandResult_t CMD_ListEventHandlers(const void *context, const char *cm return CMD_RES_OK; } +int EventHandlers_GetActiveCount() { + struct eventHandler_s *ev; + int c; + + ev = g_eventHandlers; + c = 0; + + while (ev) { + ev = ev->next; + c++; + } + return c; +} void EventHandlers_Init() { //cmddetail:{"name":"AddEventHandler","args":"[EventName][EventArgument][CommandToRun]", diff --git a/src/cmnds/cmd_public.h b/src/cmnds/cmd_public.h index 5b405f2df..564dd24ac 100644 --- a/src/cmnds/cmd_public.h +++ b/src/cmnds/cmd_public.h @@ -166,6 +166,7 @@ void EventHandlers_FireEvent3(byte eventCode, int argument, int argument2, int a // This is more advanced event handler. It will only fire handlers when a variable state changes from one to another. // For example, you can watch for Voltage from BL0942 to change below 230, and it will fire event only when it becomes below 230. void EventHandlers_ProcessVariableChange_Integer(byte eventCode, int oldValue, int newValue); +int EventHandlers_GetActiveCount(); // cmd_tasmota.c int taslike_commands_init(); // cmd_newLEDDriver.c diff --git a/src/hal/bl602/hal_flashConfig_bl602.c b/src/hal/bl602/hal_flashConfig_bl602.c index 8da8fa699..37741d204 100644 --- a/src/hal/bl602/hal_flashConfig_bl602.c +++ b/src/hal/bl602/hal_flashConfig_bl602.c @@ -14,6 +14,14 @@ void BL602_InitEasyFlashIfNeeded(){ } } +// BL_Err_Type EF_Ctrl_Write_MAC_Address_Opt(uint8_t slot,uint8_t mac[6],uint8_t program) +// is called by +// int8_t mfg_efuse_write_macaddr_pre(uint8_t mac[6],uint8_t program) +// is called by +// int8_t mfg_media_write_macaddr_pre_need_lock(uint8_t mac[6],uint8_t program) +// is called by +// int8_t mfg_media_write_macaddr_pre_with_lock(uint8_t mac[6], uint8_t program); +// from: OpenBL602\components\bl602\bl602_std\bl602_std\StdDriver\Inc\bl602_mfg_media.h int WiFI_SetMacAddress(char *mac) { return 0; diff --git a/src/httpserver/http_fns.c b/src/httpserver/http_fns.c index 603cefc34..10b5ba36e 100644 --- a/src/httpserver/http_fns.c +++ b/src/httpserver/http_fns.c @@ -794,6 +794,32 @@ int http_fn_index(http_request_t* request) { bFirst = false; } } + if (1) { + i = RepeatingEvents_GetActiveCount(); + if (i) { + if (bFirst == false) { + hprintf255(request, ", "); + } + hprintf255(request, "%i repeating events", i); + bFirst = false; + } + i = EventHandlers_GetActiveCount(); + if (i) { + if (bFirst == false) { + hprintf255(request, ", "); + } + hprintf255(request, "%i event handlers", i); + bFirst = false; + } + i = CMD_GetCountActiveScriptThreads(); + if (i) { + if (bFirst == false) { + hprintf255(request, ", "); + } + hprintf255(request, "%i script threads", i); + bFirst = false; + } + } hprintf255(request, ""); } hprintf255(request, "
Cfg size: %i, change counter: %i, ota counter: %i, boot incompletes %i (might change to 0 if you wait to 30 sec)!
",