1
0
mirror of https://github.com/NevermindZZT/letter-shell.git synced 2025-01-21 10:02:54 +08:00

Merge pull request #112 from jinchunxing/master

优化 1、使用伴生对象时logSetLevel命令的调用;2、移除多余空行
This commit is contained in:
Letter 2021-12-22 09:21:27 +08:00 committed by GitHub
commit a789aa21b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 2 deletions

View File

@ -81,8 +81,15 @@ void logSetLevel(Log *log, LogLevel level)
logAssert(log, return);
log->level = level;
}
#if SHELL_USING_COMPANION == 1
SHELL_EXPORT_CMD_AGENCY(
SHELL_CMD_PERMISSION(0)|SHELL_CMD_TYPE(SHELL_TYPE_CMD_FUNC)|SHELL_CMD_DISABLE_RETURN,
logSetLevel, logSetLevel, set log level\r\n logSetLevel [level],
(void *)shellCompanionGet(shellGetCurrent(), SHELL_COMPANION_ID_LOG), p1);
#else
SHELL_EXPORT_CMD(SHELL_CMD_PERMISSION(0)|SHELL_CMD_TYPE(SHELL_TYPE_CMD_FUNC),
logSetLevel, logSetLevel, set log level);
logSetLevel, logSetLevel, set log level\r\n logSetLevel [log] [level]);
#endif /** SHELL_USING_COMPANION == 1 */
/**

View File

@ -119,7 +119,7 @@ static const char *shellText[] =
[SHELL_TEXT_HELP_HEADER] =
"command help of ",
[SHELL_TEXT_PASSWORD_HINT] =
"\r\nPlease input password:",
"Please input password:",
[SHELL_TEXT_PASSWORD_ERROR] =
"\r\npassword error\r\n",
[SHELL_TEXT_CLEAR_CONSOLE] =