[cli] align autostart command (#2755)

This commit is contained in:
Łukasz Duda
2018-05-30 09:00:49 -07:00
committed by Jonathan Hui
parent b98c8b350a
commit 90b66eb6de
2 changed files with 9 additions and 9 deletions
+5 -5
View File
@@ -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
View File
@@ -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);
}