diff --git a/tasmota/i18n.h b/tasmota/i18n.h index 30fcf173e..f913c14d2 100644 --- a/tasmota/i18n.h +++ b/tasmota/i18n.h @@ -293,8 +293,6 @@ #define D_JSON_FLAG "FLAG" #define D_JSON_BASE "BASE" #define D_CMND_TEMPOFFSET "TempOffset" -#define D_CMND_CRASH "Crash" - #define D_JSON_ONE_TO_CRASH "1 to crash" // Commands xdrv_01_mqtt.ino #define D_CMND_MQTTLOG "MqttLog" diff --git a/tasmota/my_user_config.h b/tasmota/my_user_config.h index 46fe15def..7ef154d53 100644 --- a/tasmota/my_user_config.h +++ b/tasmota/my_user_config.h @@ -268,9 +268,6 @@ //#define MY_LANGUAGE zh-CN // Chinese (Simplified) in China //#define MY_LANGUAGE zh-TW // Chinese (Traditional) in Taiwan -// -- Crash generator --------------------------- -//#define USE_CRASH // add a `Crash` command to test the crash recorder (+48 bytes) - // -- Wifi Config tools --------------------------- #define WIFI_SOFT_AP_CHANNEL 1 // Soft Access Point Channel number between 1 and 13 as used by Wifi Manager web GUI diff --git a/tasmota/support_command.ino b/tasmota/support_command.ino index 020e57b9d..23ce1f22e 100644 --- a/tasmota/support_command.ino +++ b/tasmota/support_command.ino @@ -29,9 +29,6 @@ const char kTasmotaCommands[] PROGMEM = "|" // No prefix D_CMND_TIMEDST "|" D_CMND_ALTITUDE "|" D_CMND_LEDPOWER "|" D_CMND_LEDSTATE "|" D_CMND_LEDMASK "|" D_CMND_WIFIPOWER "|" D_CMND_TEMPOFFSET "|" #ifdef USE_I2C D_CMND_I2CSCAN "|" D_CMND_I2CDRIVER "|" -#endif -#ifdef USE_CRASH - D_CMND_CRASH "|" #endif D_CMND_SENSOR "|" D_CMND_DRIVER ; @@ -47,9 +44,6 @@ void (* const TasmotaCommand[])(void) PROGMEM = { &CmndTimeDst, &CmndAltitude, &CmndLedPower, &CmndLedState, &CmndLedMask, &CmndWifiPower, &CmndTempOffset, #ifdef USE_I2C &CmndI2cScan, CmndI2cDriver, -#endif -#ifdef USE_CRASH - &CmndCrash, #endif &CmndSensor, &CmndDriver }; @@ -577,6 +571,9 @@ void CmndRestart(void) restart_flag = 2; ResponseCmndChar(D_JSON_RESTARTING); break; + case -1: + CmndCrash(); // force a crash + break; case 99: AddLog_P(LOG_LEVEL_INFO, PSTR(D_LOG_APPLICATION D_RESTARTING)); EspRestart(); diff --git a/tasmota/support_crash_recorder.ino b/tasmota/support_crash_recorder.ino index be0cde11b..abd948c39 100644 --- a/tasmota/support_crash_recorder.ino +++ b/tasmota/support_crash_recorder.ino @@ -46,12 +46,8 @@ extern "C" void custom_crash_callback(struct rst_info * rst_info, uint32_t stack // Generate a crash to test the crash recorder void CmndCrash(void) { - if (1 == XdrvMailbox.payload) { - volatile uint32_t dummy; - dummy = *((uint32_t*) 0x00000000); // invalid address - } else { - ResponseCmndChar(D_JSON_ONE_TO_CRASH); - } + volatile uint32_t dummy; + dummy = *((uint32_t*) 0x00000000); } // Clear the RTC dump area when we do a normal reboot, this avoids garbage data to stay in RTC