diff --git a/tasmota/tasmota_xx2c_global/xdrv_interface.ino b/tasmota/tasmota_xx2c_global/xdrv_interface.ino index 78810c253..fb32682ee 100644 --- a/tasmota/tasmota_xx2c_global/xdrv_interface.ino +++ b/tasmota/tasmota_xx2c_global/xdrv_interface.ino @@ -1157,12 +1157,32 @@ bool XdrvCall(uint32_t function) { uint32_t profile_driver_start = millis(); #endif // USE_PROFILE_FUNCTION +#ifdef DEBUG_COMMAND_HANG + char tstchr[10]; + if (FUNC_COMMAND == function) { + sprintf(tstchr, "DRV: "); + TasConsole.printf(tstchr); + } +#endif // DEBUG_COMMAND_HANG + for (uint32_t x = 0; x < xdrv_present; x++) { #ifdef USE_PROFILE_FUNCTION uint32_t profile_function_start = millis(); #endif // USE_PROFILE_FUNCTION +#ifdef DEBUG_COMMAND_HANG + if (FUNC_COMMAND == function) { +#ifdef XFUNC_PTR_IN_ROM + uint32_t driverid = pgm_read_byte(kXdrvList + x); +#else + uint32_t driverid = kXdrvList[x]; +#endif + sprintf(tstchr, "%d,", driverid); + TasConsole.printf(tstchr); + } +#endif // DEBUG_COMMAND_HANG + result = xdrv_func_ptr[x](function); #ifdef USE_WEBSERVER @@ -1197,6 +1217,12 @@ bool XdrvCall(uint32_t function) { } } +#ifdef DEBUG_COMMAND_HANG + if (FUNC_COMMAND == function) { + TasConsole.println(); + } +#endif // DEBUG_COMMAND_HANG + PROFILE_DRIVER("drv", function, profile_driver_start); return result; diff --git a/tasmota/tasmota_xx2c_global/xsns_interface.ino b/tasmota/tasmota_xx2c_global/xsns_interface.ino index ed2ed0a27..679c63e0e 100644 --- a/tasmota/tasmota_xx2c_global/xsns_interface.ino +++ b/tasmota/tasmota_xx2c_global/xsns_interface.ino @@ -1117,6 +1117,14 @@ bool XsnsCall(uint32_t function) { uint32_t profile_driver_start = millis(); #endif // USE_PROFILE_FUNCTION +#ifdef DEBUG_COMMAND_HANG + char tstchr[10]; + if (FUNC_COMMAND == function) { + sprintf(tstchr, "SNS: "); + TasConsole.printf(tstchr); + } +#endif // DEBUG_COMMAND_HANG + for (uint32_t x = 0; x < xsns_present; x++) { if (XsnsEnabled(0, x)) { // Skip disabled sensor if ((FUNC_WEB_SENSOR == function) && !XsnsEnabled(1, x)) { continue; } // Skip web info for disabled sensors @@ -1125,6 +1133,18 @@ bool XsnsCall(uint32_t function) { uint32_t profile_function_start = millis(); #endif // USE_PROFILE_FUNCTION +#ifdef DEBUG_COMMAND_HANG + if (FUNC_COMMAND == function) { +#ifdef XFUNC_PTR_IN_ROM + uint32_t sensorid = pgm_read_byte(kXsnsList + x); +#else + uint32_t sensorid = kXsnsList[x]; +#endif + sprintf(tstchr, "%d,", sensorid); + TasConsole.printf(tstchr); + } +#endif // DEBUG_COMMAND_HANG + result = xsns_func_ptr[x](function); #ifdef USE_WEBSERVER @@ -1147,6 +1167,12 @@ bool XsnsCall(uint32_t function) { } } +#ifdef DEBUG_COMMAND_HANG + if (FUNC_COMMAND == function) { + TasConsole.println(); + } +#endif // DEBUG_COMMAND_HANG + PROFILE_DRIVER("sns", function, profile_driver_start); return result;