update example/linux/test_cmds.c.

This commit is contained in:
qmfr 2021-09-22 02:16:41 +00:00 committed by Gitee
parent 0c4ac87feb
commit 14ab2c3805
1 changed files with 3 additions and 3 deletions

View File

@ -66,21 +66,21 @@ static void cmd_example(int argc, char* argv[])
uint8_t i;
if(param_check(1, argc, argv))
{
if(strcmp(argv[1], "str") == 0)
if(strcmp(argv[1], "-s") == 0)
{
for(i=2; i<argc; i++)
{
xcmd_print("%s\r\n", argv[i]);
}
}
if(strcmp(argv[1], "int") == 0)
if(strcmp(argv[1], "-i") == 0)
{
for(i=2; i<argc; i++)
{
xcmd_print("%d\r\n", atoi(argv[i]));
}
}
if(strcmp(argv[1], "float") == 0)
if(strcmp(argv[1], "-f") == 0)
{
for(i=2; i<argc; i++)
{