From 8abd77074c5edb8ca36557cf1d00b9ec4411fcf7 Mon Sep 17 00:00:00 2001 From: Lizongdi <1210855344@qq.com> Date: Wed, 16 Sep 2026 15:14:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8F=98=E9=87=8F=E5=90=8D?= =?UTF-8?q?=E5=B9=B6=E5=B0=86=E6=97=A5=E5=BF=97=E7=AD=89=E7=BA=A7=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E8=B0=83=E6=95=B4=E5=88=B0ELOG=5FLVL=5FVERBOSE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/common/include/elog_cfg.h | 2 +- project/paint_robot_new/paint_robot_new.c | 32 +++++++++++------------ 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/library/common/include/elog_cfg.h b/library/common/include/elog_cfg.h index a5dede4..95b12de 100644 --- a/library/common/include/elog_cfg.h +++ b/library/common/include/elog_cfg.h @@ -33,7 +33,7 @@ /* enable log output. */ #define ELOG_OUTPUT_ENABLE /* setting static output log level. range: from ELOG_LVL_ASSERT to ELOG_LVL_VERBOSE */ -#define ELOG_OUTPUT_LVL ELOG_LVL_INFO +#define ELOG_OUTPUT_LVL ELOG_LVL_VERBOSE /* enable assert check */ // #define ELOG_ASSERT_ENABLE /* buffer size for every line's log */ diff --git a/project/paint_robot_new/paint_robot_new.c b/project/paint_robot_new/paint_robot_new.c index 0ff41e7..030457e 100644 --- a/project/paint_robot_new/paint_robot_new.c +++ b/project/paint_robot_new/paint_robot_new.c @@ -49,9 +49,9 @@ static PV_struct_define g_stPV; static IV_struct_define g_stIV; static int g_RB_State = 0; // 机器人状态,1表示处于竖直行走模式下 static int g_Paint_State = -1; // 喷枪状态,0表示打开,1表示关闭 -static int angle_protect_lock = 0; // 为1表示角度异常,触发停车逻辑Move_Halt_AngleError +static int g_angle_protect_lock = 0; // 为1表示角度异常,触发停车逻辑Move_Halt_AngleError static int g_ipaintOffCount = 0; // Move_Halt_AngleError中的计时,即角度偏移超过多少时间触发停枪 -static int Is_All_Button_Reset = 0; // 1表示按钮正常工作,0表示需要复位 +static int g_Is_All_Button_Reset = 0; // 1表示按钮正常工作,0表示需要复位 /*----------------------------------------------* * 常量定义 * @@ -81,7 +81,7 @@ static void Move_Halt_AngleError(void) return; } - if (1 == angle_protect_lock) + if (1 == g_angle_protect_lock) { if (Rd_GetTime() - uiLastTime >= 600 * g_stCV.Paint_Gun_Shutdown_Distance / g_stIV.RobotMoveSpeed) { @@ -99,7 +99,7 @@ static void Move_Halt_AngleError(void) if(Rd_GetTime() - g_ipaintOffCount > 1000) { MsgCenter_SendTo(MODULE_NAME_CUSTOM, COMMON_CMD_STOP_ALL, NULL, 0);//先关枪 - angle_protect_lock = 1; + g_angle_protect_lock = 1; return; } } @@ -263,15 +263,15 @@ static void Custom_ModuleHandler(const Msg_t *pstMsg) RD_MEMCPY(&g_stMK32, pstMsg->m_aucData, sizeof(g_stMK32)); } - if (Is_All_Button_Reset == 0) + if (g_Is_All_Button_Reset == 0) { if (g_stMK32.CH4_SA == 0 && g_stMK32.CH5_SB == 0 && g_stMK32.CH6_SC == 0 && g_stMK32.CH7_SD == 0 && g_stMK32.IsOnline == 1) { - Is_All_Button_Reset = 1; + g_Is_All_Button_Reset = 1; } } - else if (Is_All_Button_Reset == 1) + else if (g_Is_All_Button_Reset == 1) { MsgCenter_SendTo(MODULE_NAME_DAEMON, DAEMON_SET_BUTTON_RESET, NULL, 0); } @@ -283,7 +283,7 @@ static void Custom_ModuleHandler(const Msg_t *pstMsg) MsgCenter_SendTo(MODULE_NAME_MOTOR, MOTOR_POWER_DISABLE, NULL, 0); MsgCenter_SendTo(MODULE_NAME_RBCORE, RBCORE_CMD_STOP_ALL, NULL, 0); g_RB_State = 0; - Is_All_Button_Reset = 0; + g_Is_All_Button_Reset = 0; break; } @@ -294,7 +294,7 @@ static void Custom_ModuleHandler(const Msg_t *pstMsg) && (g_stMK32.CH6_SC != -1000) ) { g_stIV.IsWorking = 0; - angle_protect_lock = 0; // 遥控器复位认为打开角度锁 + g_angle_protect_lock = 0; // 遥控器复位认为打开角度锁 g_ipaintOffCount = 0; } else @@ -355,7 +355,7 @@ static void Custom_ModuleHandler(const Msg_t *pstMsg) } } - if (0 == angle_protect_lock) + if (0 == g_angle_protect_lock) { // 开关喷枪 if (g_stPV.RunMode == 1) @@ -397,7 +397,7 @@ static void Custom_ModuleHandler(const Msg_t *pstMsg) } else if (g_stPV.RunMode == 2 || g_stPV.RunMode == 3) { - if (0 == angle_protect_lock) + if (0 == g_angle_protect_lock) { BHBF_straight_drive_Cmd stCmd = { .m_iMode = 1, @@ -418,7 +418,7 @@ static void Custom_ModuleHandler(const Msg_t *pstMsg) } else if (g_stPV.RunMode == 2 || g_stPV.RunMode == 3) { - if (0 == angle_protect_lock) + if (0 == g_angle_protect_lock) { BHBF_straight_drive_Cmd stCmd = { .m_iMode = -1, @@ -452,7 +452,7 @@ static void Custom_ModuleHandler(const Msg_t *pstMsg) } else if (g_stPV.RunMode == 2 || g_stPV.RunMode == 3) { - if (0 == angle_protect_lock) + if (0 == g_angle_protect_lock) { BHBF_straight_drive_Cmd stCmd = { .m_iMode = 1, @@ -472,7 +472,7 @@ static void Custom_ModuleHandler(const Msg_t *pstMsg) } else if (g_stPV.RunMode == 2 || g_stPV.RunMode == 3) { - if (0 == angle_protect_lock) + if (0 == g_angle_protect_lock) { BHBF_straight_drive_Cmd stCmd = { .m_iMode = -1, @@ -523,8 +523,8 @@ static void Custom_ModuleHandler(const Msg_t *pstMsg) lua_print("PV Info\n"); lua_print("{%d, %d, %d, %d, %d, %ld}\n", g_stPV.RunMode, g_stPV.RobotSpeed, g_stPV.LaneChangeDistance, (int)g_stPV.Vertical_Calibration, g_stPV.IV_IsRestart_Notified, (long long)g_stPV.TimeStamp); - lua_print("g_RB_State = %d\ng_Paint_State = %d\nangle_protect_lock = %d\ng_ipaintOffCount = %d\nIs_All_Button_Reset = %d\n", - g_RB_State, g_Paint_State, angle_protect_lock, g_ipaintOffCount, Is_All_Button_Reset); + lua_print("g_RB_State = %d\ng_Paint_State = %d\ng_angle_protect_lock = %d\ng_ipaintOffCount = %d\ng_Is_All_Button_Reset = %d\n", + g_RB_State, g_Paint_State, g_angle_protect_lock, g_ipaintOffCount, g_Is_All_Button_Reset); break; } default: