加了登录密码和动态修改日志输出等级功能

This commit is contained in:
小马_666 2025-01-02 09:19:50 +08:00
parent d8b3e2f563
commit 4db020575a
6 changed files with 9 additions and 4 deletions

View File

@ -58,6 +58,7 @@
"ctype.h": "c", "ctype.h": "c",
"string.h": "c", "string.h": "c",
"completion.h": "c", "completion.h": "c",
"bsp_vin_detection.h": "c" "bsp_vin_detection.h": "c",
"ulog_def.h": "c"
} }
} }

View File

@ -14,8 +14,6 @@
#include "rtdef.h" #include "rtdef.h"
#include "bsp_flash.h" #include "bsp_flash.h"
#define SYS_PREHEAT_TIME_S (10U)
#define SYS_MUTE_TIME_S (uint8_t)(10 * 3)
#define MAX_EXPIRATION_DAYS (uint16_t)(365 * 10 + 30 * 3) #define MAX_EXPIRATION_DAYS (uint16_t)(365 * 10 + 30 * 3)

View File

@ -44,7 +44,7 @@ int finsh_set_prompt(const char *prompt);
#define FINSH_PASSWORD_MIN 6 #define FINSH_PASSWORD_MIN 6
#endif #endif
#ifndef FINSH_DEFAULT_PASSWORD #ifndef FINSH_DEFAULT_PASSWORD
#define FINSH_DEFAULT_PASSWORD "rtthread" #define FINSH_DEFAULT_PASSWORD "yd4n02a"
#endif #endif
#endif /* FINSH_USING_AUTH */ #endif /* FINSH_USING_AUTH */

View File

@ -11,6 +11,7 @@
#include <stdarg.h> #include <stdarg.h>
#include "ulog.h" #include "ulog.h"
#include "rthw.h" #include "rthw.h"
#include "stdlib.h"
#ifdef ULOG_USING_SYSLOG #ifdef ULOG_USING_SYSLOG
#include <syslog.h> #include <syslog.h>
@ -1519,6 +1520,7 @@ int ulog_init(void)
#ifdef ULOG_USING_FILTER #ifdef ULOG_USING_FILTER
ulog_global_filter_lvl_set(LOG_FILTER_LVL_ALL); ulog_global_filter_lvl_set(LOG_FILTER_LVL_ALL);
// ulog_global_filter_lvl_set(LOG_FILTER_LVL_SILENT);
#endif #endif
ulog.init_ok = RT_TRUE; ulog.init_ok = RT_TRUE;

View File

@ -18,6 +18,7 @@
extern "C" { extern "C" {
#endif #endif
/* /*
* ulog init and deint * ulog init and deint
*/ */

View File

@ -13,6 +13,9 @@
/* Generated by Kconfiglib (https://github.com/ulfalizer/Kconfiglib) */ /* Generated by Kconfiglib (https://github.com/ulfalizer/Kconfiglib) */
#define FINSH_USING_AUTH //开启终端密码登录功能
#define ULOG_USING_FILTER //开启动态修改日志等级 默认修改在ulog.c 1522行
#define ENABLE_LOG_ALL #define ENABLE_LOG_ALL
#define TEST_ENABLE //打开所有的终端测试程序 #define TEST_ENABLE //打开所有的终端测试程序
#define ULOG_OUTPUT_LVL 7 // 生产时将其设为0 #define ULOG_OUTPUT_LVL 7 // 生产时将其设为0