mirror of
https://github.com/espressif/openthread.git
synced 2026-07-29 07:07:47 +00:00
[cli] allow to run factoryreset under the diag mode (#7566)
Before starting a test case, our test script calls the `factoryreset` to make the device enters a known state . But the previous test case may fail to call the `diag stop` before exiting. This case the next test case failed to call the `factoryreset `. This commit allows the users to call `factoryreset` under the diag mode.
This commit is contained in:
+1
-1
@@ -262,7 +262,7 @@ void Interpreter::ProcessLine(char *aBuf)
|
||||
LogInput(args);
|
||||
|
||||
#if OPENTHREAD_CONFIG_DIAG_ENABLE
|
||||
if (otDiagIsEnabled(GetInstancePtr()) && (args[0] != "diag"))
|
||||
if (otDiagIsEnabled(GetInstancePtr()) && (args[0] != "diag") && (args[0] != "factoryreset"))
|
||||
{
|
||||
OutputLine("under diagnostics mode, execute 'diag stop' before running any other commands.");
|
||||
ExitNow(error = OT_ERROR_INVALID_STATE);
|
||||
|
||||
Reference in New Issue
Block a user