mirror of
https://github.com/espressif/openthread.git
synced 2026-09-18 07:00:08 +00:00
[cli] align autostart command (#2755)
This commit is contained in:
committed by
Jonathan Hui
parent
b98c8b350a
commit
90b66eb6de
+5
-5
@@ -74,21 +74,21 @@ OpenThread test scripts use the CLI to execute test cases.
|
||||
|
||||
## OpenThread Command Details
|
||||
|
||||
### autostart true
|
||||
### autostart enable
|
||||
|
||||
Automatically start Thread on initialization.
|
||||
|
||||
```bash
|
||||
> autostart true
|
||||
> autostart enable
|
||||
Done
|
||||
```
|
||||
|
||||
### autostart false
|
||||
### autostart disable
|
||||
|
||||
Don't automatically start Thread on initialization.
|
||||
|
||||
```bash
|
||||
> autostart false
|
||||
> autostart disable
|
||||
Done
|
||||
```
|
||||
|
||||
@@ -98,7 +98,7 @@ Show the status of automatically starting Thread on initialization.
|
||||
|
||||
```bash
|
||||
> autostart
|
||||
false
|
||||
Disabled
|
||||
Done
|
||||
```
|
||||
|
||||
|
||||
+4
-4
@@ -415,18 +415,18 @@ void Interpreter::ProcessAutoStart(int argc, char *argv[])
|
||||
{
|
||||
if (otThreadGetAutoStart(mInstance))
|
||||
{
|
||||
mServer->OutputFormat("true\r\n");
|
||||
mServer->OutputFormat("Enabled\r\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
mServer->OutputFormat("false\r\n");
|
||||
mServer->OutputFormat("Disabled\r\n");
|
||||
}
|
||||
}
|
||||
else if (strcmp(argv[0], "true") == 0)
|
||||
else if (strcmp(argv[0], "enable") == 0)
|
||||
{
|
||||
error = otThreadSetAutoStart(mInstance, true);
|
||||
}
|
||||
else if (strcmp(argv[0], "false") == 0)
|
||||
else if (strcmp(argv[0], "disable") == 0)
|
||||
{
|
||||
error = otThreadSetAutoStart(mInstance, false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user